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

Merge branch 'master' into nevskrem-patch-1

This commit is contained in:
Oliver Nocon 2019-06-05 11:25:03 +02:00 committed by GitHub
commit 8455761fe9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 1 deletions

View File

@ -368,6 +368,23 @@ class DockerExecuteOnKubernetesTest extends BasePiperTest {
assertThat(securityContext, is(equalTo(expectedSecurityContext)))
}
@Test
void testDockerExecuteOnKubernetesWorkspaceStashing() {
Map stashMap
helper.registerAllowedMethod('stash', [Map.class], {m ->
stashMap = m
})
stepRule.step.dockerExecuteOnKubernetes(
script: nullScript,
juStabUtils: utils,
dockerImage: 'maven:3.5-jdk-8-alpine',
) { bodyExecuted = true }
assertTrue(bodyExecuted)
assertThat(stashMap.useDefaultExcludes, is(false))
}
private container(options, body) {
containerName = options.name

View File

@ -225,7 +225,8 @@ chown -R ${runAsUser}:${fsGroup} ."""
stash(
name: stashName,
includes: config.stashIncludes.workspace,
excludes: config.stashExcludes.workspace
excludes: config.stashExcludes.workspace,
useDefaultExcludes: false
)
return stashName
} catch (AbortException | IOException e) {