Skip to content
代码片段 群组 项目
未验证 提交 5aa8fb0f 编辑于 作者: Joey Robichaud's avatar Joey Robichaud 提交者: GitHub
浏览文件

Set template variables in insert.yml

上级 db212357
No related branches found
No related tags found
无相关合并请求
...@@ -42,7 +42,7 @@ parameters: ...@@ -42,7 +42,7 @@ parameters:
- name: dropPath - name: dropPath
type: string type: string
default: '(default)' default: ''
steps: steps:
- checkout: none - checkout: none
...@@ -72,6 +72,7 @@ steps: ...@@ -72,6 +72,7 @@ steps:
Write-Host "##vso[task.setvariable variable=Template.InsertToolset]$($true)" Write-Host "##vso[task.setvariable variable=Template.InsertToolset]$($true)"
Write-Host "##vso[task.setvariable variable=Template.ComponentAzdoUri]$('')" Write-Host "##vso[task.setvariable variable=Template.ComponentAzdoUri]$('')"
Write-Host "##vso[task.setvariable variable=Template.ComponentProjectName]$('')" Write-Host "##vso[task.setvariable variable=Template.ComponentProjectName]$('')"
Write-Host "##vso[task.setvariable variable=Template.DropPath]$('(default)')"
Write-Host "##vso[task.setvariable variable=Template.ComponentBranchName]$branchName" Write-Host "##vso[task.setvariable variable=Template.ComponentBranchName]$branchName"
Write-Host "##vso[task.setvariable variable=Template.VSBranchName]$($branchData.vsBranch)" Write-Host "##vso[task.setvariable variable=Template.VSBranchName]$($branchData.vsBranch)"
...@@ -102,6 +103,15 @@ steps: ...@@ -102,6 +103,15 @@ steps:
PublishDataAccessToken: ${{ parameters.publishDataAccessToken }} PublishDataAccessToken: ${{ parameters.publishDataAccessToken }}
- powershell: | - powershell: |
# Set AzDO authorization template variables
Write-Host "Setting BuildUserName to $Env:BuildUserName"
Write-Host "##vso[task.setvariable variable=Template.BuildUserName]$Env:BuildUserName"
Write-Host "##vso[task.setvariable variable=Template.BuildPassword]$Env:BuildPassword"
Write-Host "Setting ComponentUserName to $Env:ComponentUserName"
Write-Host "##vso[task.setvariable variable=Template.ComponentUserName]$Env:ComponentUserName"
Write-Host "##vso[task.setvariable variable=Template.ComponentPassword]$Env:ComponentPassword"
# Overwrite template variables with values passed into this template as parameters # Overwrite template variables with values passed into this template as parameters
if ("" -ne $Env:CreateDraftPR) if ("" -ne $Env:CreateDraftPR)
{ {
...@@ -141,6 +151,12 @@ steps: ...@@ -141,6 +151,12 @@ steps:
Write-Host "##vso[task.setvariable variable=Template.ComponentProjectName]$Env:ComponentBuildProjectName" Write-Host "##vso[task.setvariable variable=Template.ComponentProjectName]$Env:ComponentBuildProjectName"
} }
if ("" -ne $Env:DropPath)
{
Write-Host "Setting DropPath to $Env:DropPath"
Write-Host "##vso[task.setvariable variable=Template.DropPath]$Env:DropPath"
}
displayName: Set Variables from Input Parameters displayName: Set Variables from Input Parameters
env: env:
BuildUserName: ${{ parameters.buildUserName }} BuildUserName: ${{ parameters.buildUserName }}
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册