From 0536cf0aa64d63743f650ee37ba7f7514a787523 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1igo=20Moreno=20i=20Caireta?= <inigo.moreno@tecnalia.com> Date: Wed, 12 Jul 2023 15:39:50 +0200 Subject: [PATCH] Allow changing branch from which pulling enforce_labels --- ci-templates/industrial-ci-templates.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ci-templates/industrial-ci-templates.yml b/ci-templates/industrial-ci-templates.yml index acef8ec..73eff4f 100644 --- a/ci-templates/industrial-ci-templates.yml +++ b/ci-templates/industrial-ci-templates.yml @@ -21,6 +21,7 @@ DOCKER_PUSH_NAME: ${CI_PROJECT_PATH} DOCKER_PUSH_TAG: ${CI_COMMIT_REF_NAME} DDEPLOY_YAML: ddeploy.yaml + GITLAB_TEMPLATES_BRANCH: master before_script: - apk add --update python3 git py3-pip git-lfs bash curl jq # forward the SSH authentication into the Docker executor @@ -42,7 +43,7 @@ - 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/master/scripts/enforce_labels.bash | bash -s -- ${DOCKER_ID} + - curl -Ls https://git.code.tecnalia.com/tecnalia_robotics-public/gitlab_templates/raw/${GITLAB_TEMPLATES_BRANCH}/scripts/enforce_labels.bash | bash -s -- ${DOCKER_ID} # 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