Verified Commit 91ebee43 authored by Michael Chen's avatar Michael Chen
Browse files

[deploy] variable expansion

parent 4a031e4e
Pipeline #79717 failed with stages
in 23 seconds
......@@ -21,9 +21,8 @@ build_image:
deploy_master_image:
stage: deploy
variables:
TAGGED_IMAGE: $FULL_IMAGE_NAME
before_script:
- ${env:TAGGED_IMAGE}="${env:FULL_IMAGE_NAME}"
- echo "Deploying ${env:IMAGE_NAME} with tag latest..."
- echo "Login for user ${env:DOCKER_USERNAME} using access token!"
- echo ${env:DOCKER_ACCESS_TOKEN} | docker login -u ${env:DOCKER_USERNAME} --password-stdin ${env:DEPLOY_REGISTRY}
......@@ -36,10 +35,9 @@ deploy_master_image:
deploy_branch_image:
stage: deploy
variables:
TAGGED_IMAGE: $FULL_IMAGE_NAME:$CI_COMMIT_BRANCH
before_script:
- echo "Deploying ${env:IMAGE_NAME} with tag ${env:CI_COMMIT_TAG}..."
- ${env:TAGGED_IMAGE}="${env:$FULL_IMAGE_NAME}:${env:CI_COMMIT_BRANCH}"
- echo "Deploying ${env:IMAGE_NAME} with tag ${env:CI_COMMIT_BRANCH}..."
- echo "Login for user ${env:DOCKER_USERNAME} using access token!"
- echo ${env:DOCKER_ACCESS_TOKEN} | docker login -u ${env:DOCKER_USERNAME} --password-stdin ${env:DEPLOY_REGISTRY}
script:
......@@ -52,9 +50,8 @@ deploy_branch_image:
# Deploy tagged image only if pipeline is run on tag
deploy_image_tagged:
stage: deploy
variables:
TAGGED_IMAGE: $FULL_IMAGE_NAME:$CI_COMMIT_TAG
before_script:
- ${env:TAGGED_IMAGE}="${env:$FULL_IMAGE_NAME}:${env:CI_COMMIT_TAG}"
- echo "Deploying ${env:IMAGE_NAME} with tag ${env:CI_COMMIT_TAG}..."
- echo "Login for user ${env:DOCKER_USERNAME} using access token!"
- echo ${env:DOCKER_ACCESS_TOKEN} | docker login -u ${env:DOCKER_USERNAME} --password-stdin ${env:DEPLOY_REGISTRY}
......
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