Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion templates/github/.ci/ansible/settings.py.j2.copy
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,6 @@ AZURE_CONNECTION_STRING = 'DefaultEndpointsProtocol={{ pulp_scheme }};AccountNam
DEFAULT_FILE_STORAGE = "storages.backends.gcloud.GoogleCloudStorage"
MEDIA_ROOT = ""
GS_BUCKET_NAME = "gcppulp"
GS_CUSTOM_ENDPOINT = "http://ci-gcp:4443"
GS_CUSTOM_ENDPOINT = "https://ci-gcp:4443"
GOOGLE_APPLICATION_CREDENTIALS = "/etc/pulp/credentials.json"
{% endif %}
24 changes: 20 additions & 4 deletions templates/github/.github/workflows/scripts/install.sh.j2
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ services:
- ../../../pulp-openapi-generator:/root/pulp-openapi-generator
env:
PULP_WORKERS: "4"
GOOGLE_APPLICATION_CREDENTIALS: "/etc/pulp/credentials.json"
VARSYAML

cat >> vars/main.yaml << VARSYAML
Expand Down Expand Up @@ -204,9 +205,17 @@ fi
{%- endif %}

{%- if test_gcp %}

cat >> credentials.json << GCP_JSON
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just to understand this better, where this is taken from?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pulled in these changes into my pr and the issue seems to persist pulp/pulp_container#1196

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"client_id": "pulp-ci-test.apps.googleusercontent.com",
"client_secret": "pulp-Secret",
"refresh_token": "Pulp-CI-Refresh-Token",
"type": "authorized_user"
}
GCP_JSON
if [ "$TEST" = "gcp" ]; then
mkdir -p cigcp
mkdir -p cigcp gcpdata/gcppulp
mv credentials.json cigcp/credentials.json
cd cigcp
openssl req -newkey rsa:2048 -x509 -nodes -keyout gcpkey.pem -new -out gcpcert.pem -sha256 -days 365 -addext "subjectAltName=DNS:ci-gcp" -subj "/C=CO/ST=ST/L=LO/O=OR/OU=OU/CN=CN"
sudo cp gcpcert.pem /usr/local/share/ca-certificates/gcpcert.crt
Expand All @@ -216,8 +225,11 @@ if [ "$TEST" = "gcp" ]; then
- name: ci-gcp\
image: fsouza/fake-gcs-server\
volumes:\
- storage_data:/etc/pulp\
command: "{% if pulp_scheme == "https" %} -cert-location /etc/pulp/gcpcert.pem {% else %} -scheme http{% endif %}"' vars/main.yaml
- ./cigcp:/etc/pulp\
- ./gcpdata:/data\
env:\
GOOGLE_APPLICATION_CREDENTIALS: "/etc/pulp/credentials.json"\
command: "-public-host {{ pulp_scheme }}://ci-gcp:4443 {% if pulp_scheme == "https" %} -cert-location /etc/pulp/gcpcert.pem {% else %} -scheme http{% endif %}"' vars/main.yaml
sed -i -e '$a gcp_test: true\
pulp_scenario_settings: {{ pulp_settings_gcp | tojson }}\
' vars/main.yaml
Expand Down Expand Up @@ -265,6 +277,10 @@ sudo update-ca-certificates
echo ::endgroup::
{%- endif %}

if [[ "$TEST" = "gcp" ]]; then
cp cigcp/credentials.json settings/credentials.json
fi

if [[ "$TEST" = "azure" ]]; then
{%- if pulp_scheme == "https" %}
AZCERTIFI=$(/opt/az/bin/python3 -c 'import certifi; print(certifi.where())')
Expand Down