Skip to content

Commit

Permalink
add Docker pull for image refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-usui authored Apr 24, 2022
1 parent 5fa1b10 commit 33ac5a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ build-backend:
script:
- docker build -t "${CI_REGISTRY_IMAGE}/bt-backend${tag}" $FILEPATH_LOCAL_DOCKER_COMPOSE_BACKEND
- docker push "${CI_REGISTRY_IMAGE}/bt-backend${tag}"
- docker pull "${CI_REGISTRY_IMAGE}/bt-backend${tag}" # assumes that Docker socket for building is same as Docker used for deployment: fine for single node, not so much multiple k8s nodes, rationale: to refresh image tag, but still keep simplicity of 'image: $branch' and 'imagePullPolicy: IfNotPresent'

build-frontend:
stage: build
Expand All @@ -42,6 +43,7 @@ build-frontend:
script:
- docker build -t "${CI_REGISTRY_IMAGE}/bt-frontend${tag}" $FILEPATH_LOCAL_DOCKER_COMPOSE_FRONTEND
- docker push "${CI_REGISTRY_IMAGE}/bt-frontend${tag}"
- docker pull "${CI_REGISTRY_IMAGE}/bt-frontend${tag}" # assumes that Docker socket for building is same as Docker used for deployment: fine for single node, not so much multiple k8s nodes, rationale: to refresh image tag, but still keep simplicity of 'image: $branch' and 'imagePullPolicy: IfNotPresent'

deploy-dev:
stage: deploy-dev
Expand Down

0 comments on commit 33ac5a2

Please sign in to comment.