Grab host keys in the tasks not from the secret like before.

This commit is contained in:
James Pace 2023-04-02 10:51:25 -04:00
parent 358cb40f8c
commit f85a423dd0
5 changed files with 6 additions and 0 deletions

View File

@ -19,6 +19,8 @@ spec:
cp -r $(workspaces.ssh-directory.path) ~/.ssh cp -r $(workspaces.ssh-directory.path) ~/.ssh
chmod 700 ~/.ssh chmod 700 ~/.ssh
chmod -R 400 ~/.ssh/* chmod -R 400 ~/.ssh/*
ssh-keyscan -H -p 2222 git.jpace121.net >> ~/.ssh/known_hosts
ssh-keyscan -H packages.jpace121.net >> ~/.ssh/known_hosts
cd $(workspaces.source.path) cd $(workspaces.source.path)
ansible-playbook -vvvv --skip-tags deploy -i $(params.ansible-file-path)/inventory.yaml $(params.ansible-file-path)/build.yaml ansible-playbook -vvvv --skip-tags deploy -i $(params.ansible-file-path)/inventory.yaml $(params.ansible-file-path)/build.yaml

View File

@ -16,6 +16,7 @@ spec:
cp -r $(workspaces.ssh-directory.path) ~/.ssh cp -r $(workspaces.ssh-directory.path) ~/.ssh
chmod 700 ~/.ssh chmod 700 ~/.ssh
chmod -R 400 ~/.ssh/* chmod -R 400 ~/.ssh/*
ssh-keyscan -H -p 2222 git.jpace121.net >> ~/.ssh/known_hosts
git clone $(params.url) $(workspaces.output.path) git clone $(params.url) $(workspaces.output.path)
cd $(workspaces.output.path) cd $(workspaces.output.path)

View File

@ -16,5 +16,6 @@ spec:
cp -r $(workspaces.ssh-directory.path) ~/.ssh cp -r $(workspaces.ssh-directory.path) ~/.ssh
chmod 700 ~/.ssh chmod 700 ~/.ssh
chmod -R 400 ~/.ssh/* chmod -R 400 ~/.ssh/*
ssh-keyscan -H -p 2222 git.jpace121.net >> ~/.ssh/known_hosts
git clone --single-branch --branch $(params.branch) $(params.url) $(workspaces.output.path) git clone --single-branch --branch $(params.branch) $(params.url) $(workspaces.output.path)

View File

@ -17,6 +17,7 @@ spec:
cp -r $(workspaces.ssh-directory.path) ~/.ssh cp -r $(workspaces.ssh-directory.path) ~/.ssh
chmod 700 ~/.ssh chmod 700 ~/.ssh
chmod -R 400 ~/.ssh/* chmod -R 400 ~/.ssh/*
ssh-keyscan -H -p 2222 git.jpace121.net >> ~/.ssh/known_hosts
git clone --single-branch --branch $(params.branch) $(params.url) $(workspaces.output.path) git clone --single-branch --branch $(params.branch) $(params.url) $(workspaces.output.path)
cd $(workspaces.output.path) cd $(workspaces.output.path)

View File

@ -19,6 +19,7 @@ spec:
cp -r $(workspaces.ssh-directory.path) ~/.ssh cp -r $(workspaces.ssh-directory.path) ~/.ssh
chmod 700 ~/.ssh chmod 700 ~/.ssh
chmod -R 400 ~/.ssh/* chmod -R 400 ~/.ssh/*
ssh-keyscan -H -p 2222 git.jpace121.net >> ~/.ssh/known_hosts
git config --global user.name tekton git config --global user.name tekton
git config --global user.email tekton@internal.jpace121.net git config --global user.email tekton@internal.jpace121.net