-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstub.yml
26 lines (21 loc) · 1.07 KB
/
stub.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Stub pipeline
# Updates the TriggeringPipeline variable in AteCoreConfigGen2PipelineVariables group.
# After execution of this pipeline is finished, rcu-image-ci-pipeline.yml located in ateccgen2-script should be executed.
variables:
- group: AteCoreConfigGen2PipelineVariables
trigger:
- main
pr: none
pool:
name: Drivers-NIBuildFarm-RFMIBUILD
steps:
- script: echo Triggering rcu-image-ci-pipeline!
- powershell: |
$url = "https://dev.azure.com/ni/DevCentral/_apis/distributedtask/variablegroups/303?api-version=5.0-preview.1"
$json = '{"id":2,"type":"Vsts","name":"AteCoreConfigGen2PipelineVariables","variables":{"TriggeringPipeline":{"isSecret":false,"value":"ateccgen2-manifest"},"CommitMessage":{"isSecret":false,"value":"$(Build.SourceVersionMessage)"}}}'
$pipeline = Invoke-RestMethod -Uri $url -Method Put -Body $json -ContentType "application/json" -Headers @{
Authorization = "Bearer $env:SYSTEM_ACCESSTOKEN"
}
Write-Host "New Variable Value:" $pipeline.variables.TriggeringPipeline.value
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)