Skip to content
Snippets Groups Projects
Commit 289d58f9 authored by Iñigo Moreno i Caireta's avatar Iñigo Moreno i Caireta
Browse files

Merge branch '38-update-deprecated-deploy-job' of...

Merge branch '38-update-deprecated-deploy-job' of git.code.tecnalia.com:tecnalia_robotics-public/gitlab_templates into 38-update-deprecated-deploy-job
parents 83c2e653 14d76ffa
No related branches found
No related tags found
1 merge request!70Resolve "Update deprecated deploy job"
Pipeline #59117 passed
......@@ -2,32 +2,15 @@ include: ci-templates/core.yml
workflow:
rules:
- if: $CI_COMMIT_BRANCH && $CI_COMMIT_REF_NAME =~ /^kinetic-.*/
- if: $CI_COMMIT_REF_NAME =~ /^kinetic-.*/
variables:
DEFAULT_DISTRO: "kinetic"
- if: $CI_COMMIT_BRANCH && $CI_COMMIT_REF_NAME =~ /^melodic-.*/
- if: $CI_COMMIT_REF_NAME =~ /^melodic-.*/
variables:
DEFAULT_DISTRO: "melodic"
- if: $CI_COMMIT_BRANCH && $CI_COMMIT_REF_NAME =~ /^noetic-.*/
- if: $CI_COMMIT_REF_NAME =~ /^noetic-.*/
variables:
DEFAULT_DISTRO: "noetic"
- if: $CI_COMMIT_TAG && $CI_COMMIT_REF_NAME =~ /^kinetic-.*/
variables:
DEFAULT_DISTRO: "kinetic"
DEPLOY: "true"
- if: $CI_COMMIT_TAG && $CI_COMMIT_REF_NAME =~ /^melodic-.*/
variables:
DEFAULT_DISTRO: "melodic"
DEPLOY: "true"
- if: $CI_COMMIT_TAG && $CI_COMMIT_REF_NAME =~ /^noetic-.*/
variables:
DEFAULT_DISTRO: "noetic"
DEPLOY: "true"
- if: $CI_COMMIT_TAG
variables:
DEPLOY: "true"
- if: $CI_COMMIT_BRANCH
industrial_ci_kinetic:
extends: .industrial_ci
......@@ -53,36 +36,14 @@ industrial_ci_noetic:
- if: $DEFAULT_DISTRO == "noetic"
- if: $BUILD_NOETIC
ddeploy_kinetic:
extends: .ddeploy
rules:
- if: $DEPLOY && ($DEFAULT_DISTRO == "kinetic" || $BUILD_KINETIC)
exists:
- ddeploy.yaml
- if: $DEFAULT_DISTRO == "kinetic" || $BUILD_KINETIC
exists:
- ddeploy.yaml
when: manual
ddeploy_melodic:
extends: .ddeploy
rules:
- if: $DEPLOY && ($DEFAULT_DISTRO == "melodic" || $BUILD_MELODIC)
exists:
- ddeploy.yaml
- if: $DEFAULT_DISTRO == "melodic" || $BUILD_MELODIC
exists:
- ddeploy.yaml
when: manual
ddeploy_noetic:
ddeploy:
extends: .ddeploy
rules:
- if: $DEPLOY && ($DEFAULT_DISTRO == "noetic" || $BUILD_NOETIC)
- if: $CI_COMMIT_TAG
exists:
- ddeploy.yaml
- if: $DEFAULT_DISTRO == "noetic" || $BUILD_NOETIC
exists:
when: always
- exists:
- ddeploy.yaml
when: manual
allow_failure: true
......@@ -41,10 +41,15 @@
# Run ddeploy
- ddeploy --yaml ${DDEPLOY_YAML}
# Get ID of image created by ddeploy
- DOCKER_ID=`docker images --format='{{.ID}}' | head -1`
- 'DOCKER_ID=$(docker images --format="{{.ID}}" | head -1)'
# Tag and push
- docker tag ${DOCKER_ID} ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${DOCKER_PUSH_TAG}
- docker push ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:${DOCKER_PUSH_TAG}
# Tag and push latest
- docker tag ${DOCKER_ID} ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:latest
- docker push ${DOCKER_PUSH_REGISTRY}/${DOCKER_PUSH_NAME}:latest
rules:
- if: $CI_COMMIT_TAG
when: always
- when: manual
allow_failure: true
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment