File tree Expand file tree Collapse file tree
jobdsl-gradle/src/jobs/resources/pipelines Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments