@@ -104,18 +104,12 @@ pulp_scenario_env: {}\
104104fi
105105
106106if [ " $TEST " = " azure" ]; then
107- mkdir -p azurite
108- cd azurite
109- openssl req -newkey rsa:2048 -x509 -nodes -keyout azkey.pem -new -out azcert.pem -sha256 -days 365 -addext " subjectAltName=DNS:ci-azurite" -subj " /C=CO/ST=ST/L=LO/O=OR/OU=OU/CN=CN"
110- sudo cp azcert.pem /usr/local/share/ca-certificates/azcert.crt
111- sudo dpkg-reconfigure ca-certificates
112- cd ..
113107 sed -i -e ' /^services:/a \
114108 - name: ci-azurite\
115109 image: mcr.microsoft.com/azure-storage/azurite\
116110 volumes:\
117111 - ./azurite:/etc/pulp\
118- command: "azurite-blob --blobHost 0.0.0.0 --cert /etc/pulp/azcert.pem --key /etc/pulp/azkey.pem "' vars/main.yaml
112+ command: "azurite-blob --blobHost 0.0.0.0"' vars/main.yaml
119113 sed -i -e ' $a azure_test: true\
120114pulp_scenario_settings: null\
121115pulp_scenario_env: {}\
@@ -151,31 +145,17 @@ sudo docker cp pulp:/etc/pulp/certs/pulp_webserver.crt /usr/local/share/ca-certi
151145# Hack: adding pulp CA to certifi.where()
152146CERTIFI=$( python -c ' import certifi; print(certifi.where())' )
153147cat /usr/local/share/ca-certificates/pulp_webserver.crt | sudo tee -a " $CERTIFI " > /dev/null
154- if [[ " $TEST " = " azure" ]]; then
155- cat /usr/local/share/ca-certificates/azcert.crt | sudo tee -a " $CERTIFI " > /dev/null
156- fi
157148
158149# Hack: adding pulp CA to default CA file
159150CERT=$( python -c ' import ssl; print(ssl.get_default_verify_paths().openssl_cafile)' )
160- cat " $CERTIFI " | sudo tee -a " $CERT " > /dev/null
151+ cat /usr/local/share/ca-certificates/pulp_webserver.crt | sudo tee -a " $CERT " > /dev/null
161152
162153# Updating certs
163154sudo update-ca-certificates
164155echo ::endgroup::
165156
166- # Add our azcert.crt certificate to the container image along with the certificates from certifi
167- # so that we can use HTTPS with our fake Azure CI. certifi is self-contained and doesn't allow
168- # extension or modification of the trust store, so we do a weird and hacky thing (above) where we just
169- # overwrite or append to certifi's trust store behind it's back.
170- #
171- # We do this for both the CI host and the CI image.
172157if [[ " $TEST " = " azure" ]]; then
173- AZCERTIFI=$( /opt/az/bin/python3 -c ' import certifi; print(certifi.where())' )
174- PULPCERTIFI=$( cmd_prefix python3 -c ' import certifi; print(certifi.where())' )
175- cat /usr/local/share/ca-certificates/azcert.crt >> $AZCERTIFI
176- cat /usr/local/share/ca-certificates/azcert.crt | cmd_stdin_prefix tee -a " $PULPCERTIFI " > /dev/null
177- cat /usr/local/share/ca-certificates/azcert.crt | cmd_stdin_prefix tee -a /etc/pki/tls/cert.pem > /dev/null
178- AZURE_STORAGE_CONNECTION_STRING=' DefaultEndpointsProtocol=https;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=https://ci-azurite:10000/devstoreaccount1;'
158+ AZURE_STORAGE_CONNECTION_STRING=' DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://ci-azurite:10000/devstoreaccount1;'
179159 az storage container create --name pulp-test --connection-string $AZURE_STORAGE_CONNECTION_STRING
180160fi
181161
0 commit comments