INFRA-1697: remove authentication details from gradlew wrapper download and add helper to add them in when ran on CI

This commit is contained in:
Ronan Browne 2022-02-14 17:04:47 +00:00
parent 2902b737fc
commit a21292d03f
12 changed files with 12 additions and 1 deletions

View File

@ -102,6 +102,7 @@ pipeline {
stage('Compile') {
steps {
dir(sameAgentFolder) {
authenticateGradleWrapper()
sh script: [
'./gradlew',
COMMON_GRADLE_PARAMS,

View File

@ -25,6 +25,7 @@ pipeline {
stages {
stage('JDK 11 Compile') {
steps {
authenticateGradleWrapper()
sh "./gradlew --no-daemon -Pcompilation.allWarningsAsErrors=true -Ptests.failFast=false " +
"-Ptests.ignoreFailures=true clean compileAll --stacktrace"
}

View File

@ -56,6 +56,7 @@ pipeline {
stage('Unit Tests') {
agent { label 'mswin' }
steps {
authenticateGradleWrapper()
bat "./gradlew --no-daemon " +
"--stacktrace " +
"-Pcompilation.warningsAsErrors=false " +

View File

@ -49,6 +49,7 @@ pipeline {
stages {
stage('Compile') {
steps {
authenticateGradleWrapper()
sh script: [
'./gradlew',
COMMON_GRADLE_PARAMS,

View File

@ -47,6 +47,7 @@ pipeline {
stages {
stage('Unit Tests') {
steps {
authenticateGradleWrapper()
sh "./gradlew clean --continue test --info -Ptests.failFast=true"
}
}

View File

@ -14,6 +14,7 @@ pipeline {
stages {
stage('Detekt check') {
steps {
authenticateGradleWrapper()
sh "./gradlew --no-daemon clean detekt"
}
}

View File

@ -33,6 +33,7 @@ pipeline {
stage('Publish Archived API Docs to Artifactory') {
when { tag pattern: /^docs-release-os-V(\d+\.\d+)(\.\d+){0,1}(-GA){0,1}(-\d{4}-\d\d-\d\d-\d{4}){0,1}$/, comparator: 'REGEXP' }
steps {
authenticateGradleWrapper()
sh "./gradlew :clean :docs:artifactoryPublish -DpublishApiDocs"
}
}

View File

@ -63,6 +63,7 @@ pipeline {
stages {
stage('Sonatype Check') {
steps {
authenticateGradleWrapper()
sh "./gradlew --no-daemon clean jar"
script {
sh "./gradlew --no-daemon properties | grep -E '^(version|group):' >version-properties"

View File

@ -29,6 +29,7 @@ pipeline {
stages {
stage('Publish to Artifactory') {
steps {
authenticateGradleWrapper()
rtServer (
id: 'R3-Artifactory',
url: 'https://software.r3.com/artifactory',

View File

@ -84,6 +84,7 @@ pipeline {
stages {
stage('Compile') {
steps {
authenticateGradleWrapper()
sh script: [
'./gradlew',
COMMON_GRADLE_PARAMS,

1
Jenkinsfile vendored
View File

@ -52,6 +52,7 @@ pipeline {
stages {
stage('Compile') {
steps {
authenticateGradleWrapper()
sh script: [
'./gradlew',
COMMON_GRADLE_PARAMS,

View File

@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://gradleproxy:gradleproxy@software.r3.com/artifactory/gradle-proxy/gradle-5.6.4-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists