From: Jonathan Rajotte Date: Fri, 26 Feb 2021 16:36:06 +0000 (-0500) Subject: jjb: lttng-www: use jenkins credentials to populate known_hosts ssh X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=4c61f7a476ff94b2302439fdc463b6113a7fa14e;p=lttng-ci.git jjb: lttng-www: use jenkins credentials to populate known_hosts ssh This ensure that we deploy to the good host. Signed-off-by: Jonathan Rajotte --- diff --git a/jobs/lttng-www.yaml b/jobs/lttng-www.yaml index 3df2460..051b94d 100644 --- a/jobs/lttng-www.yaml +++ b/jobs/lttng-www.yaml @@ -18,6 +18,9 @@ key-file-variable: KEY_FILE_VARIABLE username-variable: USER_NAME_VARIABLE passphrase-variable: PASSPHRASE_VARIABLE + - file: + credential-id: d023f830-9ab0-409f-b977-8cd0e1944dd5 + variable: HOST_PUBLIC_KEYS triggers: - timed: '@daily' diff --git a/scripts/lttng-www/deploy.sh b/scripts/lttng-www/deploy.sh index 55f2958..9224b4e 100755 --- a/scripts/lttng-www/deploy.sh +++ b/scripts/lttng-www/deploy.sh @@ -19,7 +19,7 @@ set -exu # Add ssh key for deployment -echo "StrictHostKeyChecking no" >> ~/.ssh/config +cp "$HOST_PUBLIC_KEYS" ~/.ssh/known_hosts cp "$KEY_FILE_VARIABLE" ~/.ssh/id_rsa # lttng-www dependencies