I've been tirelessly trying to make my pipeline work according to the
They claim that if I do the following step I should be able to access Name
across multiple jobs:
pool:
name: ubuntu
parameters:
- name: sourceArtifactPath
type: string
jobs:
- job: Setup
steps:
- script: echo "##vso[task.setvariable variable=Name;isOutput=true]$(basename ${{ parameters.sourceArtifactPath }})"
name: SetVariables
displayName: "Set Pipeline Variables"
- script: echo $(SetVariables.Name)
- job: DoStuff
dependsOn: Setup
steps:
- bash: echo "Important work has beed done"
- job: Upload
dependsOn: DoStuff
variables:
artifactName: $[ dependencies.Setup.outputs['SetVariables.Name'] ]
steps:
- script: echo $(artifactName)
displayName: "Print Filename"
and it works for the reference inside same job, however when I try to access Setup.SetVariables.Name
from different job all im getting is:
==============================================================================
Generating script.
Script contents:
echo
========================== Starting Command Output ===========================
please help.
some questions look similar but are not exactly the same like: 1 2