fix(ci): adjust release trigger + make sure pipelines always run

This commit is contained in:
Songtronix 2020-05-28 18:27:22 +02:00
parent 2ad8172d6f
commit 7fa71c2562
3 changed files with 9 additions and 7 deletions

View File

@ -36,11 +36,13 @@ before_script:
- rm -r target || echo "target doesnt exist, which is fine" - rm -r target || echo "target doesnt exist, which is fine"
- ln -s /dockercache/veloren/target target - 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: 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/recompile.yml
- local: .gitlab/CI/release.yml - local: .gitlab/CI/release.yml
- local: .gitlab/CI/optional-builds.gitlab-ci.yml - local: .gitlab/CI/optional-builds.gitlab-ci.yml

View File

@ -2,7 +2,7 @@
.recompile: .recompile:
rules: rules:
- changes: - changes:
- "*.{rs,ron,toml,vox,png}" - "**/*.{rs,ron,toml,vox,png}"
- "rust-toolchain" - "rust-toolchain"
- ".gitlab-ci.yml" - ".gitlab-ci.yml"
- "*.gitlab-ci.yml" - "**/*.gitlab-ci.yml"

View File

@ -1,4 +1,4 @@
# Template to only run if pushes to master or a tag happened # Template to only run if pushes to master or a tag happened
.release: .release:
rules: 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]+/