Skip to content
Merged
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
103 changes: 103 additions & 0 deletions .github/actions/build-sdk/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: "Build Python SDK"
description: "Build all API versions of the Python SDK from OpenAPI specs"

inputs:
api-specs-path:
description: "Path to the checked-out api-specs repository"
required: false
default: "api-specs"
skip-tests:
description: "Skip running tests after building"
required: false
default: "false"

runs:
using: "composite"
steps:
- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: "24"

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Download OpenAPI Generator
shell: bash
run: |
wget -q https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.12.0/openapi-generator-cli-7.12.0.jar -O openapi-generator-cli.jar

- name: Run Prescript
shell: bash
run: node sdk-resources/prescript.js ${{ inputs.api-specs-path }}/idn

- name: Build V3 SDK
shell: bash
run: |
rm -rf ./sailpoint/v3
java -jar openapi-generator-cli.jar generate \
-i ${{ inputs.api-specs-path }}/idn/sailpoint-api.v3.yaml \
-g python -o . \
--global-property skipFormModel=false,apiDocs=true,modelDocs=true \
--config sdk-resources/v3-config.yaml \
--enable-post-process-file
node sdk-resources/postscript.js ./sailpoint/v3

- name: Build Beta SDK
shell: bash
run: |
rm -rf ./sailpoint/beta
java -jar openapi-generator-cli.jar generate \
-i ${{ inputs.api-specs-path }}/idn/sailpoint-api.beta.yaml \
-g python -o . \
--global-property skipFormModel=false,apiDocs=true,modelDocs=true \
--config sdk-resources/beta-config.yaml \
--enable-post-process-file
node sdk-resources/postscript.js ./sailpoint/beta

- name: Build V2024 SDK
shell: bash
run: |
rm -rf ./sailpoint/v2024
java -jar openapi-generator-cli.jar generate \
-i ${{ inputs.api-specs-path }}/idn/sailpoint-api.v2024.yaml \
-g python -o . \
--global-property skipFormModel=false,apiDocs=true,modelDocs=true \
--config sdk-resources/v2024-config.yaml \
--enable-post-process-file
node sdk-resources/postscript.js ./sailpoint/v2024

- name: Build V2025 SDK
shell: bash
run: |
rm -rf ./sailpoint/v2025
java -jar openapi-generator-cli.jar generate \
-i ${{ inputs.api-specs-path }}/idn/sailpoint-api.v2025.yaml \
-g python -o . \
--global-property skipFormModel=false,apiDocs=true,modelDocs=true \
--config sdk-resources/v2025-config.yaml \
--enable-post-process-file
node sdk-resources/postscript.js ./sailpoint/v2025

- name: Build V2026 SDK
shell: bash
run: |
rm -rf ./sailpoint/v2026
java -jar openapi-generator-cli.jar generate \
-i ${{ inputs.api-specs-path }}/idn/sailpoint-api.v2026.yaml \
-g python -o . \
--global-property skipFormModel=false,apiDocs=true,modelDocs=true \
--config sdk-resources/v2026-config.yaml \
--enable-post-process-file
node sdk-resources/postscript.js ./sailpoint/v2026

- name: Build and Test
shell: bash
run: |
pip install -r requirements.txt
pip install -e .
if [ "${{ inputs.skip-tests }}" != "true" ]; then
python validation_test.py -v
fi
77 changes: 8 additions & 69 deletions .github/workflows/build_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,85 +11,24 @@ on:
- main
workflow_dispatch:

concurrency:
group: pr-build-${{ github.ref }}
cancel-in-progress: true

jobs:
build_python_sdk:
name: Build Python SDK
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
- name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ github.ref }}

- name: Checkout API Specs Repo
- name: Checkout API Specs
uses: actions/checkout@v6
with:
repository: sailpoint-oss/api-specs
path: api-specs
ref: main

- name: Set up Node
uses: actions/setup-node@v6
with:
node-version: "24"

- name: Download OpenAPI Generator
run: |
wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/7.11.0/openapi-generator-cli-7.11.0.jar -O openapi-generator-cli.jar

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Run Prescript
id: prescript
run: |
node sdk-resources/prescript.js api-specs/idn

- name: Build V3 SDK
id: buildV3
if: steps.prescript.outcome == 'success'
run: |
rm -rf ./sailpoint/v3
java -jar openapi-generator-cli.jar generate -i api-specs/idn/sailpoint-api.v3.yaml -g python -o . --global-property skipFormModel=false,apiDocs=true,modelDocs=true --config sdk-resources/v3-config.yaml --enable-post-process-file
node sdk-resources/postscript.js ./sailpoint/v3

- name: Build Beta SDK
id: buildBeta
if: steps.buildV3.outcome == 'success'
run: |
rm -rf ./sailpoint/beta
java -jar openapi-generator-cli.jar generate -i api-specs/idn/sailpoint-api.beta.yaml -g python -o . --global-property skipFormModel=false,apiDocs=true,modelDocs=true --config sdk-resources/beta-config.yaml --enable-post-process-file
node sdk-resources/postscript.js ./sailpoint/beta

- name: Build V2024 SDK
id: buildV2024
if: steps.buildBeta.outcome == 'success'
run: |
rm -rf ./sailpoint/v2024
java -jar openapi-generator-cli.jar generate -i api-specs/idn/sailpoint-api.v2024.yaml -g python -o . --global-property skipFormModel=false,apiDocs=true,modelDocs=true --config sdk-resources/v2024-config.yaml --enable-post-process-file
node sdk-resources/postscript.js ./sailpoint/v2024

- name: Build V2025 SDK
id: buildV2025
if: steps.buildV2024.outcome == 'success'
run: |
rm -rf ./sailpoint/v2025
java -jar openapi-generator-cli.jar generate -i api-specs/idn/sailpoint-api.v2025.yaml -g python -o . --global-property skipFormModel=false,apiDocs=true,modelDocs=true --config sdk-resources/v2025-config.yaml --enable-post-process-file
node sdk-resources/postscript.js ./sailpoint/v2025

- name: Build V2026 SDK
id: buildV2026
if: steps.buildV2025.outcome == 'success'
run: |
rm -rf ./sailpoint/v2026
java -jar openapi-generator-cli.jar generate -i api-specs/idn/sailpoint-api.v2026.yaml -g python -o . --global-property skipFormModel=false,apiDocs=true,modelDocs=true --config sdk-resources/v2026-config.yaml --enable-post-process-file
node sdk-resources/postscript.js ./sailpoint/v2026

- name: After SDK Build
if: steps.buildV2026.outcome == 'success'
run: |
pip install -r requirements.txt
pip install -e .
python validation_test.py -v
- name: Build SDK
uses: ./.github/actions/build-sdk
161 changes: 0 additions & 161 deletions .github/workflows/bump_version.yaml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Publish to PyPI"

on:
release:
types: [created]
workflow_dispatch:

jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Install build package
run: python -m pip install --upgrade build

- name: Build package
run: python -m build

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
Loading