1
0
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:
Marcus Holl 2019-12-20 14:41:17 +01:00
parent dc86bad480
commit 8184312262
2 changed files with 2 additions and 2 deletions

View File

@ -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
}

View File

@ -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 : "" }
"""