diff --git a/Jenkinsfile b/Jenkinsfile index 3496341c..dcd2ee79 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,29 +30,30 @@ pipeline { steps { script { docker.image(p['docker.container.image.java.main']).inside(p['docker.container.inside.env.full']) { + withCredentials([usernamePassword(credentialsId: p['artifactory.credentials'], usernameVariable: 'ARTIFACTORY_USERNAME', passwordVariable: 'ARTIFACTORY_PASSWORD')]) { + sh "echo 'Setup build environment...'" + sh "ci/setup.sh" - sh "echo 'Setup build environment...'" - sh "ci/setup.sh" + // Cleanup any prior build system resources + try { + sh "echo 'Clean up GemFire/Geode files & build artifacts...'" + sh "ci/cleanupArtifacts.sh" + sh "ci/cleanupGemFiles.sh" + } + catch (ignore) { } - // Cleanup any prior build system resources - try { - sh "echo 'Clean up GemFire/Geode files & build artifacts...'" - sh "ci/cleanupArtifacts.sh" - sh "ci/cleanupGemFiles.sh" - } - catch (ignore) { } - - // Run the SBDG project Gradle build using JDK 8 inside Docker - try { - sh "echo 'Building SBDG...'" - sh "ci/build.sh" - } - catch (e) { - currentBuild.result = "FAILED: build" - throw e - } - finally { - junit '**/build/test-results/*/*.xml' + // Run the SBDG project Gradle build using JDK 8 inside Docker + try { + sh "echo 'Building SBDG...'" + sh "ci/build.sh" + } + catch (e) { + currentBuild.result = "FAILED: build" + throw e + } + finally { + junit '**/build/test-results/*/*.xml' + } } } }