# Depth of 1 is not enough because it would fail the build in case of consecutive pushes
# (example of error: "Hard resetting to c968ecaf7a1942dacecd78480b3751ac74d53c33...Failed to force reset to c968ecaf7a1942dacecd78480b3751ac74d53c33: object not found!")
CIRRUS_CLONE_DEPTH: 50
+ ORG_GRADLE_PROJECT_signingKey: ENCRYPTED[!54147bd7fb86bbe802fd432fab7d53bee19e71fe642d7b57703ec985b10f1976602adc743a906ea9851e5dd793be540c!]
+ ORG_GRADLE_PROJECT_signingPassword: ENCRYPTED[!15c41fa6fdc13ace4a011693a002664593e038f91a2597fad40f4295f0de9858a587c504f5b9f1f97250f19fd5f4a655!]
script:
- ./private/cirrus/cirrus-build.sh
on_failure:
id 'com.github.hierynomus.license' version '0.15.0'
id 'com.github.johnrengelman.shadow' version '5.2.0' apply false
id 'com.google.protobuf' version '0.8.13' apply false
- id 'com.jfrog.artifactory' version '4.18.0'
+ id 'com.jfrog.artifactory' version '4.21.0'
id 'com.github.node-gradle.node' version '2.2.4' apply false
id 'io.spring.dependency-management' version '1.0.10.RELEASE'
id "com.asarkar.gradle.build-time-tracker" version "2.0.4" apply false
artifactory {
clientConfig.setIncludeEnvVars(true)
- clientConfig.setEnvVarsExcludePatterns('*password*,*PASSWORD*,*secret*,*MAVEN_CMD_LINE_ARGS*,sun.java.command,*token*,*TOKEN*,*LOGIN*,*login*,*key*,*KEY*')
+ clientConfig.setEnvVarsExcludePatterns('*password*,*PASSWORD*,*secret*,*MAVEN_CMD_LINE_ARGS*,sun.java.command,*token*,*TOKEN*,*LOGIN*,*login*,*key*,*KEY*,*signing*')
contextUrl = System.getenv('ARTIFACTORY_URL')
publish {
repository {
apply plugin: 'jacoco'
apply plugin: 'java'
apply plugin: 'idea'
+ apply plugin: 'signing'
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
}
}
+
+ signing {
+ def signingKey = findProperty("signingKey")
+ def signingPassword = findProperty("signingPassword")
+ useInMemoryPgpKeys(signingKey, signingPassword)
+ required {
+ def branch = System.getenv()["CIRRUS_BRANCH"]
+ return (branch == 'master' || branch ==~ 'branch-[\\d.]+') &&
+ gradle.taskGraph.hasTask(":artifactoryPublish")
+ }
+ sign publishing.publications
+ }
+
+ tasks.withType(Sign) {
+ onlyIf {
+ def branch = System.getenv()["CIRRUS_BRANCH"]
+ return !artifactoryPublish.skip &&
+ (branch == 'master' || branch ==~ 'branch-[\\d.]+') &&
+ gradle.taskGraph.hasTask(":artifactoryPublish")
+ }
+ }
}