Commit db8f3697 authored by Daniel Scholl's avatar Daniel Scholl
Browse files

fixing acr push

parent 96ffddf1
Pipeline #6762 passed with stage
in 6 seconds
......@@ -244,7 +244,8 @@ azure_containerize_aks:
stage: containerize
needs: ["compile-and-unit-test"]
variables:
IMAGE: ${CI_PROJECT_NAME}-${CI_COMMIT_REF_SLUG}:${CI_COMMIT_SHA}
SHA_IMAGE: ${CI_PROJECT_NAME}-${CI_COMMIT_REF_SLUG}:${CI_COMMIT_SHA}
LATEST_IMAGE: ${CI_PROJECT_NAME}-${CI_COMMIT_REF_SLUG}:latest
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- az --version
......@@ -266,15 +267,15 @@ azure_containerize_aks:
# Gitlab Container Registry
- echo "Startup Jar is $TARGET"
- echo "Local Registry is $CI_REGISTRY_IMAGE/$IMAGE"
- docker build --build-arg JAR_FILE=$TARGET -t $CI_REGISTRY_IMAGE/$IMAGE .
- docker push ${CI_REGISTRY_IMAGE}/$IMAGE
- docker build --build-arg JAR_FILE=$TARGET -t $CI_REGISTRY_IMAGE/$SHA_IMAGE .
- docker push ${CI_REGISTRY_IMAGE}/$SHA_IMAGE
# Azure Container Registry
- az acr login -n $AZURE_AKS_REGISTRY
- echo "Azure Registry is ${AZURE_AKS_REGISTRY}.azurecr.io/$IMAGE"
- docker tag $CI_REGISTRY_IMAGE/$IMAGE ${AZURE_AKS_REGISTRY}.azurecr.io/$IMAGE
- docker push ${AZURE_AKS_REGISTRY}.azurecr.io/$IMAGE
- docker tag $CI_REGISTRY_IMAGE/$SHA_IMAGE ${AZURE_AKS_REGISTRY}.azurecr.io/$SHA_IMAGE
- docker push ${AZURE_AKS_REGISTRY}.azurecr.io/$SHA_IMAGE
- docker tag $CI_REGISTRY_IMAGE/$SHA_IMAGE ${AZURE_AKS_REGISTRY}.azurecr.io/$LATEST_IMAGE
- docker push ${AZURE_AKS_REGISTRY}.azurecr.io/$LATEST_IMAGE
only:
variables:
- $AZURE == 'true'
......
Supports Markdown
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