-
Notifications
You must be signed in to change notification settings - Fork 437
[Utilities] Improve API version tests through the AzureAPICrawler PowerShell module
#2344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
de16689
Added IP to generate API specs file in ADO
AlexanderSehr cf8a7ad
Fixed var
AlexanderSehr 2a4614d
Swiched utility
AlexanderSehr 91ab133
Push updated API Specs file
1c8cb17
Update to latest
AlexanderSehr 6b5a6c1
Added GH wofklow
AlexanderSehr 196010c
Added docs
AlexanderSehr 67ae505
Updated Pester to use JSON file
AlexanderSehr f50eb8a
Updated docs
AlexanderSehr cf24301
Updated version
AlexanderSehr b3ba839
Push updated API Specs file
5b71581
Update to latest
AlexanderSehr 639a645
Push updated API Specs file
647f40a
Added gh push trigger for testing
AlexanderSehr f4f1a92
Removed temp push trigger again
AlexanderSehr fc4f9fe
Update utilities/tools/platform/Set-ApiSpecsFile.ps1
AlexanderSehr 18fa522
Push updated API Specs file
826a9a5
Updated git commands
AlexanderSehr 6fd34e0
Addressed param comment
AlexanderSehr db9244e
Merge branch 'main' into users/alsehr/leverageAPICrawler
AlexanderSehr b6e37b5
Introduced api version setting
AlexanderSehr c780950
Undid ado pipe changes
AlexanderSehr cf26a61
Update to latest
AlexanderSehr d3bdc2b
Added warning message for expiring API versions
AlexanderSehr c217070
Disallowing preview for test
AlexanderSehr c14625b
Push updated API Specs file
c62a4ba
Update docs/wiki/The CI environment - Static validation.md
AlexanderSehr cd9d771
Added verbosity
AlexanderSehr 0e91049
Push updated API Specs file
f0c7720
Update to latest
AlexanderSehr 856307e
Update to latest
AlexanderSehr e57e58f
Update to latest
AlexanderSehr 6578028
Update to latest
AlexanderSehr 12bbfc5
Update to latest
AlexanderSehr 617adc3
Update to latest
AlexanderSehr 86f59ba
Update settings.yml
AlexanderSehr 58d6bb7
Update settings.yml
AlexanderSehr 8d8df21
Update settings.yml
AlexanderSehr defea2d
Push updated API Specs file
865e93b
Merge branch 'main' into users/alsehr/leverageAPICrawler
AlexanderSehr 5d9973d
Added missing passthru of param
AlexanderSehr 484343f
Push updated API Specs file
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| name: '.Platform - Update API Specs file' | ||
|
|
||
| pr: none | ||
|
|
||
| schedules: | ||
| - cron: "0 12 * * 0" | ||
| displayName: Weekly Sunday Update | ||
| branches: | ||
| include: | ||
| - main | ||
|
|
||
| variables: | ||
| - template: '../../settings.yml' | ||
| - name: pipelinePrincipalGitUserName | ||
| value: 'CARMLPipelinePrincipal' | ||
| - name: pipelinePrincipalGitUserEmail | ||
| value: 'CARML@noreply.github.com' | ||
|
|
||
| jobs: | ||
| - job: Update_API_Specs_file | ||
| pool: | ||
| ${{ if ne(variables.vmImage, '') }}: | ||
| vmImage: ${{ variables.vmImage }} | ||
| ${{ if ne(variables.poolName, '') }}: | ||
| name: ${{ variables.poolName }} | ||
| steps: | ||
| - checkout: self | ||
| persistCredentials: true | ||
|
|
||
| - task: PowerShell@2 | ||
| displayName: 'Update file' | ||
| inputs: | ||
| targetType: inline | ||
| pwsh: true | ||
| script: | | ||
| # Load used functions | ||
| . (Join-Path '$(System.DefaultWorkingDirectory)' 'utilities' 'tools' 'platform' 'Set-ApiSpecsFile.ps1') | ||
|
|
||
| $functionInput = @{ | ||
| SpecsFilePath = Join-Path '$(System.DefaultWorkingDirectory)' 'utilities' 'src' 'apiSpecsList.json' | ||
| IncludePreview = $true | ||
| } | ||
|
|
||
| Write-Verbose "Invoke task with" -Verbose | ||
| Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose | ||
|
|
||
| Set-ApiSpecsFile @functionInput -Verbose | ||
|
|
||
| - task: PowerShell@2 | ||
| displayName: 'Push changes' | ||
| inputs: | ||
| targetType: inline | ||
| pwsh: true | ||
| script: | | ||
| git config --global user.email '$(pipelinePrincipalGitUserEmail)' | ||
| git config --global user.name '$(pipelinePrincipalGitUserName)' | ||
|
|
||
| git add . | ||
| git status | ||
| git commit -m 'Push updated API Specs file' | ||
| git pull $(Build.Repository.Uri) HEAD:$(Build.SourceBranch) | ||
| git push $(Build.Repository.Uri) HEAD:$(Build.SourceBranch) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| name: '.Platform: Update API Specs file' | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: '0 12 * * 0' # Weekly Sunday Update | ||
|
|
||
| env: | ||
| pipelinePrincipalGitUserName: 'CARMLPipelinePrincipal' | ||
| pipelinePrincipalGitUserEmail: 'CARML@noreply.github.com' | ||
|
|
||
| jobs: | ||
| job_update_api_specs_file: | ||
| runs-on: ubuntu-20.04 | ||
| name: 'Update file' | ||
| steps: | ||
| - name: 'Checkout' | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| fetch-depth: 0 | ||
| token: '${{ secrets.PLATFORM_REPO_UPDATE_PAT }}' # Sets general GIT credentials up | ||
| - name: 'Update file' | ||
| shell: pwsh | ||
| run: | | ||
| # Load used functions | ||
| . (Join-Path $env:GITHUB_WORKSPACE 'utilities' 'tools' 'platform' 'Set-ApiSpecsFile.ps1') | ||
|
|
||
| $functionInput = @{ | ||
| SpecsFilePath = Join-Path $env:GITHUB_WORKSPACE 'utilities' 'src' 'apiSpecsList.json' | ||
| IncludePreview = $true | ||
| } | ||
|
|
||
| Write-Verbose "Invoke task with" -Verbose | ||
| Write-Verbose ($functionInput | ConvertTo-Json | Out-String) -Verbose | ||
|
|
||
| Set-ApiSpecsFile @functionInput -Verbose | ||
|
|
||
| - name: 'Push changes' | ||
| shell: pwsh | ||
| run: | | ||
| git config --global user.email '${{ env.pipelinePrincipalGitUserEmail }}' | ||
| git config --global user.name '${{ env.pipelinePrincipalGitUserName }}' | ||
|
|
||
| git pull | ||
| git status | ||
| git add . | ||
| git commit -m 'Push updated API Specs file' | ||
| git push |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.