Skip to content

Commit

Permalink
Merge pull request #87 from sailpoint-oss/feature/experimental
Browse files Browse the repository at this point in the history
Update PowerShell SDK to accommodate new Versioning
  • Loading branch information
tyler-mairose-sp committed Aug 6, 2024
2 parents e5c04ee + 7ba36ef commit a697fa8
Show file tree
Hide file tree
Showing 3,278 changed files with 290,565 additions and 13 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
8 changes: 8 additions & 0 deletions .github/workflows/build_pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,16 @@ jobs:
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
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/bump_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
run: |
yq -i '.packageVersion = "${{ github.event.inputs.version }}"' sdk-resources/beta-config.yaml
yq -i '.packageVersion = "${{ github.event.inputs.version }}"' sdk-resources/v3-config.yaml
yq -i '.packageVersion = "${{ github.event.inputs.version }}"' sdk-resources/v2024-config.yaml
## Update Build.ps1 file with new version
- name: Update Build.ps1 ModuleVersion
Expand All @@ -74,9 +75,17 @@ jobs:
cd PSSailpoint
sed -e "s/ModuleVersion = '${LATEST_TAG:1}'/ModuleVersion = '${{ github.event.inputs.version }}'/g" Build.ps1 > Build.ps1.tmp && mv Build.ps1.tmp Build.ps1
- name: Build V2024 SDK
id: buildV2024
if: steps.updateModuleVersion.outcome == 'success'
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.updateModuleVersion.outcome == 'success'
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
Expand Down
2 changes: 1 addition & 1 deletion PSSailpoint/Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ 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" | 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/v2024/src/PSSailpointV2024/Api", "$PSScriptRoot/v2024/src/PSSailpointV2024/Model", "$PSScriptRoot/v2024/src/PSSailpointV2024/Client", "$PSScriptRoot" | ForEach-Object { $_ }

$Manifest = @{
Path = "$ScriptDir\PSSailpoint.psd1"
Expand Down
9 changes: 9 additions & 0 deletions PSSailpoint/Configuration.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ function Get-DefaultConfiguration {
$Configuration["Proxy"] = $null
}

if (!$Configuration.containsKey("Experimental")) {
$Configuration["Experimental"] = $false
}

Return $Configuration

}
Expand Down Expand Up @@ -124,6 +128,7 @@ function Set-DefaultConfiguration {
[string]$ClientSecret,
[System.Nullable[Int32]]$MaximumRetryCount,
[System.Nullable[Int32]]$RetryIntervalSeconds,
[System.Nullable[Boolean]]$Experimental,
[System.Object]$Proxy,
[switch]$PassThru
)
Expand Down Expand Up @@ -167,6 +172,10 @@ function Set-DefaultConfiguration {
$Script:Configuration['MaximumRetryCount'] = $MaximumRetryCount
}

If ($Experimental) {
$Script:Configuration['Experimental'] = $Experimental
}

If ($null -ne $Proxy) {
If ($Proxy.GetType().FullName -ne "System.Net.SystemWebProxy" -and $Proxy.GetType().FullName -ne "System.Net.WebProxy" -and $Proxy.GetType().FullName -ne "System.Net.WebRequest+WebProxyWrapperOpaque") {
throw "Incorrect Proxy type '$($Proxy.GetType().FullName)'. Must be System.Net.WebProxy or System.Net.SystemWebProxy or System.Net.WebRequest+WebProxyWrapperOpaque."
Expand Down
Loading

0 comments on commit a697fa8

Please sign in to comment.