Skip to content
Open
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
36 changes: 29 additions & 7 deletions .ci/ansible/start_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,35 @@
become: true

- name: "Create Pulp Bucket"
amazon.aws.s3_bucket:
aws_access_key: "{{ minio_access_key }}"
aws_secret_key: "{{ minio_secret_key }}"
endpoint_url: "http://minio:9000"
region: "eu-central-1"
name: "pulp3"
state: "present"
ansible.builtin.command:
argv:
- "python3"
- "-c"
- |
import boto3
from botocore.exceptions import ClientError
client = boto3.client(
"s3",
aws_access_key_id="{{ minio_access_key }}",
aws_secret_access_key="{{ minio_secret_key }}",
endpoint_url="http://minio:9000",
region_name="eu-central-1",
)
try:
client.create_bucket(
Bucket="pulp3",
CreateBucketConfiguration={"LocationConstraint": "eu-central-1"},
)
except ClientError as exc:
if exc.response["Error"]["Code"] not in (
"BucketAlreadyOwnedByYou",
"BucketAlreadyExists",
):
raise
register: "create_bucket"
retries: 6
delay: 5
until: "create_bucket is succeeded"
when: "s3_test | default(false)"

- name: "Wait on Services"
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/scripts/before_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ fi
COMPONENT_VERSION="$(bump-my-version show current_version | tail -n -1 | python -c 'from packaging.version import Version; print(Version(input()))')"
COMPONENT_SOURCE="./pulp_python/dist/pulp_python-${COMPONENT_VERSION}-py3-none-any.whl"
if [ "$TEST" = "s3" ]; then
COMPONENT_SOURCE="${COMPONENT_SOURCE} pulpcore[s3] git+https://github.com/gerrod3/botocore.git@fix-100-continue"
COMPONENT_SOURCE="${COMPONENT_SOURCE} pulpcore[s3]"
fi
if [ "$TEST" = "azure" ]; then
COMPONENT_SOURCE="${COMPONENT_SOURCE} pulpcore[azure,uvloop]"
Expand Down Expand Up @@ -89,7 +89,8 @@ s3_test: true
minio_access_key: "${MINIO_ACCESS_KEY}"
minio_secret_key: "${MINIO_SECRET_KEY}"
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}
pulp_scenario_env: {}
# MinIO omits 100-continue on 0-byte PUTs; stock botocore hangs without this (boto/botocore#3123).
pulp_scenario_env: {"BOTO_EXPERIMENTAL__NO_EMPTY_CONTINUE": "true"}
VARSYAML
fi

Expand Down
12 changes: 0 additions & 12 deletions .github/workflows/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,6 @@ PIP_REQUIREMENTS=("pulp-cli" "yq")
# This must be the **only** package install on the test runner.
uv pip install ${PIP_REQUIREMENTS[*]}

if [[ "$TEST" = "s3" ]]; then
for i in {1..3}
do
ansible-galaxy collection install "amazon.aws:11.1.0" && s=0 && break || s=$? && sleep 3
done
if [[ $s -gt 0 ]]
then
echo "Failed to install amazon.aws"
exit $s
fi
fi

# Check out the pulp-cli branch matching the installed version.
PULP_CLI_VERSION="$(uv pip freeze | sed -n -e 's/pulp-cli==//p')"
git clone --depth 1 --branch "$PULP_CLI_VERSION" https://github.com/pulp/pulp-cli.git ../pulp-cli
Expand Down
Loading