Update ci_templates/.cic-template.yml

This commit is contained in:
Blair Vanderlugt 2021-03-01 14:35:53 +00:00
parent ba8a0b1953
commit 451079d004

View File

@ -40,11 +40,12 @@ before_script:
- echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" $CI_REGISTRY --password-stdin - echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" $CI_REGISTRY --password-stdin
variables: variables:
CI_DEBUG_TRACE: "true" CI_DEBUG_TRACE: "true"
IMAGE_TAG: $CI_REGISTRY_IMAGE/$APP_NAME:$CI_COMMIT_BRANCH-$CI_COMMIT_SHORT_SHA-$(date +%F.%H%M%S) IMAGE_TAG_BASE: $CI_REGISTRY_IMAGE/$APP_NAME:$CI_COMMIT_BRANCH-$CI_COMMIT_SHORT_SHA
LATEST_TAG: $CI_REGISTRY_IMAGE/$APP_NAME:latest LATEST_TAG: $CI_REGISTRY_IMAGE/$APP_NAME:latest
script: script:
- export IMAGE_TAG="$IMAGE_TAG_BASE-$(date +%F.%H%M%S)"
- docker build -t $IMAGE_TAG -f $DOCKERFILE_PATH . - docker build -t $IMAGE_TAG -f $DOCKERFILE_PATH .
- docker push $IMAGE_TAG - docker push "$IMAGE_TAG
- docker tag $IMAGE_TAG $LATEST_TAG - docker tag $IMAGE_TAG $LATEST_TAG
- docker push $LATEST_TAG - docker push $LATEST_TAG
rules: rules: