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:
commit
8455761fe9
@ -368,6 +368,23 @@ class DockerExecuteOnKubernetesTest extends BasePiperTest {
|
|||||||
assertThat(securityContext, is(equalTo(expectedSecurityContext)))
|
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) {
|
private container(options, body) {
|
||||||
containerName = options.name
|
containerName = options.name
|
||||||
|
@ -225,7 +225,8 @@ chown -R ${runAsUser}:${fsGroup} ."""
|
|||||||
stash(
|
stash(
|
||||||
name: stashName,
|
name: stashName,
|
||||||
includes: config.stashIncludes.workspace,
|
includes: config.stashIncludes.workspace,
|
||||||
excludes: config.stashExcludes.workspace
|
excludes: config.stashExcludes.workspace,
|
||||||
|
useDefaultExcludes: false
|
||||||
)
|
)
|
||||||
return stashName
|
return stashName
|
||||||
} catch (AbortException | IOException e) {
|
} catch (AbortException | IOException e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user