Skip to content

Commit

Permalink
Fix openapi client generation in the playbooks.
Browse files Browse the repository at this point in the history
No-Issue

Signed-off-by: James Tanner <[email protected]>
  • Loading branch information
jctanner committed Mar 28, 2024
1 parent 65421b2 commit be4b183
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,16 @@
command: >
cd ../../../pulp-openapi-generator;
export USE_LOCAL_API_JSON=true;
export PULP_URL='https://{{ pulp_ip.stdout }}/api/galaxy/pulp/api/v3/';
curl -L -k -u admin:password -o status.json 'https://{{ pulp_ip.stdout }}/api/galaxy/pulp/api/v3/status/';
curl -L -k -u admin:password -o api.json 'https://{{ pulp_ip.stdout }}/api/galaxy/pulp/api/v3/docs/api.json?bindings&plugin={{ item }}';
bash -x generate.sh {{ item }} python
if [[ "{{ item }}" == "galaxy_ng" ]]; then
export REPORTED_VERSION=$(jq '.versions[] | select (.component == "galaxy").version' status.json | tr -d '"')
export VERSION="$(echo "$REPORTED_VERSION" | python -c 'from packaging.version import Version; print(Version(input()))')"
else
export VERSION=""
fi;
bash -x generate.sh {{ item }} python $VERSION
connection: local
loop:
- galaxy_ng
Expand All @@ -25,7 +33,8 @@
- pulpcore

- name: install the generated client inside the pulp container
shell: cd /src/pulp-openapi-generator/{{ item }}-client/; pip3 install -e .
#shell: cd /src/pulp-openapi-generator/{{ item }}-client/; pip3 install -e .
shell: cd /src/pulp-openapi-generator/{{ item }}-client/; pip3 install .
loop:
- galaxy_ng
- pulp_ansible
Expand Down

0 comments on commit be4b183

Please sign in to comment.