-
Notifications
You must be signed in to change notification settings - Fork 15
77 lines (65 loc) · 2.64 KB
/
build_pr.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: "Build Powershell SDK"
env:
SAIL_CLIENT_ID: ${{ secrets.SDK_TEST_TENANT_CLIENT_ID }}
SAIL_CLIENT_SECRET: ${{ secrets.SDK_TEST_TENANT_CLIENT_SECRET }}
SAIL_BASE_URL: ${{ secrets.SDK_TEST_TENANT_BASE_URL }}
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
build_powershell_sdk:
name: Build powershell SDK
runs-on: ubuntu-latest
steps:
- name: Checkout PR branch
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: Checkout API Specs Repo
uses: actions/checkout@v3
with:
repository: sailpoint-oss/api-specs
path: api-specs
ref: main
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: "16"
- name: Run Prescript
id: prescript
run: |
node sdk-resources/prescript.js api-specs/idn
- name: Build V2024 SDK
id: buildV2024
run: |
rm -rf ./PSSailpoint/v2024
java -jar openapi-generator-cli.jar generate -i api-specs/idn/sailpoint-api.v2024.yaml -g powershell -o PSSailpoint/v2024 --global-property skipFormModel=false --config sdk-resources/v2024-config.yaml
node sdk-resources/postscript.js ./PSSailpoint/v2024
- name: Build V3 SDK
id: buildV3
if: steps.buildV2024.outcome == 'success'
run: |
rm -rf ./PSSailpoint/v3
java -jar openapi-generator-cli.jar generate -i api-specs/idn/sailpoint-api.v3.yaml -g powershell -o PSSailpoint/v3 --global-property skipFormModel=false --config sdk-resources/v3-config.yaml
node sdk-resources/postscript.js ./PSSailpoint/v3
- name: Build Beta SDK
id: buildBeta
if: steps.buildV3.outcome == 'success'
run: |
rm -rf ./PSSailpoint/beta
java -jar openapi-generator-cli.jar generate -i api-specs/idn/sailpoint-api.beta.yaml -g powershell -o PSSailpoint/beta --global-property skipFormModel=false --config sdk-resources/beta-config.yaml
node sdk-resources/postscript.js ./PSSailpoint/beta
- name: After SDK Build
if: steps.buildBeta.outcome == 'success'
shell: pwsh
run: |
$DebugPreference="Continue"
Import-Module -Name '.\PSSailpoint\beta\src\PSSailpoint.Beta' -Verbose
Import-Module -Name '.\PSSailpoint\v3\src\PSSailpoint.V3' -Verbose
Import-Module -Name '.\PSSailpoint\v2024\src\PSSailpoint.V2024' -Verbose
. .\PSSailpoint\Configuration.ps1
. .\PSSailpoint\Pagination.ps1
Install-Module -Name Pester -Force
Invoke-Pester -Output Detailed ./PSSailpoint/tests/