Skip to content
Snippets Groups Projects
Commit f7533cdf authored by Prada Sarasola, Miguel's avatar Prada Sarasola, Miguel
Browse files

Use image name instead of ID when checking required deploy image labels

parent 54eb1a1e
No related branches found
No related tags found
1 merge request!84Resolve "Ddeploy job failing when enforcing labels"
...@@ -42,8 +42,8 @@ ...@@ -42,8 +42,8 @@
# Run ddeploy # Run ddeploy
- ddeploy --yaml ${DDEPLOY_YAML} - ddeploy --yaml ${DDEPLOY_YAML}
# Get ID of image created by ddeploy # Get ID of image created by ddeploy
- 'DOCKER_ID=$(docker images --format="{{.ID}}" | head -1)' - '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 -- ${DOCKER_ID} - 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. # Tag and push with the branch or tag name.
- echo "Pushing to ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${DOCKER_PUSH_TAG}" - 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} - docker tag ${DOCKER_ID} ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${DOCKER_PUSH_TAG}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment