debian-koji-osbuild/test/copy-creds.sh
Tomas Hozza 85d7120d9f CI: Use Fedora 36, RHEL-8.6 and the latest osbuild and composer
Use latest osbuild and osbuild-composer releases. This is important to
be later able to test direct uploading to the cloud for Koji composes.
Also the mock openid server had to be enhanced to be usable for testing
`koji-osbuild`.

Modify used osbuild-worker configuration to use JWT for authentication
with composer. Update configurations of both, composer and worker to
handle multi-tenancy.

Do not start any services in `schutzbot/deploy.sh`, because at that
point, none of the configuration files are in place.

Ensure that the correct units are started and masked by
`test/integration.sh` to simulate the Service scenario more closely.
This means that the local worker is masked and only remote worker is
started.

Co-authored-by: Jakub Rusz <jrusz@redhat.com>
2022-08-22 09:58:06 +02:00

38 lines
866 B
Bash
Executable file

#!/bin/bash
set -euo pipefail
# this script must be run as root
if [ $UID != 0 ]; then
echo This script must be run as root.
exit 1
fi
TEST_PATH=${1:-test}
TEST_DATA=${TEST_PATH}/data
SHARE_DIR=${SHARE_DIR:-/tmp/osbuild-composer-koji-test}
mkdir -p "${SHARE_DIR}"
mkdir -p /etc/osbuild-composer
mkdir -p /etc/osbuild-worker
echo "Copying kerberos keytabs"
cp ${SHARE_DIR}/client.keytab \
/etc/osbuild-composer/client.keytab
cp ${SHARE_DIR}/client.keytab \
/etc/osbuild-worker/client.keytab
echo "Copying composer kerberos configuration"
cp ${TEST_DATA}/osbuild-composer.toml \
/etc/osbuild-composer/
mkdir -p /etc/osbuild-worker
cp ${TEST_DATA}/osbuild-worker.toml \
/etc/osbuild-worker/
echo "koji" > /etc/osbuild-worker/oauth-secret
echo "Copying system kerberos configuration"
cp ${TEST_DATA}/krb5.local.conf \
/etc/krb5.conf.d/local