Skip to content

Commit def5bfd

Browse files
Fix Azure DevOps checkout step in the courtesy-push.js file (#21200)
* Reverting the paths based on checkout * Minor fixes in path resolution
1 parent 0627a7c commit def5bfd

File tree

2 files changed

+13
-25
lines changed

2 files changed

+13
-25
lines changed

ci/build-single-ado-pr-steps.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@ steps:
1212
versionSpec: 20.x
1313

1414
- script: |
15-
cd azure-pipelines-tasks
1615
npm install
1716
displayName: npm install
1817

1918
- script: |
20-
cd azure-pipelines-tasks/ci/courtesy-push
19+
cd ci/courtesy-push
2120
npm install
2221
displayName: npm install for courtesy push
2322

@@ -26,8 +25,8 @@ steps:
2625
artifactName: IndividualNugetPackages
2726
downloadPath: $(Build.SourcesDirectory)/IndividualNugetPackagesDownloaded
2827
displayName: Download Artifact
29-
30-
- powershell: ./azure-pipelines-tasks/ci/set-sprint-variables.ps1
28+
29+
- powershell: ./ci/set-sprint-variables.ps1
3130
displayName: Set currentSprint variables
3231

3332
- powershell: |
@@ -38,11 +37,10 @@ steps:
3837
# returns branchName
3938
- template: /ci/generate-branch-name.yml@self
4039

41-
- script: node azure-pipelines-tasks\ci\courtesy-push\courtesy-push.js $(Build.SourcesDirectory)/IndividualNugetPackagesDownloaded\IndividualNugetPackages\unified_deps.xml
40+
- script: node ci\courtesy-push\courtesy-push.js $(Build.SourcesDirectory)/IndividualNugetPackagesDownloaded\IndividualNugetPackages\unified_deps.xml
4241
displayName: Update unified deps and create branch
4342
env:
44-
USERNAME: $(Build.RequestedFor)
45-
PAT: $(System.AccessToken)
46-
USEREMAIL: $(Build.RequestedForEmail)
43+
TOKEN: $(System.AccessToken)
4744
BRANCH_NAME: $(branchName)
48-
45+
DRYRUN: $(isDryRun)
46+
USERNAME: $(username)

ci/courtesy-push.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,7 @@ steps:
55
displayName: Install nuget
66

77
- powershell: |
8-
$sourcePath = "$(Build.SourcesDirectory)/azure-pipelines-tasks/.gdn"
9-
$destinationPath = "$(Build.SourcesDirectory)/"
10-
Copy-Item -Path $sourcePath -Destination $destinationPath -Recurse
11-
displayName: Copy baseline files to root
12-
13-
- powershell: |
14-
cd azure-pipelines-tasks/ci/courtesy-push
8+
cd $(Build.SourcesDirectory)/ci/courtesy-push
159
npm install
1610
displayName: npm install
1711

@@ -21,7 +15,7 @@ steps:
2115
downloadPath: $(Build.SourcesDirectory)/IndividualNugetPackagesDownloaded
2216
displayName: Download Artifact
2317

24-
- powershell: ./azure-pipelines-tasks/ci/set-sprint-variables.ps1
18+
- powershell: $(Build.SourcesDirectory)/ci/set-sprint-variables.ps1
2519
displayName: Set currentSprint variables
2620

2721
- powershell: |
@@ -30,21 +24,17 @@ steps:
3024
displayName: Set currentDate variable
3125

3226
- template: /ci/generate-branch-name.yml@self
33-
parameters:
34-
prefix: users/$(Build.RequestedFor)
3527

36-
- script: node azure-pipelines-tasks\ci\courtesy-push\courtesy-push.js $(Build.SourcesDirectory)/IndividualNugetPackagesDownloaded\IndividualNugetPackages\unified_deps.xml
28+
- script: node $(Build.SourcesDirectory)/ci/courtesy-push/courtesy-push.js $(Build.SourcesDirectory)/IndividualNugetPackagesDownloaded/IndividualNugetPackages/unified_deps.xml
3729
displayName: Update unified deps and create branch
3830
env:
39-
USERNAME: $(Build.RequestedFor)
4031
TOKEN: $(System.AccessToken)
41-
USEREMAIL: $(Build.RequestedForEmail)
4232
BRANCH_NAME: $(branchName)
4333
DRYRUN: $(isDryRun)
44-
45-
- powershell: .\azure-pipelines-tasks\ci\courtesy-push\send-notification.ps1
34+
USERNAME: $(username)
35+
36+
- powershell: $(Build.SourcesDirectory)/ci/courtesy-push/send-notification.ps1
4637
displayName: Send MS Teams notification
4738
condition: eq(variables['build.reason'], 'Schedule')
4839
env:
4940
TEAMS_WEBHOOK: $(MSTeamsUri)
50-

0 commit comments

Comments
 (0)