Skip to content

Commit 705c490

Browse files
authored
Merge pull request #28 from cgwalters/ci-fix
ci/run-kola: Support pull secret for running in Prow
2 parents 1698b3c + 6f4bfd5 commit 705c490

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

ci/run-kola.sh

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,31 @@ if test -z "${TARGET_IMAGE:-}"; then
99
fi
1010
echo "Test base image: ${TARGET_IMAGE}"
1111

12+
1213
tmpdir="$(mktemp -d -p /var/tmp)"
1314
cd "${tmpdir}"
15+
16+
# Detect Prow; if we find it, assume the image requires a pull secret
17+
kola_args=()
18+
if test -n "${JOB_NAME_HASH:-}"; then
19+
oc registry login --to auth.json
20+
cat > pull-secret.bu << 'EOF'
21+
variant: fcos
22+
version: 1.1.0
23+
storage:
24+
files:
25+
- path: /etc/ostree/auth.json
26+
contents:
27+
local: auth.json
28+
EOF
29+
butane -d . < pull-secret.bu > pull-secret.ign
30+
kola_args+=("--append-ignition" "pull-secret.ign")
31+
fi
32+
1433
if test -z "${BASE_QEMU_IMAGE:-}"; then
1534
coreos-installer download -p qemu -f qcow2.xz --decompress
1635
BASE_QEMU_IMAGE="$(echo *.qcow2)"
1736
fi
18-
kola run --oscontainer ostree-unverified-registry:${TARGET_IMAGE} --qemu-image "./${BASE_QEMU_IMAGE}" ext.bootc.'*'
37+
kola run --oscontainer ostree-unverified-registry:${TARGET_IMAGE} --qemu-image "./${BASE_QEMU_IMAGE}" "${kola_args[@]}" ext.bootc.'*'
1938

2039
echo "ok kola bootc"

0 commit comments

Comments
 (0)