From a0dcaedb14230ba0f2972dccfe48f2cce14de249 Mon Sep 17 00:00:00 2001 From: pulpbot Date: Sun, 14 Jan 2024 02:40:22 +0000 Subject: [PATCH] Update CI files [noissue] --- .ci/ansible/Containerfile.j2 | 20 +++++++------------ .github/template_gitref | 2 +- .github/workflows/scripts/before_install.sh | 4 ++-- .github/workflows/scripts/install.sh | 14 ++++++++++++- .../workflows/scripts/publish_client_pypi.sh | 2 +- .../workflows/scripts/publish_plugin_pypi.sh | 2 +- template_config.yml | 3 +-- 7 files changed, 26 insertions(+), 21 deletions(-) diff --git a/.ci/ansible/Containerfile.j2 b/.ci/ansible/Containerfile.j2 index 0eb5d5c..c6c21fd 100644 --- a/.ci/ansible/Containerfile.j2 +++ b/.ci/ansible/Containerfile.j2 @@ -2,27 +2,21 @@ FROM {{ ci_base | default("ghcr.io/pulp/pulp-ci-centos:" + pulp_container_tag) } # Add source directories to container {% for item in plugins %} -{% if item.source.startswith("./") or item.ci_requirements | default(false) %} ADD ./{{ item.name }} ./{{ item.name }} -{% endif %} {% endfor %} # Install python packages +# S3 botocore needs to be patched to handle responses from minio during 0-byte uploads +# Hacking botocore (https://github.com/boto/botocore/pull/1990) RUN pip3 install -{%- for item in plugins -%} -{%- if item.name == "pulp-certguard" -%} -{{ " " }}python-dateutil rhsm -{%- endif -%} -{{ " " }}{{ item.source }} -{%- if item.name == "pulpcore" -%} {%- if s3_test | default(false) -%} -[s3] -{%- elif azure_test | default(false) -%} -[azure] -{%- elif gcp_test | default(false) -%} -[google] +{{ " " }}git+https://github.com/fabricio-aguiar/botocore.git@fix-100-continue {%- endif -%} +{%- for item in plugins -%} +{{ " " }}{{ item.source }} +{%- if item.lowerbounds | default(false) -%} +{{ " " }}-c ./{{ item.name }}/lowerbounds_constraints.txt {%- endif -%} {%- if item.ci_requirements | default(false) -%} {{ " " }}-r ./{{ item.name }}/ci_requirements.txt diff --git a/.github/template_gitref b/.github/template_gitref index 5234c9a..bff7b99 100644 --- a/.github/template_gitref +++ b/.github/template_gitref @@ -1 +1 @@ -2021.08.26-293-gde76e9f +2021.08.26-301-g83f0607 diff --git a/.github/workflows/scripts/before_install.sh b/.github/workflows/scripts/before_install.sh index 441f42b..e73ed71 100755 --- a/.github/workflows/scripts/before_install.sh +++ b/.github/workflows/scripts/before_install.sh @@ -66,8 +66,8 @@ then fi if [[ "$TEST" = "lowerbounds" ]]; then - python3 .ci/scripts/calc_deps_lowerbounds.py > lowerbounds_requirements.txt - mv lowerbounds_requirements.txt requirements.txt + python3 .ci/scripts/calc_deps_lowerbounds.py > lowerbounds_constraints.txt + sed -i 's/\[.*\]//g' lowerbounds_constraints.txt fi if [ -f $POST_BEFORE_INSTALL ]; then diff --git a/.github/workflows/scripts/install.sh b/.github/workflows/scripts/install.sh index 3f7f2c4..cd45ddc 100755 --- a/.github/workflows/scripts/install.sh +++ b/.github/workflows/scripts/install.sh @@ -31,6 +31,13 @@ pip install ${PIP_REQUIREMENTS[*]} cd .ci/ansible/ +PLUGIN_SOURCE="${PLUGIN_NAME}" +if [ "$TEST" = "s3" ]; then + PLUGIN_SOURCE="${PLUGIN_SOURCE} pulpcore[s3]" +fi +if [ "$TEST" = "azure" ]; then + PLUGIN_SOURCE="${PLUGIN_SOURCE} pulpcore[azure]" +fi cat >> vars/main.yaml << VARSYAML image: @@ -38,13 +45,18 @@ image: tag: "ci_build" plugins: - name: pulp_npm - source: "${PLUGIN_NAME}" + source: "${PLUGIN_SOURCE}" VARSYAML if [[ -f ../../ci_requirements.txt ]]; then cat >> vars/main.yaml << VARSYAML ci_requirements: true VARSYAML fi +if [ "$TEST" = "lowerbounds" ]; then + cat >> vars/main.yaml << VARSYAML + lowerbounds: true +VARSYAML +fi cat >> vars/main.yaml << VARSYAML services: diff --git a/.github/workflows/scripts/publish_client_pypi.sh b/.github/workflows/scripts/publish_client_pypi.sh index df9f611..336c955 100755 --- a/.github/workflows/scripts/publish_client_pypi.sh +++ b/.github/workflows/scripts/publish_client_pypi.sh @@ -27,7 +27,7 @@ then exit fi -twine upload -u pulp -p "$PYPI_PASSWORD" \ +twine upload -u __token__ -p "$PYPI_API_TOKEN" \ "dist/pulp_npm_client-$VERSION-py3-none-any.whl" \ "dist/pulp_npm-client-$VERSION.tar.gz" \ ; diff --git a/.github/workflows/scripts/publish_plugin_pypi.sh b/.github/workflows/scripts/publish_plugin_pypi.sh index 7508ad5..8b1e476 100755 --- a/.github/workflows/scripts/publish_plugin_pypi.sh +++ b/.github/workflows/scripts/publish_plugin_pypi.sh @@ -27,7 +27,7 @@ then exit fi -twine upload -u pulp -p "$PYPI_PASSWORD" \ +twine upload -u __token__ -p "$PYPI_API_TOKEN" \ "dist/pulp_npm-$VERSION-py3-none-any.whl" \ "dist/pulp-npm-$VERSION.tar.gz" \ ; diff --git a/template_config.yml b/template_config.yml index 6e956b2..2a76056 100644 --- a/template_config.yml +++ b/template_config.yml @@ -1,7 +1,7 @@ # This config represents the latest values used when running the plugin-template. Any settings that # were not present before running plugin-template have been added with their default values. -# generated with plugin_template@2021.08.26-290-g4d54366 +# generated with plugin_template@2021.08.26-301-g83f0607 additional_repos: [] api_root: /pulp/ @@ -54,7 +54,6 @@ pulp_settings_gcp: null pulp_settings_s3: null pulpprojectdotorg_key_id: null pydocstyle: false -pypi_username: pulp python_version: '3.8' release_email: pulp-infra@redhat.com release_user: pulpbot