Commit dd3b4611 authored by Michael Chen's avatar Michael Chen
Browse files

Update .gitlab-ci.yml

parent 54a2d6e8
Pipeline #79645 passed with stages
in 1 minute and 23 seconds
......@@ -24,11 +24,13 @@ build_image:
deploy_image_latest:
stage: deploy
before_script:
- '${env:TAGGED_IMAGE}="${env:DOCKER_USERNAME}/${env:IMAGE_NAME}"'
- 'echo "Deploying ${env:TAGGED_IMAGE} as latest..."'
- 'echo "Login for user ${env:DOCKER_USERNAME} using access token!"'
- 'echo ${env:DOCKER_ACCESS_TOKEN} | docker login -u ${env:DOCKER_USERNAME} --password-stdin'
script:
- 'docker tag ${env:IMAGE_NAME} ${env:DOCKER_USERNAME}/${env:IMAGE_NAME}'
- 'docker push ${env:DOCKER_USERNAME}/${env:IMAGE_NAME}'
- 'docker tag ${env:IMAGE_NAME} ${env:TAGGED_IMAGE}'
- 'docker push ${env:TAGGED_IMAGE}'
tags:
- windows
- powershell
......@@ -36,9 +38,9 @@ deploy_image_latest:
# Deploy tagged image only if pipeline is run on tag
deploy_image_tagged:
stage: deploy
variables:
TAGGED_IMAGE: '${env:DOCKER_USERNAME}/${env:IMAGE_NAME}:${env:CI_COMMIT_TAG}'
before_script:
- '${env:TAGGED_IMAGE}="${env:DOCKER_USERNAME}/${env:IMAGE_NAME}:${env:CI_COMMIT_TAG}"'
- 'echo "Deploying ${env:TAGGED_IMAGE}..."'
- 'echo "Login for user ${env:DOCKER_USERNAME} using access token!"'
- 'echo ${env:DOCKER_ACCESS_TOKEN} | docker login -u ${env:DOCKER_USERNAME} --password-stdin'
script:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment