]> git.lttng.org Git - lttng-ci.git/commitdiff
jjb: Create /root/.ssh in new instances if necessary
authorKienan Stewart <kstewart@efficios.com>
Mon, 20 Jan 2025 14:28:21 +0000 (09:28 -0500)
committerKienan Stewart <kstewart@efficios.com>
Mon, 20 Jan 2025 17:35:55 +0000 (12:35 -0500)
Some base images don't have `/root/.ssh` as an existing directory,
causing the subsequent `incus file push` to fail.

Change-Id: Iab90f513582201dd0775293d6523e3f09e1633b0
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
pipelines/images/imagebuild.sh

index 59430358dc4e834066340fafdfcf27abdc069815..e5d4cbd095d1833762db84be61375a5bbdb24d89 100644 (file)
@@ -173,6 +173,7 @@ CLEANUP+=(
     "rm -f ${HOME}/.ssh/id_rsa.pub"
     "rm -f ${HOME}/.ssh/id_rsa"
 )
+incus exec "ci:${INSTANCE_NAME}" -- mkdir -p /root/.ssh
 incus file push ~/.ssh/id_rsa.pub "ci:${INSTANCE_NAME}/root/.ssh/authorized_keys2"
 # Some distros, eg. Rocky Linux, don't enable the use of authorized_keys2
 # by default
This page took 0.0260089999999999 seconds and 4 git commands to generate.