Skip to content

Commit e0d57db

Browse files
committed
Remove Docker Registry access (login).
1 parent 9a17e8f commit e0d57db

File tree

1 file changed

+40
-46
lines changed

1 file changed

+40
-46
lines changed

Jenkinsfile

Lines changed: 40 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -26,32 +26,30 @@ pipeline {
2626
}
2727
steps {
2828
script {
29-
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
30-
docker.image(p['docker.container.image.java.main']).inside(p['docker.container.inside.env.full']) {
29+
docker.image(p['docker.container.image.java.main']).inside(p['docker.container.inside.env.full']) {
3130

32-
sh "echo 'Setup build environment...'"
33-
sh "ci/setup.sh"
31+
sh "echo 'Setup build environment...'"
32+
sh "ci/setup.sh"
3433

35-
// Cleanup any prior build system resources
36-
try {
37-
sh "echo 'Clean up GemFire/Geode files & build artifacts...'"
38-
sh "ci/cleanupGemFiles.sh"
39-
sh "ci/cleanupArtifacts.sh"
40-
}
41-
catch (ignore) { }
34+
// Cleanup any prior build system resources
35+
try {
36+
sh "echo 'Clean up GemFire/Geode files & build artifacts...'"
37+
sh "ci/cleanupGemFiles.sh"
38+
sh "ci/cleanupArtifacts.sh"
39+
}
40+
catch (ignore) { }
4241

43-
// Run the SBDG project Gradle build using JDK 8 inside Docker
44-
try {
45-
sh "echo 'Building SBDG...'"
46-
sh "ci/check.sh"
47-
}
48-
catch (e) {
49-
currentBuild.result = "FAILED: build"
50-
throw e
51-
}
52-
finally {
53-
junit '**/build/test-results/*/*.xml'
54-
}
42+
// Run the SBDG project Gradle build using JDK 8 inside Docker
43+
try {
44+
sh "echo 'Building SBDG...'"
45+
sh "ci/check.sh"
46+
}
47+
catch (e) {
48+
currentBuild.result = "FAILED: build"
49+
throw e
50+
}
51+
finally {
52+
junit '**/build/test-results/*/*.xml'
5553
}
5654
}
5755
}
@@ -64,16 +62,14 @@ pipeline {
6462
}
6563
steps {
6664
script {
67-
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
68-
docker.image(p['docker.container.image.java.main']).inside(p['docker.container.inside.env.basic']) {
69-
withCredentials([file(credentialsId: 'docs.spring.io-jenkins_private_ssh_key', variable: 'DEPLOY_SSH_KEY')]) {
70-
try {
71-
sh "ci/deployDocs.sh"
72-
}
73-
catch (e) {
74-
currentBuild.result = "FAILED: deploy docs"
75-
throw e
76-
}
65+
docker.image(p['docker.container.image.java.main']).inside(p['docker.container.inside.env.basic']) {
66+
withCredentials([file(credentialsId: 'docs.spring.io-jenkins_private_ssh_key', variable: 'DEPLOY_SSH_KEY')]) {
67+
try {
68+
sh "ci/deployDocs.sh"
69+
}
70+
catch (e) {
71+
currentBuild.result = "FAILED: deploy docs"
72+
throw e
7773
}
7874
}
7975
}
@@ -87,19 +83,17 @@ pipeline {
8783
}
8884
steps {
8985
script {
90-
docker.withRegistry(p['docker.registry'], p['docker.credentials']) {
91-
docker.image(p['docker.container.image.java.main']).inside(p['docker.container.inside.env.basic']) {
92-
withCredentials([file(credentialsId: 'spring-signing-secring.gpg', variable: 'SIGNING_KEYRING_FILE')]) {
93-
withCredentials([string(credentialsId: 'spring-gpg-passphrase', variable: 'SIGNING_PASSWORD')]) {
94-
withCredentials([usernamePassword(credentialsId: 'oss-token', usernameVariable: 'OSSRH_USERNAME', passwordVariable: 'OSSRH_PASSWORD')]) {
95-
withCredentials([usernamePassword(credentialsId: p['artifactory.credentials'], usernameVariable: 'ARTIFACTORY_USERNAME', passwordVariable: 'ARTIFACTORY_PASSWORD')]) {
96-
try {
97-
sh "ci/deployArtifacts.sh"
98-
}
99-
catch (e) {
100-
currentBuild.result = "FAILED: deploy artifacts"
101-
throw e
102-
}
86+
docker.image(p['docker.container.image.java.main']).inside(p['docker.container.inside.env.basic']) {
87+
withCredentials([file(credentialsId: 'spring-signing-secring.gpg', variable: 'SIGNING_KEYRING_FILE')]) {
88+
withCredentials([string(credentialsId: 'spring-gpg-passphrase', variable: 'SIGNING_PASSWORD')]) {
89+
withCredentials([usernamePassword(credentialsId: 'oss-token', usernameVariable: 'OSSRH_USERNAME', passwordVariable: 'OSSRH_PASSWORD')]) {
90+
withCredentials([usernamePassword(credentialsId: p['artifactory.credentials'], usernameVariable: 'ARTIFACTORY_USERNAME', passwordVariable: 'ARTIFACTORY_PASSWORD')]) {
91+
try {
92+
sh "ci/deployArtifacts.sh"
93+
}
94+
catch (e) {
95+
currentBuild.result = "FAILED: deploy artifacts"
96+
throw e
10397
}
10498
}
10599
}

0 commit comments

Comments
 (0)