skip_public_branches_template: &SKIP_PUBLIC_BRANCHES_TEMPLATE
skip: $CIRRUS_BRANCH =~ $BRANCH_PATTERN_PUBLIC
+cache_dependencies_dependant_task_template: &CACHE_DEPENDENCIES_DEPENDANT_TASK_TEMPLATE
+ depends_on: cache_dependencies
+
build_dependant_task_template: &BUILD_DEPENDANT_TASK_TEMPLATE
depends_on: build
only_if: $CIRRUS_BRANCH == $BRANCH_NIGHTLY
master_and_nightly_task_template: &MASTER_AND_NIGHTLY_TASK_TEMPLATE
- only_if: $CIRRUS_BRANCH == $BRANCH_NIGHTLY || $CIRRUS_BRANCH == $BRANCH_MAIN
+ only_if: $CIRRUS_BRANCH == $BRANCH_NIGHTLY || $CIRRUS_BRANCH == $BRANCH_MAIN
master_or_nightly_or_maintenance_task_template: &MASTER_OR_NIGHTLY_OR_MAINTENANCE_TASK_TEMPLATE
- only_if: $CIRRUS_BRANCH == $BRANCH_NIGHTLY || $CIRRUS_BRANCH == $BRANCH_MAIN || $CIRRUS_BRANCH =~ $BRANCH_PATTERN_MAINTENANCE
+ only_if: $CIRRUS_BRANCH == $BRANCH_NIGHTLY || $CIRRUS_BRANCH == $BRANCH_MAIN || $CIRRUS_BRANCH =~ $BRANCH_PATTERN_MAINTENANCE
except_nightly_task_template: &EXCEPT_ON_NIGHTLY_TASK_TEMPLATE
only_if: $CIRRUS_BRANCH != $BRANCH_NIGHTLY
gradle_cache_template: &GRADLE_CACHE_TEMPLATE
gradle_cache:
folder: "~/.gradle/caches"
- fingerprint_script: find -type f \( -name "*.gradle*" -or -name "gradle*.properties" \) -exec cat {} +
+ fingerprint_script: find -type f \( -name "*.gradle*" -or -name "gradle*.properties" \) | sort | xargs cat
jar_cache_template: &JAR_CACHE_TEMPLATE
jar_cache:
env:
FETCH_DEPTH: --depth=1
+cache_dependencies_task:
+ <<: *DEFAULT_TEMPLATE
+ <<: *GRADLE_CACHE_TEMPLATE
+ eks_container:
+ <<: *CONTAINER_TEMPLATE
+ cpu: 7.5
+ memory: 8Gb
+ script:
+ - ./private/cirrus/cirrus-cache-dependencies.sh
+ <<: *DEFAULT_ARTIFACTS_TEMPLATE
+
build_task:
<<: *DEFAULT_TEMPLATE
<<: *GRADLE_CACHE_TEMPLATE
<<: *YARN_CACHE_TEMPLATE
<<: *JAR_CACHE_TEMPLATE
+ <<: *CACHE_DEPENDENCIES_DEPENDANT_TASK_TEMPLATE
eks_container:
<<: *CONTAINER_TEMPLATE
cpu: 7.5
<<: *GRADLE_CACHE_TEMPLATE
<<: *YARN_CACHE_TEMPLATE
<<: *ESLINT_REPORT_CACHE_TEMPLATE
+ <<: *CACHE_DEPENDENCIES_DEPENDANT_TASK_TEMPLATE
eks_container:
<<: *CONTAINER_TEMPLATE
cpu: 3
<<: *DEFAULT_TEMPLATE
<<: *GRADLE_CACHE_TEMPLATE
<<: *YARN_CACHE_TEMPLATE
+ <<: *CACHE_DEPENDENCIES_DEPENDANT_TASK_TEMPLATE
eks_container:
<<: *CONTAINER_TEMPLATE
cpu: 3
<<: *GRADLE_CACHE_TEMPLATE
<<: *YARN_CACHE_TEMPLATE
<<: *JEST_REPORT_CACHE_TEMPLATE
+ <<: *CACHE_DEPENDENCIES_DEPENDANT_TASK_TEMPLATE
eks_container:
<<: *CONTAINER_TEMPLATE
cpu: 7.5
<<: *DEFAULT_TEMPLATE
<<: *GRADLE_CACHE_TEMPLATE
<<: *JUNIT_REPORT_CACHE_TEMPLATE
+ <<: *CACHE_DEPENDENCIES_DEPENDANT_TASK_TEMPLATE
eks_container:
<<: *CONTAINER_TEMPLATE
cpu: 7.5
qa_task:
<<: *DEFAULT_TEMPLATE
<<: *BUILD_DEPENDANT_TASK_TEMPLATE
+ <<: *CACHE_DEPENDENCIES_DEPENDANT_TASK_TEMPLATE
<<: *GRADLE_CACHE_TEMPLATE
<<: *JAR_CACHE_TEMPLATE
eks_container:
# GitLab QA is executed in a dedicated task in order to not slow down the pipeline, as a GitLab on-prem server docker image is required.
qa_gitlab_task:
<<: *DEFAULT_TEMPLATE
+ <<: *BUILD_DEPENDANT_TASK_TEMPLATE
<<: *JAR_CACHE_TEMPLATE
<<: *GRADLE_CACHE_TEMPLATE
depends_on:
version = (version.toString().count('.') == 1 ? "${version}.0.${ext.buildNumber}" : "${version}.${ext.buildNumber}").toString()
}
+
+ task cacheDependencies {
+ doLast {
+ configurations.each { conf ->
+ if (conf.isCanBeResolved()) {
+ if (conf.getName() != 'appZip')
+ conf.resolve()
+ }
+ }
+ }
+ }
+
ext {
release = project.hasProperty('release') && project.getProperty('release')
official = project.hasProperty('official') && project.getProperty('official')
}
}
+
gradle.buildFinished {
if (!failedTests.empty) {
println "\nFailed tests:"