ci: lib: Update for latest ansible container image
The latest version of the *ansible* container runs processes as the unprivileged *jenkins* user, provides its own "sleep forever" default command, and sets the correct LANG environment variable. Since it runs processes as *jenkins*, we need to override HOME and set it to the WORKSPACE to ensure Jenkins has a writable path for arbitrary files.btop
parent
244482ac52
commit
bdd0310cf6
|
@ -13,16 +13,15 @@ def call(rw_limit, stages) {
|
||||||
containerTemplate(
|
containerTemplate(
|
||||||
name: 'ansible',
|
name: 'ansible',
|
||||||
image: 'git.pyrocufflink.net/containerimages/ansible',
|
image: 'git.pyrocufflink.net/containerimages/ansible',
|
||||||
command: 'sleep',
|
alwaysPullImage: true,
|
||||||
args: 'infinity',
|
|
||||||
envVars: [
|
|
||||||
envVar(key: 'LANG', value: 'C.UTF-8'),
|
|
||||||
],
|
|
||||||
)
|
)
|
||||||
]) {
|
]) {
|
||||||
node(POD_LABEL) {
|
node(POD_LABEL) {
|
||||||
checkout scm
|
checkout scm
|
||||||
withEnv(["KRB5CCNAME=${WORKSPACE}/.krb5cc"]) {
|
withEnv([
|
||||||
|
"HOME=${WORKSPACE}",
|
||||||
|
"KRB5CCNAME=${WORKSPACE}/.krb5cc",
|
||||||
|
]) {
|
||||||
container('ansible') {
|
container('ansible') {
|
||||||
try {
|
try {
|
||||||
stageKinit()
|
stageKinit()
|
||||||
|
|
Loading…
Reference in New Issue