Skip to content

Commit 78ea46d

Browse files
scbeddCopilot
andcommitted
Transition to GitHub App auth, remove azuresdk-github-pat usage
Related to Azure/azure-sdk-tools#9842 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f260d50 commit 78ea46d

14 files changed

Lines changed: 35 additions & 12 deletions

eng/pipelines/aggregate-reports.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,13 @@ stages:
7979
python -m pip install -r scripts/repo_health_status_report/dev_requirements.txt
8080
displayName: 'Prep Environment'
8181
82+
- template: /eng/common/pipelines/templates/steps/login-to-github.yml
83+
8284
- task: PythonScript@0
8385
condition: succeededOrFailed()
8486
env:
8587
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
86-
GH_TOKEN: $(azuresdk-github-pat)
88+
GH_TOKEN: $(GH_TOKEN)
8789
inputs:
8890
scriptPath: 'scripts/repo_health_status_report/output_health_report.py'
8991
displayName: 'Generate Health Status Report'
@@ -95,7 +97,7 @@ stages:
9597
- task: PythonScript@0
9698
condition: succeededOrFailed()
9799
env:
98-
GH_TOKEN: $(azuresdk-github-pat)
100+
GH_TOKEN: $(GH_TOKEN)
99101
inputs:
100102
scriptPath: 'scripts/repo_type_completeness/generate_main_typescores.py'
101103
displayName: 'Update Type Completeness Scores'

eng/pipelines/conda-update-pipeline.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,4 @@ extends:
121121
- [ ] After upload, delete the dummy libraries and make the new packages publicly available in Conda.
122122
- [ ] Create an AKA link for new release logs here: http://aka.ms/
123123
BaseBranchName: main
124+
AuthToken: ''

eng/pipelines/docindex.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ jobs:
116116
TargetRepoName: $(DocRepoName)
117117
TargetRepoOwner: $(DocRepoOwner)
118118
WorkingDirectory: $(DocRepoLocation)
119+
AuthToken: ''
119120

120121
- task: AzureCLI@2
121122
displayName: Queue Docs CI build for main
@@ -200,6 +201,7 @@ jobs:
200201
WorkingDirectory: $(DocRepoLocation)
201202
ScriptDirectory: $(Build.SourcesDirectory)/eng/common/scripts
202203
PushArgs: -f
204+
AuthToken: ''
203205

204206
- task: AzureCLI@2
205207
displayName: Queue Docs CI build for daily branch

eng/pipelines/prepare-pipelines.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ extends:
77
template: /eng/common/pipelines/templates/jobs/prepare-pipelines.yml
88
parameters:
99
Repository: Azure/azure-sdk-for-python
10+
AuthToken: ''

eng/pipelines/templates/jobs/ci.tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,12 @@ jobs:
8989
Write-Host "##vso[task.setvariable variable=DOTNET_ROOT]$dotnetroot"
9090
displayName: 'Set DOTNET_ROOT'
9191
92+
- template: /eng/common/pipelines/templates/steps/login-to-github.yml
93+
9294
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
9395
parameters:
9496
${{ if endsWith(variables['Build.Repository.Name'], '-pr') }}:
95-
TokenToUseForAuth: $(azuresdk-github-pat)
97+
TokenToUseForAuth: $(GH_TOKEN)
9698
Paths:
9799
- '**'
98100

eng/pipelines/templates/jobs/live.tests.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,12 @@ jobs:
107107
container: $[ variables['Container'] ]
108108

109109
steps:
110+
- template: /eng/common/pipelines/templates/steps/login-to-github.yml
111+
110112
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
111113
parameters:
112114
${{ if endsWith(variables['Build.Repository.Name'], '-pr') }}:
113-
TokenToUseForAuth: $(azuresdk-github-pat)
115+
TokenToUseForAuth: $(GH_TOKEN)
114116
Paths:
115117
- '**'
116118

eng/pipelines/templates/jobs/update_pr.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ steps:
2323
python3 -m pip install -e $(Build.SourcesDirectory)/eng/tools/azure-sdk-tools[ghtools]
2424
displayName: 'Install Azure SDK tools'
2525

26+
- template: /eng/common/pipelines/templates/steps/login-to-github.yml
27+
2628
- script: python3 -m packaging_tools.update_pr -v --pr-number $(System.PullRequest.PullRequestNumber) --repo $(Build.Repository.Name)
2729
displayName: 'Update packaging of PR'
2830
env:
29-
GH_TOKEN: $(azuresdk-github-pat)
31+
GH_TOKEN: $(GH_TOKEN)

eng/pipelines/templates/stages/archetype-python-release.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ stages:
9696
ReleaseSha: $(Build.SourceVersion)
9797
RepoId: Azure/azure-sdk-for-python
9898
WorkingDirectory: $(System.DefaultWorkingDirectory)
99+
AuthToken: ''
99100

100101
- ${{if ne(artifact.skipPublishPackage, 'true')}}:
101102
- deployment: PublishPackage
@@ -352,6 +353,7 @@ stages:
352353
CommitMsg: "Increment package version after release of ${{ artifact.name }}"
353354
PRTitle: "Increment version for ${{ parameters.ServiceDirectory }} releases"
354355
CloseAfterOpenForTesting: '${{ parameters.TestPipeline }}'
356+
AuthToken: ''
355357

356358
- ${{if and(eq(variables['Build.Reason'], 'Manual'), eq(variables['System.TeamProject'], 'internal'))}}:
357359
- template: /eng/pipelines/templates/jobs/smoke.tests.yml

eng/pipelines/templates/stages/python-analyze-weekly.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ stages:
3232
- script: |
3333
python -m pip install -r eng/ci_tools.txt
3434
displayName: 'Prep Environment'
35+
36+
- template: /eng/common/pipelines/templates/steps/login-to-github.yml
37+
3538
- task: PythonScript@0
3639
displayName: 'Run Pylint Next'
3740
continueOnError: true
@@ -44,7 +47,7 @@ stages:
4447
--disablecov
4548
--filter-type="Omit_management"
4649
env:
47-
GH_TOKEN: $(azuresdk-github-pat)
50+
GH_TOKEN: $(GH_TOKEN)
4851

4952
- task: PythonScript@0
5053
displayName: 'Run MyPy Next'
@@ -57,7 +60,7 @@ stages:
5760
--checks="next-mypy"
5861
--disablecov
5962
env:
60-
GH_TOKEN: $(azuresdk-github-pat)
63+
GH_TOKEN: $(GH_TOKEN)
6164

6265
- task: PythonScript@0
6366
displayName: 'Run Pyright Next'
@@ -70,7 +73,7 @@ stages:
7073
--checks="next-pyright"
7174
--disablecov
7275
env:
73-
GH_TOKEN: $(azuresdk-github-pat)
76+
GH_TOKEN: $(GH_TOKEN)
7477

7578
- script: |
7679
python -m pip install PyGithub>=1.59.0
@@ -86,7 +89,7 @@ stages:
8689
--service="${{ parameters.ServiceDirectory }}"
8790
--disablecov
8891
env:
89-
GH_TOKEN: $(azuresdk-github-pat)
92+
GH_TOKEN: $(GH_TOKEN)
9093
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
9194

9295
- task: UsePythonVersion@0
@@ -108,4 +111,4 @@ stages:
108111
--service="${{ parameters.ServiceDirectory }}"
109112
--checks="next-sphinx"
110113
env:
111-
GH_TOKEN: $(azuresdk-github-pat)
114+
GH_TOKEN: $(GH_TOKEN)

eng/pipelines/templates/steps/build-package-artifacts.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ parameters:
2525
default: []
2626

2727
steps:
28+
- template: /eng/common/pipelines/templates/steps/login-to-github.yml
29+
2830
- template: /eng/common/pipelines/templates/steps/sparse-checkout.yml
2931
parameters:
3032
${{ if endsWith(variables['Build.Repository.Name'], '-pr') }}:
31-
TokenToUseForAuth: $(azuresdk-github-pat)
33+
TokenToUseForAuth: $(GH_TOKEN)
3234
Paths:
3335
- '**'
3436

0 commit comments

Comments
 (0)