Skip to content

Commit

Permalink
Start to remove CC
Browse files Browse the repository at this point in the history
  • Loading branch information
luke-hagar-sp committed Feb 9, 2024
1 parent 052f7cd commit a4f9754
Show file tree
Hide file tree
Showing 105 changed files with 2,496 additions and 14,086 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/build_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ jobs:
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:
Expand All @@ -44,36 +44,28 @@ jobs:
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: Build V2 SDK
id: buildV2
if: steps.buildBeta.outcome == 'success'
run: |
rm -rf ./PSSailpoint/v2
java -jar openapi-generator-cli.jar generate -i api-specs/idn/sailpoint-api.v2.yaml -g powershell -o PSSailpoint/v2 --global-property skipFormModel=false --config sdk-resources/v2-config.yaml
- name: Build CC SDK
id: buildCC
if: steps.buildV2.outcome == 'success'
run: |
rm -rf ./PSSailpoint/cc
java -jar openapi-generator-cli.jar generate -i api-specs/idn/sailpoint-api.cc.yaml -g powershell -o PSSailpoint/cc --global-property skipFormModel=false --config sdk-resources/cc-config.yaml
node sdk-resources/postscript.js ./PSSailpoint/cc
- name: After SDK Build
if: steps.buildCC.outcome == 'success'
if: steps.buildV2.outcome == 'success'
shell: pwsh
run: |
$DebugPreference="Continue"
Import-Module -Name '.\PSSailpoint' -Verbose
Install-Module -Name Pester -Force
Invoke-Pester -Output Detailed ./PSSailpoint/tests/
Invoke-Pester -Output Detailed ./PSSailpoint/tests/
25 changes: 5 additions & 20 deletions .github/workflows/bump_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,13 @@ jobs:
fetch-depth: 0
token: ${{ secrets.DEVREL_SERVICE_TOKEN }}


- 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:
Expand Down Expand Up @@ -63,13 +62,10 @@ jobs:
- name: Update config files with new version
id: updateVersion
run: |
yq -i '.packageVersion = "${{ github.event.inputs.version }}"' sdk-resources/cc-config.yaml
yq -i '.packageVersion = "${{ github.event.inputs.version }}"' sdk-resources/v2-config.yaml
yq -i '.packageVersion = "${{ github.event.inputs.version }}"' sdk-resources/beta-config.yaml
yq -i '.packageVersion = "${{ github.event.inputs.version }}"' sdk-resources/v3-config.yaml
## Update Build.ps1 file with new version
- name: Update Build.ps1 ModuleVersion
id: updateModuleVersion
Expand All @@ -86,39 +82,31 @@ jobs:
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: Build V2 SDK
id: buildV2
if: steps.buildBeta.outcome == 'success'
run: |
rm -rf ./PSSailpoint/v2
java -jar openapi-generator-cli.jar generate -i api-specs/idn/sailpoint-api.v2.yaml -g powershell -o PSSailpoint/v2 --global-property skipFormModel=false --config sdk-resources/v2-config.yaml
- name: Build CC SDK
id: buildCC
if: steps.buildV2.outcome == 'success'
run: |
rm -rf ./PSSailpoint/cc
java -jar openapi-generator-cli.jar generate -i api-specs/idn/sailpoint-api.cc.yaml -g powershell -o PSSailpoint/cc --global-property skipFormModel=false --config sdk-resources/cc-config.yaml
node sdk-resources/postscript.js ./PSSailpoint/cc
- name: After SDK Build
id: buildSDK
if: steps.buildCC.outcome == 'success'
if: steps.buildV2.outcome == 'success'
shell: pwsh
run: |
$DebugPreference="Continue"
./PSSailpoint/Build.ps1
Import-Module -Name '.\PSSailpoint' -Verbose
- name: Commit changes and create new version tag
if: steps.buildSDK.outcome == 'success'
uses: stefanzweifel/git-auto-commit-action@v4
Expand All @@ -128,8 +116,6 @@ jobs:
commit_user_name: developer-relations-sp
commit_user_email: [email protected]



- name: Create Draft Release
id: createRelease
uses: actions/create-release@v1
Expand All @@ -140,4 +126,3 @@ jobs:
release_name: v${{ github.event.inputs.version }}
draft: false
prerelease: false

23 changes: 12 additions & 11 deletions PSSailpoint/Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ function Get-FunctionsToExport {

if ($ParserErr) {
throw $ParserErr
} else {
}
else {
foreach ($name in 'Begin', 'Process', 'End') {
foreach ($Statement in $Ast."${name}Block".Statements) {
if (
Expand All @@ -45,27 +46,27 @@ function Get-FunctionsToExport {
}

$ScriptDir = Split-Path $script:MyInvocation.MyCommand.Path
$FunctionPath = "$PSScriptRoot/v3/src/PSSailpoint/Api", "$PSScriptRoot/v3/src/PSSailpoint/Model", "$PSScriptRoot/v3/src/PSSailpoint/Client", "$PSScriptRoot/beta/src/PSSailpointBeta/Api", "$PSScriptRoot/beta/src/PSSailpointBeta/Model", "$PSScriptRoot/beta/src/PSSailpointBeta/Client", "$PSScriptRoot/v2/src/PSSailpointV2/Api", "$PSScriptRoot/v2/src/PSSailpointV2/Model", "$PSScriptRoot/v2/src/PSSailpointV2/Client", "$PSScriptRoot/cc/src/PSSailpointCC/Api", "$PSScriptRoot/cc/src/PSSailpointCC/Model", "$PSScriptRoot/cc/src/PSSailpointCC/Client", "$PSScriptRoot" | ForEach-Object {$_}
$FunctionPath = "$PSScriptRoot/v3/src/PSSailpoint/Api", "$PSScriptRoot/v3/src/PSSailpoint/Model", "$PSScriptRoot/v3/src/PSSailpoint/Client", "$PSScriptRoot/beta/src/PSSailpointBeta/Api", "$PSScriptRoot/beta/src/PSSailpointBeta/Model", "$PSScriptRoot/beta/src/PSSailpointBeta/Client", "$PSScriptRoot/v2/src/PSSailpointV2/Api", "$PSScriptRoot/v2/src/PSSailpointV2/Model", "$PSScriptRoot/v2/src/PSSailpointV2/Client", "$PSScriptRoot" | ForEach-Object { $_ }

$Manifest = @{
Path = "$ScriptDir\PSSailpoint.psd1"
Path = "$ScriptDir\PSSailpoint.psd1"

Author = 'Sailpoint Developer Relations'
CompanyName = 'SailPoint Technologies'
Description = 'PSSailpoint - the PowerShell module for IdentityNow'
Author = 'Sailpoint Developer Relations'
CompanyName = 'SailPoint Technologies'
Description = 'PSSailpoint - the PowerShell module for IdentityNow'

ModuleVersion = '1.2.1'
ModuleVersion = '1.2.1'

RootModule = 'PSSailpoint.psm1'
Guid = '7A197170-97E8-4DCD-A171-271D4AEC2F36' # Has to be static, otherwise each new build will be considered different module
RootModule = 'PSSailpoint.psm1'
Guid = '7A197170-97E8-4DCD-A171-271D4AEC2F36' # Has to be static, otherwise each new build will be considered different module

PowerShellVersion = '6.2'

FunctionsToExport = $FunctionPath | Get-ChildItem -Filter *.ps1 | Get-FunctionsToExport

VariablesToExport = @()
AliasesToExport = @()
CmdletsToExport = @()
AliasesToExport = @()
CmdletsToExport = @()

}

Expand Down
Loading

0 comments on commit a4f9754

Please sign in to comment.