From: Malena Ebert <63863184+malena-ebert-sonarsource@users.noreply.github.com> Date: Thu, 15 Oct 2020 12:01:41 +0000 (+0200) Subject: Cirrus Cron Invocation X-Git-Tag: 8.6.0.39681~170 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bb0e01eefc48fb8a5e6c1f7b3cc57fb3e4e2a04c;p=sonarqube.git Cirrus Cron Invocation * nightly cron: only owasp scan on master * weekly-lts cron: only owasp scan on current lts branch --- diff --git a/.cirrus.yml b/.cirrus.yml index 5b5588fb709..099113881b4 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -32,6 +32,14 @@ task_only_nightly_depending_on_build_template: &TASK_ONLY_NIGHTLY_DEPENDING_ON_B # this task on your branch only_if: $CIRRUS_BRANCH == "branch-nightly-build" +task_only_default_depending_on_build_template: &TASK_ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE + depends_on: build + only_if: >- + $CIRRUS_BRANCH !=~ "dogfood/.*" && + $CIRRUS_BRANCH != "public_master" && + $CIRRUS_BRANCH != "branch-nightly-build" && + $CIRRUS_CRON == "" + docker_build_container_template: &GKE_CONTAINER_TEMPLATE dockerfile: private/docker/Dockerfile-build builder_image_project: sonarqube-team @@ -74,7 +82,10 @@ screenshots_on_failure_template: &REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE path: "**/build/screenshots/**/*" build_task: - only_if: $CIRRUS_BRANCH !=~ "dogfood/.*" && $CIRRUS_BRANCH != "public_master" + only_if: >- + $CIRRUS_BRANCH !=~ "dogfood/.*" && + $CIRRUS_BRANCH != "public_master" && + $CIRRUS_CRON == "" timeout_in: 90m gke_container: <<: *GKE_CONTAINER_TEMPLATE @@ -105,8 +116,7 @@ deploy_docs_task: - ./private/cirrus/cirrus-trigger-deploy-docs.sh validate_task: - depends_on: build - only_if: $CIRRUS_BRANCH !=~ "dogfood/.*" && $CIRRUS_BRANCH != "public_master" && $CIRRUS_BRANCH != "branch-nightly-build" + <<: *TASK_ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE timeout_in: 90m gke_container: <<: *GKE_CONTAINER_TEMPLATE @@ -120,8 +130,7 @@ validate_task: <<: *REPORTS_JUNIT_ON_FAILURE_TEMPLATE qa_task: - depends_on: build - only_if: $CIRRUS_BRANCH !=~ "dogfood/.*" && $CIRRUS_BRANCH != "public_master" && $CIRRUS_BRANCH != "branch-nightly-build" + <<: *TASK_ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE gke_container: <<: *GKE_CONTAINER_TEMPLATE cpu: 3 @@ -265,13 +274,13 @@ qa_ldap_task: <<: *REPORTS_JUNIT_SCREENSHOTS_ON_FAILURE_TEMPLATE promote_task: + <<: *TASK_ONLY_DEFAUT_DEPENDING_ON_BUILD_TEMPLATE depends_on: - build - validate - qa - qa_saml - qa_ldap - only_if: $CIRRUS_BRANCH !=~ "dogfood/.*" && $CIRRUS_BRANCH != "public_master" && $CIRRUS_BRANCH != "branch-nightly-build" gke_container: <<: *GKE_CONTAINER_TEMPLATE stateful: true @@ -381,7 +390,9 @@ upgd_oracle12_task: # Software Composition Analysis (SCA): check potential vulnerabilities in dependencies. # Note that license compliance of dependencies is not checked for now. owasp_check_task: - only_if: $CIRRUS_CRON == "nightly" + only_if: >- + $CIRRUS_CRON == "nightly" || + $CIRRUS_CRON == "weekly-lts" timeout_in: 30m gke_container: <<: *GKE_CONTAINER_TEMPLATE