Skip to content

Commit

Permalink
Change the way of using env var (#4701)
Browse files Browse the repository at this point in the history
The PR is to fix the issue of missing comments:
<img width="1065" alt="image" src="https://user-images.githubusercontent.com/48036328/201760964-bb9cea9a-4961-4baf-9b39-a30b233776c9.png">
Expect the template pipeline information:
<img width="1105" alt="image" src="https://user-images.githubusercontent.com/48036328/201761221-fdd940a8-15e1-441c-ac4c-a0a1e19f0a83.png">
  • Loading branch information
sima-zhu authored Nov 15, 2022
1 parent 0055629 commit f2865c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion eng/common/scripts/Queue-Pipeline.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ if ($VsoQueuedPipelines) {
}else {
"[$($resp.definition.name)]($($resp._links.web.href))"
}
$QueuedPipelineLinks
LogDebug "Here are the queued pipeline links: "
LogDebug $QueuedPipelineLinks
Write-Host "##vso[task.setvariable variable=$VsoQueuedPipelines]$QueuedPipelineLinks"
}
8 changes: 4 additions & 4 deletions eng/pipelines/templates/steps/sync-directory.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ steps:
-Project "internal"
-SourceBranch "${{ parameters.UpstreamBranchName }}-ForTestPipeline"
-DefinitionId "$(${{repo}}-template-definition-id)"
-VsoQueuedPipelines "QueuedPipelines"
-VsoQueuedPipelines "QUEUEDPIPELINES"
-CancelPreviousBuilds $True
-Base64EncodedAuthToken "$(azuresdk-azure-sdk-devops-build-queuing-pat)"
Expand All @@ -107,13 +107,13 @@ steps:
-Project "internal"
-SourceBranch "${{ parameters.UpstreamBranchName }}-ForTestPipeline"
-DefinitionId "$(${{repo}}-template-tests-definition-id)"
-VsoQueuedPipelines "QueuedPipelines"
-VsoQueuedPipelines "QUEUEDPIPELINES"
-CancelPreviousBuilds $True
-Base64EncodedAuthToken "$(azuresdk-azure-sdk-devops-build-queuing-pat)"
- task: PowerShell@2
displayName: Write Queued Pipeline Information to Tools PR
condition: and(succeeded(), and(ne(variables['QueuedPipelines'], ''), eq(variables['Build.Reason'], 'PullRequest')))
condition: and(succeeded(), and(ne(variables['QUEUEDPIPELINES'], ''), eq(variables['Build.Reason'], 'PullRequest')))
inputs:
pwsh: true
workingDirectory: ${{ parameters.WorkingDirectory }}
Expand All @@ -122,7 +122,7 @@ steps:
-RepoOwner "Azure"
-RepoName "azure-sdk-tools"
-IssueNumber "$(System.PullRequest.PullRequestNumber)"
-Comment "The following pipelines have been queued for testing:<br>$env:QueuedPipelines`
-Comment "The following pipelines have been queued for testing:<br>$env:QUEUEDPIPELINES`
<br>You can sign off on the approval gate to test the release stage of each pipeline.`
<br>See [eng/common workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow)"
-AuthToken "$(azuresdk-github-pat)"
Expand Down

0 comments on commit f2865c5

Please sign in to comment.