Skip to content

Commit 41d1c2e

Browse files
drBosseEwelina Wilkosz
authored andcommitted
Fix #206 (#212)
1 parent b84d17f commit 41d1c2e

1 file changed

Lines changed: 20 additions & 4 deletions

File tree

jobdsl-gradle/src/jobs/resources/pipelines/jenkinsdeploy.groovy

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,26 @@ node(env.utility_slave) {
88
userRemoteConfigs: [[credentialsId: env.default_credentials, url: env.default_repo]]])
99
}
1010

11-
stage('Verify JobDSL') {
12-
sh 'cd jobdsl-gradle && ./gradlew buildXml'
13-
sh 'cd jobdsl-gradle && ./gradlew test'
14-
}
11+
stage('Verify JobDSL') {
12+
proxyHTTP = ""
13+
if(env.http_proxy) {
14+
def tokens = env.http_proxy.replace("http://", "").replace("https://", "").split(':')
15+
def host = tokens[0]
16+
def port = tokens[1]
17+
proxyHTTP = "-Dhttp.proxyHost=${host} -Dhttp.proxyPort=${port}"
18+
}
19+
20+
proxyHTTPS = ""
21+
if(env.https_proxy) {
22+
def tokens = env.https_proxy.replace("http://", "").replace("https://", "").split(':')
23+
def host = tokens[0]
24+
def port = tokens[1]
25+
proxyHTTPS = "-Dhttps.proxyHost=${host} -Dhttps.proxyPort=${port}"
26+
}
27+
28+
sh "cd jobdsl-gradle && ./gradlew ${proxyHTTP} ${proxyHTTPS} buildXml"
29+
sh "cd jobdsl-gradle && ./gradlew ${proxyHTTP} ${proxyHTTPS} test"
30+
}
1531

1632
stage('Build master Docker image') {
1733
// docker pipeline plugin build command does not implement to take arguments yet

0 commit comments

Comments
 (0)