I need to pass the parameters for test suit id and test case id in the first yaml pipeline and and the same should be passed as the arguments in the second yaml pipeline code so when i trigger the first pipeline it should also trigger the second pipeline.
so, in the below two yml files have i done correctly?? pls check and tell me have provided the yml files,
For the firstpipeline i have written this yml >
name: SecondPipeline
trigger: none
This pipeline will be triggered by another pipeline
pool:
vmImage: ‘windows-latest’
parameters:
- name: testSuiteId
type: string
default: ” - name: testCaseId
type: string
default: ”
steps:
- script: |
echo “This pipeline was triggered after the first pipeline completed.”
echo “Test Suite ID: ${{ parameters.testSuiteId }}”
echo “Test Case ID: ${{ parameters.testCaseId }}”
echo “##vso[task.setvariable variable=testSuiteId;isOutput=true]${{ parameters.testSuiteId }}”
echo “##vso[task.setvariable variable=testCaseId;isOutput=true]${{ parameters.testCaseId }}”
and for the Secondpipeline I have written this yml,
name: FirstPipeline
variables:
- name: one
value: 4567
trigger:
- main
resources:
pipelines:
- pipeline: pipeline-par-previous # Name of the pipeline resource
source: First_Pipeline # Name of the pipeline referenced by the pipeline resource
project: Cloud_Project # Project name where the source pipeline exists
trigger: true # enable the trigger
pool:
vmImage: windows-latest
steps:
- script: |
echo ${{ variables.one }}
echo “Test Suite ID: $(TestSuiteId)”
echo “Test Case ID: $(TestCaseId)”
I am able to get the values for parameters when i trigger the firstpipeline but how to pass the arguments actually i need to do this > I need to pass the parameters for test suit id and test case id in the first yaml pipeline
and and the same should be passed as the arguments in the second yaml pipeline code so when i trigger the first pipeline it should also trigger the second pipeline.
Trh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.