From 7cf796d43cf31aeb0774f4fd2ed7aeedd817443c Mon Sep 17 00:00:00 2001 From: pulpbot Date: Sun, 19 May 2024 02:36:59 +0000 Subject: [PATCH] Update CI files [noissue] --- .github/template_gitref | 2 +- .github/workflows/build.yml | 1 + .github/workflows/publish.yml | 15 ++++++++++++--- .github/workflows/scripts/install.sh | 2 ++ .github/workflows/scripts/publish_client_pypi.sh | 10 ++++------ .github/workflows/test.yml | 7 +++++++ 6 files changed, 27 insertions(+), 10 deletions(-) diff --git a/.github/template_gitref b/.github/template_gitref index 2232d657d..d3966ad3e 100644 --- a/.github/template_gitref +++ b/.github/template_gitref @@ -1 +1 @@ -2021.08.26-330-g0b7d0c1 +2021.08.26-333-gdf1d3ba diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c97609c7d..5b24b539f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,3 +42,4 @@ jobs: path: "pulp_rpm/dist/" if-no-files-found: "error" retention-days: 5 + overwrite: true diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c3bbeeb62..d07b924be 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -88,25 +88,32 @@ jobs: run: | .github/workflows/scripts/install_ruby_client.sh shell: "bash" + - name: "Upload python client packages" uses: "actions/upload-artifact@v4" with: name: "python-client.tar" - path: "pulp_rpm/rpm-python-client.tar" + path: | + pulp_rpm/rpm-python-client.tar if-no-files-found: "error" + overwrite: true - name: "Upload python client docs" uses: "actions/upload-artifact@v4" with: name: "python-client-docs.tar" - path: "pulp_rpm/rpm-python-client-docs.tar" + path: | + pulp_rpm/rpm-python-client-docs.tar if-no-files-found: "error" + overwrite: true - name: "Upload ruby client packages" uses: "actions/upload-artifact@v4" with: name: "ruby-client.tar" - path: "pulp_rpm/rpm-ruby-client.tar" + path: | + pulp_rpm/rpm-ruby-client.tar if-no-files-found: "error" + overwrite: true - name: Build docs run: | export DJANGO_SETTINGS_MODULE=pulpcore.app.settings @@ -119,6 +126,8 @@ jobs: with: name: "docs.tar" path: "pulp_rpm/docs/docs.tar" + if-no-files-found: "error" + overwrite: true - name: "Logs" if: always() diff --git a/.github/workflows/scripts/install.sh b/.github/workflows/scripts/install.sh index ec0eead39..889aa6069 100755 --- a/.github/workflows/scripts/install.sh +++ b/.github/workflows/scripts/install.sh @@ -155,6 +155,7 @@ sudo chown -R 700:700 ~/.config echo ::group::SSL # Copy pulp CA sudo docker cp pulp:/etc/pulp/certs/pulp_webserver.crt /usr/local/share/ca-certificates/pulp_webserver.crt +sudo docker exec -u root pulp trust anchor /etc/pulp/certs/pulp_webserver.crt # Hack: adding pulp CA to certifi.where() CERTIFI=$(python -c 'import certifi; print(certifi.where())') @@ -183,6 +184,7 @@ if [[ "$TEST" = "azure" ]]; then cat /usr/local/share/ca-certificates/azcert.crt >> $AZCERTIFI cat /usr/local/share/ca-certificates/azcert.crt | cmd_stdin_prefix tee -a "$PULPCERTIFI" > /dev/null cat /usr/local/share/ca-certificates/azcert.crt | cmd_stdin_prefix tee -a /etc/pki/tls/cert.pem > /dev/null + cmd_stdin_prefix sudo trust anchor /etc/pki/tls/cert.pem AZURE_STORAGE_CONNECTION_STRING='DefaultEndpointsProtocol=https;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=https://ci-azurite:10000/devstoreaccount1;' az storage container create --name pulp-test --connection-string $AZURE_STORAGE_CONNECTION_STRING fi diff --git a/.github/workflows/scripts/publish_client_pypi.sh b/.github/workflows/scripts/publish_client_pypi.sh index 6b3f37bda..32e4ceb1a 100755 --- a/.github/workflows/scripts/publish_client_pypi.sh +++ b/.github/workflows/scripts/publish_client_pypi.sh @@ -24,10 +24,8 @@ RESPONSE="$(curl --write-out '%{http_code}' --silent --output /dev/null "https:/ if [ "$RESPONSE" == "200" ]; then echo "pulp_rpm client $VERSION has already been released. Skipping." - exit +else + twine upload -u __token__ -p "$PYPI_API_TOKEN" \ + "dist/pulp_rpm_client-$VERSION-py3-none-any.whl" \ + "dist/pulp_rpm-client-$VERSION.tar.gz" fi - -twine upload -u __token__ -p "$PYPI_API_TOKEN" \ -"dist/pulp_rpm_client-$VERSION-py3-none-any.whl" \ -"dist/pulp_rpm-client-$VERSION.tar.gz" \ -; diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8793eb54c..b213623be 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -125,6 +125,7 @@ jobs: path: "pulp_rpm/deprecations-${{ matrix.env.TEST }}.txt" if-no-files-found: "error" retention-days: 5 + overwrite: true - name: Upload python client packages if: ${{ env.TEST == 'pulp' }} uses: actions/upload-artifact@v4 @@ -133,6 +134,7 @@ jobs: path: "pulp_rpm/rpm-python-client.tar" if-no-files-found: "error" retention-days: 5 + overwrite: true - name: Upload python client docs if: ${{ env.TEST == 'pulp' }} @@ -142,6 +144,7 @@ jobs: path: "pulp_rpm/rpm-python-client-docs.tar" if-no-files-found: "error" retention-days: 5 + overwrite: true - name: Upload Ruby client if: ${{ env.TEST == 'pulp' }} uses: actions/upload-artifact@v4 @@ -150,12 +153,16 @@ jobs: path: "pulp_rpm/rpm-ruby-client.tar" if-no-files-found: "error" retention-days: 5 + overwrite: true - name: Upload built docs if: ${{ env.TEST == 'docs' }} uses: actions/upload-artifact@v4 with: name: "docs.tar" path: "pulp_rpm/docs/docs.tar" + if-no-files-found: "error" + retention-days: 5 + overwrite: true - name: "Logs" if: always()