Makefile 877 B

123456789101112131415161718192021222324
  1. default: docker_build
  2. REGISTRY = gcr.io/neo4j-helm
  3. TEST_IMAGE ?= $(REGISTRY)/tester
  4. BACKUP_IMAGE ?= $(REGISTRY)/backup
  5. BUILD_IMAGE ?= $(REGISTRY)/build
  6. RESTORE_IMAGE ?= $(REGISTRY)/restore
  7. DOCKER_TAG ?= `cat ../Chart.yaml | grep version | sed 's/.*: //'`
  8. docker_build:
  9. docker build \
  10. --build-arg VCS_REF=`git rev-parse --short HEAD` \
  11. --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \
  12. -t $(TEST_IMAGE):$(DOCKER_TAG) -f test/Dockerfile . &
  13. docker build -t $(BACKUP_IMAGE):$(DOCKER_TAG) -f backup/Dockerfile . &
  14. docker build -t $(BUILD_IMAGE):latest -f build/Dockerfile . &
  15. docker build -t $(RESTORE_IMAGE):$(DOCKER_TAG) -f restore/Dockerfile . &
  16. docker_push:
  17. # Push to DockerHub
  18. docker push $(TEST_IMAGE):$(DOCKER_TAG) &
  19. docker push $(BACKUP_IMAGE):$(DOCKER_TAG) &
  20. docker push $(RESTORE_IMAGE):$(DOCKER_TAG) &
  21. docker push $(BUILD_IMAGE):latest &