Skip to content

Commit

Permalink
Update CI files
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
pulpbot committed Nov 24, 2023
1 parent ee75986 commit ce2d8d3
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/template_gitref
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2021.08.26-274-g4418509
2021.08.26-276-g45ce134
14 changes: 13 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,4 +285,16 @@ jobs:
bash .github/workflows/scripts/publish_client_gem.sh
- name: Create release on GitHub
run: bash .github/workflows/scripts/create_release_from_tag.sh ${{ github.event.inputs.release }}
uses: actions/github-script@v7
env:
TAG_NAME: ${{ inputs.release }}
with:
const { TAG_NAME } = process.env;

script: |
await github.rest.repos.createRelease({
owner: context.repo.owner,
repo: context.repo.repo,
tag_name: TAG_NAME,
make_latest: "legacy",
});
13 changes: 9 additions & 4 deletions .github/workflows/scripts/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,15 @@ password password
# Some commands like ansible-galaxy specifically require 600
cmd_prefix bash -c "chmod 600 ~pulp/.netrc"

# Workaround: Domains are not supported by the published bindings.
# Infer the client name from the package name by replacing "-" with "_".
# Use the component to infer the package name on older versions of pulpcore.

if [ "$(echo "$REPORTED_STATUS" | jq -r '.domain_enabled')" = "true" ]
then
# Workaround: Domains are not supported by the published bindings.
# Generate new bindings for all packages.
pushd ../pulp-openapi-generator
for item in $(echo "$REPORTED_STATUS" | jq -r '.versions[].package|sub("-"; "_")')
for item in $(echo "$REPORTED_STATUS" | jq -r '.versions[]|(.package // ("pulp_" + .component)|sub("pulp_core"; "pulpcore"))|sub("-"; "_")')
do
./generate.sh "${item}" python
cmd_prefix pip3 install "/root/pulp-openapi-generator/${item}-client"
Expand All @@ -66,7 +70,7 @@ then
else
# Sadly: Different pulpcore-versions aren't either...
pushd ../pulp-openapi-generator
for item in $(echo "$REPORTED_STATUS" | jq -r '.versions[]|select(.component!="core")|select(.component!="file").package|sub("-"; "_")')
for item in $(echo "$REPORTED_STATUS" | jq -r '.versions[]|select(.component!="core")|select(.component!="file")|(.package // ("pulp_" + .component)|sub("pulp_core"; "pulpcore"))|sub("-"; "_")')
do
./generate.sh "${item}" python
cmd_prefix pip3 install "/root/pulp-openapi-generator/${item}-client"
Expand All @@ -75,7 +79,8 @@ else
popd
fi

echo "$REPORTED_STATUS" | jq -r '.versions[]|(.package|sub("_"; "-")) + "-client==" + .version' > bindings_requirements.txt
# At this point, this is a safeguard only, so let's not make too much fuzz about the old status format.
echo "$REPORTED_STATUS" | jq -r '.versions[]|select(.package)|(.package|sub("_"; "-")) + "-client==" + .version' > bindings_requirements.txt
cmd_stdin_prefix bash -c "cat > /tmp/unittest_requirements.txt" < unittest_requirements.txt
cmd_stdin_prefix bash -c "cat > /tmp/functest_requirements.txt" < functest_requirements.txt
cmd_stdin_prefix bash -c "cat > /tmp/bindings_requirements.txt" < bindings_requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion docs/template_gitref
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2021.08.26-274-g6af418c
2021.08.26-276-g45ce134

0 comments on commit ce2d8d3

Please sign in to comment.