From 14d76ffaa7a5f0ac2a069da3c89889d90d19b26d Mon Sep 17 00:00:00 2001 From: Jon Azpiazu <jon.azpiazu@tecnalia.com> Date: Thu, 21 Oct 2021 11:06:23 +0200 Subject: [PATCH] Simplify the workflow rules for auto-rules case --- ci-templates/auto-rules/no-default.yml | 29 +++++--------------------- 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/ci-templates/auto-rules/no-default.yml b/ci-templates/auto-rules/no-default.yml index 7fd7dd6..8dbd58f 100644 --- a/ci-templates/auto-rules/no-default.yml +++ b/ci-templates/auto-rules/no-default.yml @@ -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,16 +36,14 @@ industrial_ci_noetic: - if: $DEFAULT_DISTRO == "noetic" - if: $BUILD_NOETIC - ddeploy: extends: .ddeploy rules: - - if: $DEPLOY && $CI_COMMIT_TAG + - if: $CI_COMMIT_TAG exists: - ddeploy.yaml when: always - - if: $DEPLOY - exists: + - exists: - ddeploy.yaml when: manual allow_failure: true -- GitLab