Skip to content

Commit

Permalink
Trust certificates after copying them
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
lubosmj authored and ipanova committed May 23, 2024
1 parent a6de19a commit 81e5f11
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/template_gitref
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2021.08.26-333-gdf1d3ba
2021.08.26-335-gdf91f79
2 changes: 0 additions & 2 deletions .github/workflows/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,6 @@ sudo chown -R 700:700 ~/.config
echo ::group::SSL
# Copy pulp CA
sudo docker cp pulp:/etc/pulp/certs/pulp_webserver.crt /usr/local/share/ca-certificates/pulp_webserver.crt
sudo docker exec -u root pulp trust anchor /etc/pulp/certs/pulp_webserver.crt

# Hack: adding pulp CA to certifi.where()
CERTIFI=$(python -c 'import certifi; print(certifi.where())')
Expand Down Expand Up @@ -174,7 +173,6 @@ if [[ "$TEST" = "azure" ]]; then
cat /usr/local/share/ca-certificates/azcert.crt >> $AZCERTIFI
cat /usr/local/share/ca-certificates/azcert.crt | cmd_stdin_prefix tee -a "$PULPCERTIFI" > /dev/null
cat /usr/local/share/ca-certificates/azcert.crt | cmd_stdin_prefix tee -a /etc/pki/tls/cert.pem > /dev/null
cmd_stdin_prefix sudo trust anchor /etc/pki/tls/cert.pem
AZURE_STORAGE_CONNECTION_STRING='DefaultEndpointsProtocol=https;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=https://ci-azurite:10000/devstoreaccount1;'
az storage container create --name pulp-test --connection-string $AZURE_STORAGE_CONNECTION_STRING
fi
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/scripts/post_before_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@ if [[ " ${SCENARIOS[*]} " =~ " ${TEST} " ]]; then
# Needed by pulp_container/tests/functional/api/test_flatpak.py:
cmd_prefix dnf install -yq dbus-daemon flatpak
fi

# add the copied certificates from install.sh to the container's trusted certificates list
if [[ "$TEST" = "azure" ]]; then
cmd_prefix sudo trust anchor /etc/pki/tls/cert.pem
else
cmd_prefix sudo trust anchor /etc/pulp/certs/pulp_webserver.crt
fi

0 comments on commit 81e5f11

Please sign in to comment.