@@ -104,18 +104,12 @@ pulp_scenario_env: {}\
104
104
fi
105
105
106
106
if [ " $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 ..
113
107
sed -i -e ' /^services:/a \
114
108
- name: ci-azurite\
115
109
image: mcr.microsoft.com/azure-storage/azurite\
116
110
volumes:\
117
111
- ./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
119
113
sed -i -e ' $a azure_test: true\
120
114
pulp_scenario_settings: null\
121
115
pulp_scenario_env: {}\
@@ -151,31 +145,17 @@ sudo docker cp pulp:/etc/pulp/certs/pulp_webserver.crt /usr/local/share/ca-certi
151
145
# Hack: adding pulp CA to certifi.where()
152
146
CERTIFI=$( python -c ' import certifi; print(certifi.where())' )
153
147
cat /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
157
148
158
149
# Hack: adding pulp CA to default CA file
159
150
CERT=$( 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
161
152
162
153
# Updating certs
163
154
sudo update-ca-certificates
164
155
echo ::endgroup::
165
156
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.
172
157
if [[ " $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;'
179
159
az storage container create --name pulp-test --connection-string $AZURE_STORAGE_CONNECTION_STRING
180
160
fi
181
161
0 commit comments