From 6a0b24f31a59a7170e651ae23f299243ca4df679 Mon Sep 17 00:00:00 2001 From: Wouter Admiraal Date: Thu, 7 Jan 2021 13:13:20 +0100 Subject: [PATCH] Allow execution of extended validate task if only updating license headers --- .cirrus.yml | 31 ++++++++++++++++++++++++++++--- 1 file 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: -- 2.39.5