pipline build v4 - added known hosts back
This commit is contained in:
parent
c06b7f5895
commit
c86c5e85b9
@ -7,12 +7,17 @@ steps:
|
||||
set -eu
|
||||
mkdir -p ~/.ssh
|
||||
|
||||
# Inject SSH key directly
|
||||
# Known hosts (pre-encoded and uploaded)
|
||||
gcloud secrets versions access latest \
|
||||
--secret="STAGING_KNOWN_HOSTS" \
|
||||
--project="aptivaai-dev" | base64 -d > ~/.ssh/known_hosts
|
||||
chmod 644 ~/.ssh/known_hosts
|
||||
|
||||
# SSH key
|
||||
gcloud secrets versions access latest \
|
||||
--secret="STAGING_SSH_KEY" \
|
||||
--project="aptivaai-dev" > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
|
||||
# Sanity check: perform handshake
|
||||
# SSH test
|
||||
ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=yes jcoakley@10.128.0.12 hostname
|
||||
|
Loading…
Reference in New Issue
Block a user