1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-18 05:18:24 +02:00

User piper docker images (#920)

This commit is contained in:
Daniel Kurzynski 2019-10-25 17:49:54 +02:00 committed by Florian Wilhelm
parent 84ad9d49e6
commit 462c293c9c
5 changed files with 27 additions and 27 deletions

View File

@ -46,7 +46,7 @@ export ON_K8S=true"
```
```groovy
dockerExecuteOnKubernetes(script: script, containerMap: ['maven:3.5-jdk-8-alpine': 'maven', 's4sdk/docker-cf-cli': 'cfcli']){
dockerExecuteOnKubernetes(script: script, containerMap: ['maven:3.5-jdk-8-alpine': 'maven', 'ppiper/cf-cli': 'cfcli']){
container('maven'){
sh "mvn clean install"
}

View File

@ -167,10 +167,10 @@ steps:
- 'deployDescriptor'
- 'pipelineConfigAndTests'
cf_native:
dockerImage: 's4sdk/docker-cf-cli'
dockerImage: 'ppiper/cf-cli'
dockerWorkspace: '/home/piper'
mtaDeployPlugin:
dockerImage: 's4sdk/docker-cf-cli'
dockerImage: 'ppiper/cf-cli'
dockerWorkspace: '/home/piper'
containerExecuteStructureTests:
containerCommand: '/busybox/tail -f /dev/null'
@ -328,7 +328,7 @@ steps:
mtaJarLocation: '/opt/sap/mta/lib/mta.jar'
dockerImage: 'ppiper/mta-archive-builder'
neoDeploy:
dockerImage: 's4sdk/docker-neo-cli'
dockerImage: 'ppiper/neo-cli'
deployMode: 'mta'
warAction: 'deploy'
extensions: []

View File

@ -152,7 +152,7 @@ class CloudFoundryDeployTest extends BasePiperTest {
cfManifest: 'test.yml'
])
// asserts
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 's4sdk/docker-cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 'ppiper/cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerWorkspace', '/home/piper'))
assertThat(dockerExecuteRule.dockerParams.dockerEnvVars, hasEntry('STATUS_CODE', "${200}"))
assertThat(shellRule.shell, hasItem(containsString('cf login -u "test_cf" -p \'********\' -a https://api.cf.eu10.hana.ondemand.com -o "testOrg" -s "testSpace"')))
@ -204,7 +204,7 @@ class CloudFoundryDeployTest extends BasePiperTest {
]
])
// asserts
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 's4sdk/docker-cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 'ppiper/cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerWorkspace', '/home/piper'))
assertThat(dockerExecuteRule.dockerParams.dockerEnvVars, hasEntry('STATUS_CODE', "${200}"))
assertThat(shellRule.shell, hasItem(containsString('cf login -u "test_cf" -p \'********\' -a https://api.cf.eu10.hana.ondemand.com -o "testOrg" -s "testSpace"')))
@ -278,7 +278,7 @@ class CloudFoundryDeployTest extends BasePiperTest {
cfManifest: 'test.yml'
])
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 's4sdk/docker-cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 'ppiper/cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerWorkspace', '/home/piper'))
assertThat(shellRule.shell, hasItem(containsString('cf login -u "test_cf" -p \'********\' -a https://api.cf.eu10.hana.ondemand.com -o "testOrg" -s "testSpace"')))
@ -306,7 +306,7 @@ class CloudFoundryDeployTest extends BasePiperTest {
cfManifest: 'test.yml'
])
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 's4sdk/docker-cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 'ppiper/cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerWorkspace', '/home/piper'))
assertThat(shellRule.shell, hasItem(containsString('cf login -u "test_cf" -p \'********\' -a https://api.cf.eu10.hana.ondemand.com -o "testOrg" -s "testSpace"')))
@ -335,7 +335,7 @@ class CloudFoundryDeployTest extends BasePiperTest {
cfManifest: 'test.yml'
])
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 's4sdk/docker-cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 'ppiper/cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerWorkspace', '/home/piper'))
assertThat(shellRule.shell, hasItem(containsString('cf login -u "test_cf" -p \'********\' -a https://api.cf.eu10.hana.ondemand.com -o "testOrg" -s "testSpace"')))
@ -373,7 +373,7 @@ class CloudFoundryDeployTest extends BasePiperTest {
cfManifest: 'test.yml'
])
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 's4sdk/docker-cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 'ppiper/cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerWorkspace', '/home/piper'))
assertThat(shellRule.shell, hasItem(containsString('cf login -u "test_cf" -p \'********\' -a https://api.cf.eu10.hana.ondemand.com -o "testOrg" -s "testSpace"')))
@ -469,7 +469,7 @@ class CloudFoundryDeployTest extends BasePiperTest {
mtaPath: 'target/test.mtar'
])
// asserts
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 's4sdk/docker-cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 'ppiper/cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerWorkspace', '/home/piper'))
assertThat(shellRule.shell, hasItem(containsString('cf login -u "test_cf" -p \'********\' -a https://api.cf.eu10.hana.ondemand.com -o "testOrg" -s "testSpace"')))
assertThat(shellRule.shell, hasItem(containsString('cf deploy target/test.mtar -f')))
@ -545,7 +545,7 @@ class CloudFoundryDeployTest extends BasePiperTest {
cfManifestVariablesFiles: ['vars.yml']
])
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 's4sdk/docker-cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 'ppiper/cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerWorkspace', '/home/piper'))
assertThat(dockerExecuteRule.dockerParams.dockerEnvVars, hasEntry('STATUS_CODE', "${200}"))
assertThat(shellRule.shell, hasItem(containsString('cf login -u "test_cf" -p \'********\' -a https://api.cf.eu10.hana.ondemand.com -o "testOrg" -s "testSpace"')))
@ -558,7 +558,7 @@ class CloudFoundryDeployTest extends BasePiperTest {
@Test
void testCfPushDeploymentWithVariableSubstitutionFromNotExistingFilePrintsWarning() {
readYamlRule.registerYaml('test.yml', "applications: [[name: '((appName))']]")
fileExistsRule.registerExistingFile('test.yml')
fileExistsRule.registerExistingFile('test.yml')
stepRule.step.cloudFoundryDeploy([
script: nullScript,
@ -574,15 +574,15 @@ class CloudFoundryDeployTest extends BasePiperTest {
])
// asserts
assertThat(shellRule.shell, hasItem(containsString("cf push testAppName -f 'test.yml'")))
assertThat(shellRule.shell, hasItem(containsString("cf push testAppName -f 'test.yml'")))
assertThat(loggingRule.log, containsString("[WARNING] We skip adding not-existing file 'vars.yml' as a vars-file to the cf create-service-push call"))
}
@Test
void testCfPushDeploymentWithVariableSubstitutionFromVarsList() {
readYamlRule.registerYaml('test.yml', "applications: [[name: '((appName))']]")
List varsList = [["appName" : "testApplicationFromVarsList"]]
List varsList = [["appName" : "testApplicationFromVarsList"]]
stepRule.step.cloudFoundryDeploy([
script: nullScript,
juStabUtils: utils,
@ -597,7 +597,7 @@ class CloudFoundryDeployTest extends BasePiperTest {
])
// asserts
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 's4sdk/docker-cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 'ppiper/cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerWorkspace', '/home/piper'))
assertThat(dockerExecuteRule.dockerParams.dockerEnvVars, hasEntry('STATUS_CODE', "${200}"))
assertThat(shellRule.shell, hasItem(containsString('cf login -u "test_cf" -p \'********\' -a https://api.cf.eu10.hana.ondemand.com -o "testOrg" -s "testSpace"')))
@ -609,8 +609,8 @@ class CloudFoundryDeployTest extends BasePiperTest {
@Test
void testCfPushDeploymentWithVariableSubstitutionFromVarsListNotAList() {
readYamlRule.registerYaml('test.yml', "applications: [[name: '((appName))']]")
readYamlRule.registerYaml('test.yml', "applications: [[name: '((appName))']]")
thrown.expect(hudson.AbortException)
thrown.expectMessage('[cloudFoundryDeploy] ERROR: Parameter config.cloudFoundry.manifestVariables is not a List!')
@ -626,7 +626,7 @@ class CloudFoundryDeployTest extends BasePiperTest {
cfManifest: 'test.yml',
cfManifestVariables: 'notAList'
])
}
@Test
@ -650,7 +650,7 @@ class CloudFoundryDeployTest extends BasePiperTest {
])
// asserts
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 's4sdk/docker-cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 'ppiper/cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerWorkspace', '/home/piper'))
assertThat(dockerExecuteRule.dockerParams.dockerEnvVars, hasEntry('STATUS_CODE', "${200}"))
assertThat(shellRule.shell, hasItem(containsString('cf login -u "test_cf" -p \'********\' -a https://api.cf.eu10.hana.ondemand.com -o "testOrg" -s "testSpace"')))
@ -674,8 +674,8 @@ class CloudFoundryDeployTest extends BasePiperTest {
cfManifest: 'test.yml'
])
// asserts
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 's4sdk/docker-cf-cli'))
// asserts
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 'ppiper/cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerWorkspace', '/home/piper'))
assertThat(dockerExecuteRule.dockerParams.dockerEnvVars, hasEntry('STATUS_CODE', "${200}"))
assertThat(shellRule.shell, hasItem(containsString('cf login -u "test_cf" -p \'********\' -a https://api.cf.eu10.hana.ondemand.com -o "testOrg" -s "testSpace"')))
@ -720,7 +720,7 @@ class CloudFoundryDeployTest extends BasePiperTest {
assertNotNull(testYamlData)
assertThat(testYamlData.get("applications").get(0).get(0).get("name"), is("testApplication"))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 's4sdk/docker-cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 'ppiper/cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerWorkspace', '/home/piper'))
assertThat(dockerExecuteRule.dockerParams.dockerEnvVars, hasEntry('STATUS_CODE', "${200}"))
assertThat(shellRule.shell, hasItem(containsString('cf login -u "test_cf" -p \'********\' -a https://api.cf.eu10.hana.ondemand.com -o "testOrg" -s "testSpace"')))
@ -766,7 +766,7 @@ class CloudFoundryDeployTest extends BasePiperTest {
assertNotNull(testYamlData)
assertThat(testYamlData.get("applications").get(0).get(0).get("name"), is("testApplicationFromVarsList"))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 's4sdk/docker-cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 'ppiper/cf-cli'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerWorkspace', '/home/piper'))
assertThat(dockerExecuteRule.dockerParams.dockerEnvVars, hasEntry('STATUS_CODE', "${200}"))
assertThat(shellRule.shell, hasItem(containsString('cf login -u "test_cf" -p \'********\' -a https://api.cf.eu10.hana.ondemand.com -o "testOrg" -s "testSpace"')))

View File

@ -92,7 +92,7 @@ class MulticloudDeployTest extends BasePiperTest {
deployType: 'blue-green',
keepOldInstance: true,
cf_native: [
dockerImage: 's4sdk/docker-cf-cli',
dockerImage: 'ppiper/cf-cli',
dockerWorkspace: '/home/piper'
]
]

View File

@ -39,7 +39,7 @@ import hudson.AbortException
'containerEnvVars',
/**
* A map of docker image to the name of the container. The pod will be created with all the images from this map and they are labled based on the value field of each map entry.
* Example: `['maven:3.5-jdk-8-alpine': 'mavenExecute', 'selenium/standalone-chrome': 'selenium', 'famiko/jmeter-base': 'checkJMeter', 's4sdk/docker-cf-cli': 'cloudfoundry']`
* Example: `['maven:3.5-jdk-8-alpine': 'mavenExecute', 'selenium/standalone-chrome': 'selenium', 'famiko/jmeter-base': 'checkJMeter', 'ppiper/cf-cli': 'cloudfoundry']`
*/
'containerMap',
/**