debian-forge/schutzbot/deploy.sh
Tomáš Hozza 282d725f6d schutzbot/deploy.sh: don't install osbuild-composer-tests
osbuild CI tests, specifically image tests are not executing the test
script from osbuild-composer any more, but it uses manifest-db.

Therefore it is not needed to set up repository for osbuild-composer nor
install it.

Delete all unneeded lines from the script and replace them by installing
all osbuild packages needed to build images from `manifest-db`.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-01-19 10:05:19 +01:00

39 lines
1.1 KiB
Bash
Executable file

#!/bin/bash
set -euxo pipefail
DNF_REPO_BASEURL=http://osbuild-composer-repos.s3.amazonaws.com
# Get OS details.
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}
if [[ "$ID" == rhel ]] && sudo subscription-manager status; then
# If this script runs on subscribed RHEL, install content built using CDN
# repositories.
DISTRO_VERSION=rhel-${VERSION_ID%.*}-cdn
fi
# Set up dnf repositories with the RPMs we want to test
sudo tee /etc/yum.repos.d/osbuild.repo << EOF
[osbuild]
name=osbuild ${CI_COMMIT_SHA}
baseurl=${DNF_REPO_BASEURL}/osbuild/${DISTRO_VERSION}/${ARCH}/${CI_COMMIT_SHA}
enabled=1
gpgcheck=0
# Default dnf repo priority is 99. Lower number means higher priority.
priority=5
EOF
# install pckages needed to run tests
sudo dnf install -y osbuild \
osbuild-ostree \
osbuild-lvm2 \
osbuild-luks2 \
jq \
python3