Mar 06 2023
12:06 AM
- last edited on
Mar 05 2024
02:30 PM
by
TechCommunityAP
Mar 06 2023
12:06 AM
- last edited on
Mar 05 2024
02:30 PM
by
TechCommunityAP
Hello,
This is my yaml pipeline
stages:
- stage: 'build'
displayName: 'Build'
jobs:
- job:
steps:
- task: CmdLine@2
name: 'calculateAppVersion'
displayName: 'Calculate Chart Versions'
inputs:
script: |
chartVersion="abcd1234"
echo "##vso[task.setvariable variable=chartVersion;isOutput=true]$chartVersion"
- template: ./template-scan.yaml
This is my template-scan
jobs:
- job: 'scan'
variables:
containerTag: $[ dependencies.${{parameters.dependentJob}}.outputs['setVariable.chartVersion'] ]
steps:
.
.
.
I am unable to access the container Tag value. Its always blank in template. Does this approach of dynamically creating the variable and then reading it in another job within template works.. If not, can anyone suggest some solution.
Thank you.
Kind Regards,
Tanul
Mar 06 2023 02:57 AM
SolutionMar 06 2023 02:57 AM
Solution