mirror of
https://github.com/SAP/jenkins-library.git
synced 2025-01-18 05:18:24 +02:00
Docker pull not hard coded anymore
This commit is contained in:
parent
dc86bad480
commit
8184312262
@ -64,7 +64,7 @@ class XsDeployTest extends BasePiperTest {
|
||||
@Before
|
||||
public void init() {
|
||||
helper.registerAllowedMethod('withEnv', [List, Closure], {l, c -> env = l; c()})
|
||||
shellRule.setReturnValue(JenkinsShellCallRule.Type.REGEX, '.*getConfig.*--contextConfig.*', '{"dockerImage": "xs", "credentialsId":"myCreds"}')
|
||||
shellRule.setReturnValue(JenkinsShellCallRule.Type.REGEX, '.*getConfig.*--contextConfig.*', '{"dockerImage": "xs", "dockerPullImage": false, "credentialsId":"myCreds"}')
|
||||
shellRule.setReturnValue(JenkinsShellCallRule.Type.REGEX, 'getConfig.* (?!--contextConfig)', '{"mode": "BG_DEPLOY", "action": "NONE", "apiUrl": "https://example.org/xs", "org": "myOrg", "space": "mySpace"}')
|
||||
nullScript.commonPipelineEnvironment.xsDeploymentId = null
|
||||
}
|
||||
|
@ -119,7 +119,7 @@ void call(Map parameters = [:]) {
|
||||
passwordVariable: 'PASSWORD',
|
||||
usernameVariable: 'USERNAME')]) {
|
||||
|
||||
dockerExecute([script: this].plus([dockerImage: contextConfig.dockerImage, dockerPullImage: false])) {
|
||||
dockerExecute([script: this].plus([dockerImage: contextConfig.dockerImage, dockerPullImage: contextConfig.dockerPullImage])) {
|
||||
xsDeployStdout = sh returnStdout: true, script: """#!/bin/bash
|
||||
./piper xsDeploy --defaultConfig ${configFiles} --user \${USERNAME} --password \${PASSWORD} ${operationId ? "--operationId " + operationId : "" }
|
||||
"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user