From 7fa71c2562aa556892ea38a16bd279e0e8ea4112 Mon Sep 17 00:00:00 2001 From: Songtronix Date: Thu, 28 May 2020 18:27:22 +0200 Subject: [PATCH] fix(ci): adjust release trigger + make sure pipelines always run --- .gitlab-ci.yml | 10 ++++++---- .gitlab/CI/recompile.yml | 4 ++-- .gitlab/CI/release.yml | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4ba7056ae9..1c3a720e0b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -36,11 +36,13 @@ before_script: - rm -r target || echo "target doesnt exist, which is fine" - ln -s /dockercache/veloren/target target +workflow: + rules: + - if: $CI_MERGE_REQUEST_IID + - if: $CI_COMMIT_TAG + - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH + include: - # pipelines run for branches and tags. - # https://docs.gitlab.com/ee/ci/yaml/#workflowrules - # TODO: https://docs.gitlab.com/ee/ci/merge_request_pipelines/pipelines_for_merged_results/index.html#enable-pipelines-for-merged-results - - template: "Workflows/Branch-Pipelines.gitlab-ci.yml" - local: .gitlab/CI/recompile.yml - local: .gitlab/CI/release.yml - local: .gitlab/CI/optional-builds.gitlab-ci.yml diff --git a/.gitlab/CI/recompile.yml b/.gitlab/CI/recompile.yml index 86d1e08783..8ea4a5cfe5 100644 --- a/.gitlab/CI/recompile.yml +++ b/.gitlab/CI/recompile.yml @@ -2,7 +2,7 @@ .recompile: rules: - changes: - - "*.{rs,ron,toml,vox,png}" + - "**/*.{rs,ron,toml,vox,png}" - "rust-toolchain" - ".gitlab-ci.yml" - - "*.gitlab-ci.yml" + - "**/*.gitlab-ci.yml" diff --git a/.gitlab/CI/release.yml b/.gitlab/CI/release.yml index e1f61a850c..98b53a0d32 100644 --- a/.gitlab/CI/release.yml +++ b/.gitlab/CI/release.yml @@ -1,4 +1,4 @@ # Template to only run if pushes to master or a tag happened .release: rules: - - if: $CI_COMMIT_REF_NAME =~ /^master.$/ || $CI_COMMIT_REF_NAME =~ /^r[0-9]+\.[0-9]+\.[0-9]+/ || $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+/ + - if: $CI_COMMIT_REF_NAME =~ /^master$/ || $CI_COMMIT_TAG =~ /^v[0-9]+\.[0-9]+\.[0-9]+/ || $CI_COMMIT_REF_NAME =~ /^r[0-9]+\.[0-9]+/