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
Dustin 2022-12-03 13:36:10 -06:00
parent 244482ac52
commit bdd0310cf6
1 changed files with 5 additions and 6 deletions

View File

@ -13,16 +13,15 @@ def call(rw_limit, stages) {
containerTemplate(
name: 'ansible',
image: 'git.pyrocufflink.net/containerimages/ansible',
command: 'sleep',
args: 'infinity',
envVars: [
envVar(key: 'LANG', value: 'C.UTF-8'),
],
alwaysPullImage: true,
)
]) {
node(POD_LABEL) {
checkout scm
withEnv(["KRB5CCNAME=${WORKSPACE}/.krb5cc"]) {
withEnv([
"HOME=${WORKSPACE}",
"KRB5CCNAME=${WORKSPACE}/.krb5cc",
]) {
container('ansible') {
try {
stageKinit()