jjb: lttng-www: use jenkins credentials to populate known_hosts ssh
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Fri, 26 Feb 2021 16:36:06 +0000 (11:36 -0500)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Fri, 26 Feb 2021 16:36:06 +0000 (11:36 -0500)
This ensure that we deploy to the good host.

Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
jobs/lttng-www.yaml
scripts/lttng-www/deploy.sh

index 3df2460883fb199c1ac2fd4bcc056b9cc71d5ef8..051b94d01e5b83abf076b37eba53f886762bfbc8 100644 (file)
@@ -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'
index 55f295878835e6a6b8d1a65310356d22b87ff0e2..9224b4ee121e9ac8b70c41b51ee6dc74105c7782 100755 (executable)
@@ -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
This page took 0.025883 seconds and 4 git commands to generate.