From: Kienan Stewart Date: Mon, 20 Jan 2025 14:28:21 +0000 (-0500) Subject: jjb: Create /root/.ssh in new instances if necessary X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=bfd31f845335f42b468cfcec2e85245b6512b70a;p=lttng-ci.git jjb: Create /root/.ssh in new instances if necessary 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 --- diff --git a/pipelines/images/imagebuild.sh b/pipelines/images/imagebuild.sh index 5943035..e5d4cbd 100644 --- a/pipelines/images/imagebuild.sh +++ b/pipelines/images/imagebuild.sh @@ -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