Skip to content

Commit

Permalink
Split up docker pushes to seperate commands in gitlab ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Tyil committed Aug 20, 2020
1 parent 63017e8 commit 02f60a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions .bundle/config
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
BUNDLE_DEPLOYMENT: "true"
BUNDLE_PATH: "vendor/bundle"
6 changes: 4 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ quay.io:
- echo "$QUAY_PASSWORD" | docker login -u "$QUAY_USER" --password-stdin https://quay.io
script:
- docker build -t $QUAY_REPOSITORY:latest -t $QUAY_REPOSITORY:ci-$CI_COMMIT_SHA .
- docker push $QUAY_REPOSITORY:latest $QUAY_REPOSITORY:ci-$CI_COMMIT_SHA
- docker push $QUAY_REPOSITORY:latest
- docker push $QUAY_REPOSITORY:ci-$CI_COMMIT_SHA

registry.gitlab.com:
stage: push
Expand All @@ -38,4 +39,5 @@ registry.gitlab.com:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- docker build -t $CI_REGISTRY_IMAGE:latest -t $CI_REGISTRY_IMAGE:ci-$CI_COMMIT_SHA .
- docker push $CI_REGISTRY_IMAGE:latest $CI_REGISTRY_IMAGE:ci-$CI_COMMIT_SHA
- docker push $CI_REGISTRY_IMAGE:latest
- docker push $CI_REGISTRY_IMAGE:ci-$CI_COMMIT_SHA

0 comments on commit 02f60a7

Please sign in to comment.