From f7533cdfddad8062cbfd84ce89f6eb4492d95e8d Mon Sep 17 00:00:00 2001 From: Miguel Prada <miguel.prada@tecnalia.com> Date: Thu, 13 Jul 2023 16:16:12 +0200 Subject: [PATCH] Use image name instead of ID when checking required deploy image labels --- ci-templates/industrial-ci-templates.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ci-templates/industrial-ci-templates.yml b/ci-templates/industrial-ci-templates.yml index f2c99ba..15fcfaf 100644 --- a/ci-templates/industrial-ci-templates.yml +++ b/ci-templates/industrial-ci-templates.yml @@ -42,8 +42,8 @@ # Run ddeploy - ddeploy --yaml ${DDEPLOY_YAML} # Get ID of image created by ddeploy - - 'DOCKER_ID=$(docker images --format="{{.ID}}" | head -1)' - - curl -Ls https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/${GITLAB_TEMPLATES_BRANCH}/scripts/enforce_labels.bash | bash -s -- ${DOCKER_ID} + - 'DDEPLOY_IMAGE_NAME=$(docker images --format="{{.Repository}}:{{.Tag}}" | head -1)' + - curl -Ls https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/${GITLAB_TEMPLATES_BRANCH}/scripts/enforce_labels.bash | bash -s -- ${DDEPLOY_IMAGE_NAME} # Tag and push with the branch or tag name. - echo "Pushing to ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${DOCKER_PUSH_TAG}" - docker tag ${DOCKER_ID} ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${DOCKER_PUSH_TAG} -- GitLab