Skip to content

Commit

Permalink
Merge pull request #673 from gerrod3/3.22-gpg-fix
Browse files Browse the repository at this point in the history
Fix 3.22 CI
  • Loading branch information
gerrod3 authored Oct 9, 2024
2 parents eec712b + 1b340a8 commit fa51c4d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 20 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/pulp_images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,6 @@ jobs:
web_image: pulp-web
pip_name: pulpcore
s6: true
- image_name: galaxy-minimal
web_image: galaxy-web
pip_name: galaxy-ng
s6: false
- image_name: galaxy
web_image: galaxy-web
pip_name: galaxy-ng
s6: true
steps:
- name: Set the temporary image tags
run: |
Expand Down
35 changes: 23 additions & 12 deletions images/s6_assets/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,26 +56,37 @@ mkdir -p settings pulp_storage pgsql containers
echo "CONTENT_ORIGIN='$scheme://localhost:8080'" >> settings/settings.py
echo "ALLOWED_EXPORT_PATHS = ['/tmp']" >> settings/settings.py
echo "ORPHAN_PROTECTION_TIME = 0" >> settings/settings.py
# pulp_rpm < 3.25 requires sha1 in allowed checksums
echo "ALLOWED_CONTENT_CHECKSUMS = ['sha1', 'sha256', 'sha512']" >> settings/settings.py

if [ "$old_image" != "" ]; then
start_container_and_wait $old_image
podman rm -f pulp
fi
start_container_and_wait $image

echo "Installing Pulp-CLI"
pip install pulp-cli

# Retreive installed pulp-cli version
PULP_CLI_VERSION=$(python3 -c \
'import importlib.metadata; \
from packaging.version import Version; \
print(Version(importlib.metadata.version("pulp-cli")))')

if [[ ${image} != *"galaxy"* ]];then
curl --insecure --fail $scheme://localhost:8080/assets/rest_framework/js/default.js
grep "127.0.0.1 pulp" /etc/hosts || echo "127.0.0.1 pulp" | sudo tee -a /etc/hosts
# Checkout git repo for pulp-cli at correct version to fetch tests
if [ -d pulp-cli ]; then
cd pulp-cli
git fetch origin
git reset --hard origin/main
git fetch --tags origin
git reset --hard $PULP_CLI_VERSION
else
git clone --depth=1 https://github.com/pulp/pulp-cli.git
git clone --depth=1 https://github.com/pulp/pulp-cli.git -b "${PULP_CLI_VERSION}"
cd pulp-cli
fi
pip install -r test_requirements.txt || pip install --no-build-isolation -r test_requirements.txt
pip install pulp-cli
if [ -e tests/cli.toml ]; then
mv tests/cli.toml "tests/cli.toml.bak.$(date -R)"
fi
Expand All @@ -89,21 +100,21 @@ if [[ ${image} != *"galaxy"* ]];then
fi
echo "Setup the signing services"
# Setup key on the Pulp container
curl -L https://github.com/pulp/pulp-fixtures/raw/master/common/GPG-KEY-pulp-qe |podman exec -i pulp su pulp -c "cat > /tmp/GPG-KEY-pulp-qe"
curl -L https://github.com/pulp/pulp-fixtures/raw/master/common/GPG-PRIVATE-KEY-pulp-qe |podman exec -i pulp su pulp -c "gpg --import"
echo "6EDF301256480B9B801EBA3D05A5E6DA269D9D98:6:" |podman exec -i pulp gpg --import-ownertrust
curl -L https://github.com/pulp/pulp-fixtures/raw/master/common/GPG-KEY-fixture-signing |podman exec -i pulp su pulp -c "cat > /tmp/GPG-KEY-fixture-signing"
curl -L https://github.com/pulp/pulp-fixtures/raw/master/common/GPG-PRIVATE-KEY-fixture-signing |podman exec -i pulp su pulp -c "gpg --import"
echo "0C1A894EBB86AFAE218424CADDEF3019C2D4A8CF:6:" |podman exec -i pulp gpg --import-ownertrust
# Setup key on the test machine
curl -L https://github.com/pulp/pulp-fixtures/raw/master/common/GPG-KEY-pulp-qe | cat > /tmp/GPG-KEY-pulp-qe
curl -L https://github.com/pulp/pulp-fixtures/raw/master/common/GPG-PRIVATE-KEY-pulp-qe | gpg --import
echo "6EDF301256480B9B801EBA3D05A5E6DA269D9D98:6:" | gpg --import-ownertrust
curl -L https://github.com/pulp/pulp-fixtures/raw/master/common/GPG-KEY-fixture-signing | cat > /tmp/GPG-KEY-pulp-qe
curl -L https://github.com/pulp/pulp-fixtures/raw/master/common/GPG-PRIVATE-KEY-fixture-signing | gpg --import
echo "0C1A894EBB86AFAE218424CADDEF3019C2D4A8CF:6:" | gpg --import-ownertrust
echo "Setup ansible signing service"
podman exec -u pulp -i pulp bash -c "cat > /var/lib/pulp/scripts/sign_detached.sh" < "${PWD}/tests/assets/sign_detached.sh"
podman exec -u pulp pulp chmod a+rx /var/lib/pulp/scripts/sign_detached.sh
podman exec -u pulp pulp bash -c "pulpcore-manager add-signing-service --class core:AsciiArmoredDetachedSigningService sign_ansible /var/lib/pulp/scripts/sign_detached.sh 'Pulp QE'"
podman exec -u pulp pulp bash -c "pulpcore-manager add-signing-service --class core:AsciiArmoredDetachedSigningService sign_ansible /var/lib/pulp/scripts/sign_detached.sh 'pulp-fixture-signing-key'"
echo "Setup deb release signing service"
podman exec -u pulp -i pulp bash -c "cat > /var/lib/pulp/scripts/sign_deb_release.sh" < "${PWD}/tests/assets/sign_deb_release.sh"
podman exec -u pulp pulp chmod a+rx /var/lib/pulp/scripts/sign_deb_release.sh
podman exec -u pulp pulp bash -c "pulpcore-manager add-signing-service --class deb:AptReleaseSigningService sign_deb_release /var/lib/pulp/scripts/sign_deb_release.sh 'Pulp QE'"
podman exec -u pulp pulp bash -c "pulpcore-manager add-signing-service --class deb:AptReleaseSigningService sign_deb_release /var/lib/pulp/scripts/sign_deb_release.sh 'pulp-fixture-signing-key'"
make test
else
curl --insecure --fail $scheme://localhost:8080/static/galaxy_ng/index.html
Expand Down

0 comments on commit fa51c4d

Please sign in to comment.