Skip to content

Commit 448d19b

Browse files
committed
Update CI files
1 parent 5e3685b commit 448d19b

3 files changed

Lines changed: 32 additions & 21 deletions

File tree

.ci/ansible/start_container.yaml

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,35 @@
5555
become: true
5656

5757
- name: "Create Pulp Bucket"
58-
amazon.aws.s3_bucket:
59-
aws_access_key: "{{ minio_access_key }}"
60-
aws_secret_key: "{{ minio_secret_key }}"
61-
endpoint_url: "http://minio:9000"
62-
region: "eu-central-1"
63-
name: "pulp3"
64-
state: "present"
58+
ansible.builtin.command:
59+
argv:
60+
- "python3"
61+
- "-c"
62+
- |
63+
import boto3
64+
from botocore.exceptions import ClientError
65+
client = boto3.client(
66+
"s3",
67+
aws_access_key_id="{{ minio_access_key }}",
68+
aws_secret_access_key="{{ minio_secret_key }}",
69+
endpoint_url="http://minio:9000",
70+
region_name="eu-central-1",
71+
)
72+
try:
73+
client.create_bucket(
74+
Bucket="pulp3",
75+
CreateBucketConfiguration={"LocationConstraint": "eu-central-1"},
76+
)
77+
except ClientError as exc:
78+
if exc.response["Error"]["Code"] not in (
79+
"BucketAlreadyOwnedByYou",
80+
"BucketAlreadyExists",
81+
):
82+
raise
83+
register: "create_bucket"
84+
retries: 6
85+
delay: 5
86+
until: "create_bucket is succeeded"
6587
when: "s3_test | default(false)"
6688

6789
- name: "Wait on Services"

.github/workflows/scripts/before_install.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fi
2626
COMPONENT_VERSION="$(bump-my-version show current_version | tail -n -1 | python -c 'from packaging.version import Version; print(Version(input()))')"
2727
COMPONENT_SOURCE="./pulp_python/dist/pulp_python-${COMPONENT_VERSION}-py3-none-any.whl"
2828
if [ "$TEST" = "s3" ]; then
29-
COMPONENT_SOURCE="${COMPONENT_SOURCE} pulpcore[s3] git+https://github.com/gerrod3/botocore.git@fix-100-continue"
29+
COMPONENT_SOURCE="${COMPONENT_SOURCE} pulpcore[s3]"
3030
fi
3131
if [ "$TEST" = "azure" ]; then
3232
COMPONENT_SOURCE="${COMPONENT_SOURCE} pulpcore[azure,uvloop]"
@@ -89,7 +89,8 @@ s3_test: true
8989
minio_access_key: "${MINIO_ACCESS_KEY}"
9090
minio_secret_key: "${MINIO_SECRET_KEY}"
9191
pulp_scenario_settings: {"MEDIA_ROOT": "", "STORAGES": {"default": {"BACKEND": "storages.backends.s3boto3.S3Boto3Storage", "OPTIONS": {"access_key": "AKIAIT2Z5TDYPX3ARJBA", "addressing_style": "path", "bucket_name": "pulp3", "default_acl": "@none", "endpoint_url": "http://minio:9000", "region_name": "eu-central-1", "secret_key": "fqRvjWaPU5o0fCqQuUWbj9Fainj2pVZtBCiDiieS", "signature_version": "s3v4"}}, "staticfiles": {"BACKEND": "django.contrib.staticfiles.storage.StaticFilesStorage"}}, "api_root": "/rerouted/djnd/", "domain_enabled": true}
92-
pulp_scenario_env: {}
92+
# MinIO omits 100-continue on 0-byte PUTs; stock botocore hangs without this (boto/botocore#3123).
93+
pulp_scenario_env: {"BOTO_EXPERIMENTAL__NO_EMPTY_CONTINUE": "true"}
9394
VARSYAML
9495
fi
9596

.github/workflows/scripts/install.sh

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,6 @@ PIP_REQUIREMENTS=("pulp-cli" "yq")
2020
# This must be the **only** package install on the test runner.
2121
uv pip install ${PIP_REQUIREMENTS[*]}
2222

23-
if [[ "$TEST" = "s3" ]]; then
24-
for i in {1..3}
25-
do
26-
ansible-galaxy collection install "amazon.aws:11.1.0" && s=0 && break || s=$? && sleep 3
27-
done
28-
if [[ $s -gt 0 ]]
29-
then
30-
echo "Failed to install amazon.aws"
31-
exit $s
32-
fi
33-
fi
34-
3523
# Check out the pulp-cli branch matching the installed version.
3624
PULP_CLI_VERSION="$(uv pip freeze | sed -n -e 's/pulp-cli==//p')"
3725
git clone --depth 1 --branch "$PULP_CLI_VERSION" https://github.com/pulp/pulp-cli.git ../pulp-cli

0 commit comments

Comments
 (0)