I have this weird issue with a pipeline template that I am currently trying to make work for different Angular/.NET builds:
The Pipeline references 3 stages: Prework, Angular and Backend.
In the Prework stage the GitVersion is fetched:
- task: gitversion/setup@0
displayName: "Install GitVersion v${{parameters.gitVersion}}"
inputs:
versionSpec: "${{parameters.gitVersion}}"
- task: gitversion/execute@0
displayName: Determine Version
name: CreateVersions
inputs:
targetPath: '$(Build.SourcesDirectory)'
useConfigFile: true
configFilePath: ${{parameters.gitVersionFilePath}}
- powershell: |
Write-host "Version to build: $(GitVersion.SemVer)"
Write-Host "##vso[task.setvariable variable=version;isOutput=true]$(GitVersion.SemVer)"
displayName: "Setup version"
name: Versions
That works on every repository.
However the next stage the gitVersion is resolved correctly to a version number in all repositories but one.
In the one case where it doesn’t work I get this during ng build in the angular stage:
npm ERR! Invalid version: "$[stageDependencies.Prework.General.outputs[CreateVersions.GitVersion.SemVer]]"
Every occurence of the version number looks like above and it is generally not resolved in the next stage.
I use exactly the same pipeline template and main template and really don’t know where to start looking.
I checked for shallow fetch to be disabled, played around with with the Syntax, checked for Pipeline Settings being different.
Disclaimer: I am a student and new to Azure DevOps and therefore lack experience.
The newbie is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.