-
Notifications
You must be signed in to change notification settings - Fork 235
Changes to scripts to deal with PATs and AccessTokens #8340
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 6 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
2c8d95c
Changes to scripts to deal with PATs and AccessTokens
JimSuplizio 3e35349
Remove trailing backtick from the last line of the inline script
JimSuplizio 25a4748
fix path
JimSuplizio 09ff9bb
the linter pipeline is public, not internal
JimSuplizio 603e46b
swap access and auth for add-retention-lease
JimSuplizio 3b05e52
comment out the task that queues with the PAT
JimSuplizio 90234e2
AuthToken to BearerToken and remove unused Base64EncodedAuthToken fro…
JimSuplizio 3533c4a
remove unneccsary if not null check for the mandatory parameter
JimSuplizio f526922
Adding sync-directory changes to the PR
JimSuplizio 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
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,57 @@ | ||
| trigger: none | ||
|
|
||
| pr: none | ||
|
|
||
| jobs: | ||
| - job: Run | ||
| pool: | ||
| name: azsdk-pool-mms-ubuntu-2204-general | ||
| vmImage: ubuntu-22.04 | ||
| variables: | ||
| ToolsCODEOWNERSLinterId: 6597 | ||
| steps: | ||
| - template: /eng/common/pipelines/templates/steps/sparse-checkout.yml | ||
| - task: AzureCLI@2 | ||
| displayName: Test Authenticate to OpenSource API and queue pipeline | ||
| inputs: | ||
| azureSubscription: opensource-api-connection | ||
| scriptType: pscore | ||
| scriptLocation: inlineScript | ||
| inlineScript: | | ||
| $accessToken = az account get-access-token --resource "499b84ac-1321-427f-aa17-267ca6975798" --query "accessToken" --output tsv | ||
| eng/common/scripts/Queue-Pipeline.ps1 ` | ||
| -Organization "azure-sdk" ` | ||
| -Project "public" ` | ||
| -DefinitionId "$(ToolsCODEOWNERSLinterId)" ` | ||
| -AccessToken $accessToken | ||
|
|
||
| # # This task is going to become obsolete once the PATs go away | ||
| # # the queueing PAT will be gone first but there's another PAT | ||
| # # for queuing docs and this task is just testing the pipeline | ||
| # # scripts. This task will need to be commented out or removed. | ||
| # - task: PowerShell@2 | ||
| # displayName: Test Queue Pipeline with PAT | ||
| # inputs: | ||
| # pwsh: true | ||
| # filePath: eng/common/scripts/Queue-Pipeline.ps1 | ||
| # arguments: > | ||
| # -Organization "azure-sdk" | ||
| # -Project "public" | ||
| # -DefinitionId "$(ToolsCODEOWNERSLinterId)" | ||
| # -AuthToken "$(azuresdk-azure-sdk-devops-build-queuing-pat)" | ||
|
|
||
| - task: PowerShell@2 | ||
| displayName: Test Retain pipeline run | ||
| env: | ||
| SYSTEM_ACCESSTOKEN: $(System.AccessToken) | ||
| inputs: | ||
| pwsh: true | ||
| filePath: $(Build.SourcesDirectory)/eng/common/scripts/Add-RetentionLease.ps1 | ||
| arguments: > | ||
| -Organization azure-sdk | ||
| -Project $(System.TeamProject) | ||
| -DefinitionId $(System.DefinitionId) | ||
| -RunId $(Build.BuildId) | ||
| -DaysValid 7 | ||
| -AccessToken $env:SYSTEM_ACCESSTOKEN | ||
| -Debug |
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.