diff --git a/eng/pipelines/insert.yml b/eng/pipelines/insert.yml index fbe3e79f368c2..7ffe9da377d64 100644 --- a/eng/pipelines/insert.yml +++ b/eng/pipelines/insert.yml @@ -28,6 +28,13 @@ parameters: type: string default: '' +# Defined variables that may be overwridden depending on the input parameters. +variables: + - name: Template.ComponentAzdoUri + value: '' + - name: Template.ComponentProjectName + value: '' + steps: - checkout: none @@ -37,9 +44,10 @@ steps: command: custom arguments: 'install RoslynTools.VisualStudioInsertionTool -PreRelease -Source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json' + # If we were passed a component build project name, set the corresponding uri and project name so we can retrieve the build. - powershell: | - Write-Host "##vso[task.setvariable variable=Insertion.ComponentAzdoUri]$($(System.CollectionUri))" - Write-Host "##vso[task.setvariable variable=Insertion.ComponentProjectName]$(${{ parameters.componentBuildProjectName }})" + Write-Host "##vso[task.setvariable variable=Template.ComponentAzdoUri]$($(System.CollectionUri))" + Write-Host "##vso[task.setvariable variable=Template.ComponentProjectName]$(${{ parameters.componentBuildProjectName }})" displayName: Set Insertion Variables condition: ne('${{ parameters.componentBuildProjectName }}', '') @@ -51,8 +59,8 @@ steps: -cherryPick "(default)" ` -clientId "${{ parameters.clientId }}" ` -clientSecret "${{ parameters.clientSecret }}" ` - -componentAzdoUri "$(Insertion.ComponentAzdoUri)" ` - -componentProjectName "$(Insertion.ComponentProjectName)" ` + -componentAzdoUri "$(Template.ComponentAzdoUri)" ` + -componentProjectName "$(Template.ComponentProjectName)" ` -componentName "Roslyn" ` -componentGitHubRepoName "dotnet/roslyn" ` -componentBranchName "${{ parameters.componentBranchName }}" `