diff options
author | Wouter Admiraal <wouter.admiraal@sonarsource.com> | 2021-01-07 13:13:20 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2021-01-08 20:14:46 +0000 |
commit | 6a0b24f31a59a7170e651ae23f299243ca4df679 (patch) | |
tree | ab6de63b6a0f00a14d3446d6cadfba4eaf97fdc8 | |
parent | a99185baad6fadbee9b984d323cc4f367aabad35 (diff) | |
download | sonarqube-6a0b24f31a59a7170e651ae23f299243ca4df679.tar.gz sonarqube-6a0b24f31a59a7170e651ae23f299243ca4df679.zip |
Allow execution of extended validate task if only updating license headers
-rw-r--r-- | .cirrus.yml | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/.cirrus.yml b/.cirrus.yml index e9f376a54a9..4e48eb42c8e 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -38,7 +38,8 @@ task_only_default_depending_on_build_template: &TASK_ONLY_DEFAUT_DEPENDING_ON_BU $CIRRUS_BRANCH !=~ "dogfood/.*" && $CIRRUS_BRANCH != "public_master" && $CIRRUS_BRANCH != "branch-nightly-build" && - $CIRRUS_CRON == "" + $CIRRUS_CRON == "" && + $CIRRUS_CHANGE_MESSAGE !=~ '.*\[update headers\].*' docker_build_container_template: &GKE_CONTAINER_TEMPLATE dockerfile: private/docker/Dockerfile-build @@ -115,7 +116,7 @@ deploy_docs_task: script: - ./private/cirrus/cirrus-trigger-deploy-docs.sh -validate_task: +validate_task: &VALIDATE_TASK <<: *TASK_ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE timeout_in: 90m gke_container: @@ -129,6 +130,17 @@ validate_task: on_failure: <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE +validate_license_change_task: + <<: *VALIDATE_TASK + name: validate # Give it the same name as its counterpart, so we can reference it on GitHub. + only_if: >- # Only execute if the commit message has the "[update headers]" tag. + $CIRRUS_BRANCH !=~ "dogfood/.*" && + $CIRRUS_BRANCH != "public_master" && + $CIRRUS_BRANCH != "branch-nightly-build" && + $CIRRUS_CRON == "" && + $CIRRUS_CHANGE_MESSAGE =~ '.*\[update headers\].*' + timeout_in: 180m # Increase timeout, as license changes impact all files, which slows down the analysis considerably. + qa_task: <<: *TASK_ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE gke_container: @@ -324,7 +336,7 @@ qa_ldap_task: on_failure: <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE -promote_task: +promote_task: &PROMOTE_TASK <<: *TASK_ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE depends_on: - build @@ -343,6 +355,19 @@ promote_task: script: - ./private/cirrus/cirrus-promote.sh +promote_license_change_task: + <<: *PROMOTE_TASK + name: promote # Give it the same name as its counterpart, so we can reference it on GitHub. + only_if: >- # Only execute if the commit message has the "[update headers]" tag. + $CIRRUS_BRANCH !=~ "dogfood/.*" && + $CIRRUS_BRANCH != "public_master" && + $CIRRUS_BRANCH != "branch-nightly-build" && + $CIRRUS_CRON == "" && + $CIRRUS_CHANGE_MESSAGE =~ '.*\[update headers\].*' + depends_on: + - build + - validate + sql_mssql2017_task: <<: *TASK_ONLY_NIGHTLY_DEPENDING_ON_BUILD_TEMPLATE gke_container: |