CI: set up team SSH keys in before_script, not deploy.sh

This is how it is done also in osbuild-composer. The downside of doing
this in `deploy.sh` is that team SSH keys are not set as authorized for
mock-build jobs, which make it impossible to log into the machine and
debug anything.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2023-04-24 16:52:42 +02:00 committed by Tomáš Hozza
parent c4040191b6
commit bb406d11fe
2 changed files with 1 additions and 3 deletions

View file

@ -7,6 +7,7 @@ stages:
.terraform:
before_script:
- schutzbot/ci_details.sh > ci-details-before-run
- cat schutzbot/team_ssh_keys.txt | tee -a ~/.ssh/authorized_keys > /dev/null
after_script:
- schutzbot/ci_details.sh > ci-details-after-run
- schutzbot/update_github_status.sh update

View file

@ -7,9 +7,6 @@ DNF_REPO_BASEURL=http://osbuild-composer-repos.s3.amazonaws.com
source /etc/os-release
ARCH=$(uname -m)
# Add osbuild team ssh keys.
cat schutzbot/team_ssh_keys.txt | tee -a ~/.ssh/authorized_keys > /dev/null
# Distro version that this script is running on.
DISTRO_VERSION=${ID}-${VERSION_ID}