From 462c293c9c1649d34231c6a74a2755d19705db22 Mon Sep 17 00:00:00 2001 From: Daniel Kurzynski Date: Fri, 25 Oct 2019 17:49:54 +0200 Subject: [PATCH] User piper docker images (#920) --- .../docs/steps/dockerExecuteOnKubernetes.md | 2 +- resources/default_pipeline_environment.yml | 6 +-- test/groovy/CloudFoundryDeployTest.groovy | 42 +++++++++---------- test/groovy/MulticloudDeployTest.groovy | 2 +- vars/dockerExecuteOnKubernetes.groovy | 2 +- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/documentation/docs/steps/dockerExecuteOnKubernetes.md b/documentation/docs/steps/dockerExecuteOnKubernetes.md index b64aaac16..a9f3a8dc3 100644 --- a/documentation/docs/steps/dockerExecuteOnKubernetes.md +++ b/documentation/docs/steps/dockerExecuteOnKubernetes.md @@ -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" } diff --git a/resources/default_pipeline_environment.yml b/resources/default_pipeline_environment.yml index 25a1fae41..4b6af4620 100644 --- a/resources/default_pipeline_environment.yml +++ b/resources/default_pipeline_environment.yml @@ -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: [] diff --git a/test/groovy/CloudFoundryDeployTest.groovy b/test/groovy/CloudFoundryDeployTest.groovy index 0bbd37afb..bfd8d4f63 100644 --- a/test/groovy/CloudFoundryDeployTest.groovy +++ b/test/groovy/CloudFoundryDeployTest.groovy @@ -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"'))) diff --git a/test/groovy/MulticloudDeployTest.groovy b/test/groovy/MulticloudDeployTest.groovy index e70bf7650..e0451ff2e 100644 --- a/test/groovy/MulticloudDeployTest.groovy +++ b/test/groovy/MulticloudDeployTest.groovy @@ -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' ] ] diff --git a/vars/dockerExecuteOnKubernetes.groovy b/vars/dockerExecuteOnKubernetes.groovy index 885c7a14c..9781a099c 100644 --- a/vars/dockerExecuteOnKubernetes.groovy +++ b/vars/dockerExecuteOnKubernetes.groovy @@ -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', /**