blob: 1407aa49dfa041aaa611449ccca1a221bd9c1f24 [file] [log] [blame]
Adrià Vilanova Martínez250457f2021-08-08 01:23:14 +02001MUTABLE_VERSION ?= latest
2VERSION ?= $(shell git rev-parse --short HEAD)
3
4IMAGE_PROD := avm99963/gitwatcher
Adrià Vilanova Martínez8dbd98d2024-01-02 00:19:24 +01005IMAGE_INTERNAL := docker-registry.corp.avm99963.com/gitwatcher
Adrià Vilanova Martínez250457f2021-08-08 01:23:14 +02006
7docker-prod: Dockerfile
8 docker build --force-rm -f Dockerfile --tag=$(IMAGE_PROD):$(VERSION) .
9 docker tag $(IMAGE_PROD):$(VERSION) $(IMAGE_PROD):$(MUTABLE_VERSION)
Adrià Vilanova Martínez8dbd98d2024-01-02 00:19:24 +010010 docker tag $(IMAGE_PROD):$(VERSION) $(IMAGE_INTERNAL):$(VERSION)
11 docker tag $(IMAGE_PROD):$(VERSION) $(IMAGE_INTERNAL):$(MUTABLE_VERSION)
Adrià Vilanova Martínez250457f2021-08-08 01:23:14 +020012
13push-prod: docker-prod
14 docker push $(IMAGE_PROD):$(VERSION)
Adrià Vilanova Martínez8dbd98d2024-01-02 00:19:24 +010015 docker push $(IMAGE_PROD):$(MUTABLE_VERSION)
16 docker push $(IMAGE_INTERNAL):$(VERSION)
17 docker push $(IMAGE_INTERNAL):$(MUTABLE_VERSION)