I've created a powershell script that updates a Pipeline Variable during a Release Pipeline. It takes the custom variable and updates it with a new version using semantic versioning with every run.
I've tried to add this custom variable as the Release Pipeline but keeps on giving me an error "Names of releases from this pipeline will not be unique. Use pre-defined variables to generate unique release names."
I've tried setting the variable to "Settable at Release" and putting the scope to "Release"
Does anybody perhaps know if there is a way to let the release pipeline know this is a dynamic variable that changes?
The only other option is to add the revision number to it $(versionnumber)$(rev:.r)
$(rev:.r)
And you missed my point. What if you run the release twice, and it uses the same version number because a step fails before the pipeline is updated, or the pipeline itself fails while updating its own version number? Next time you run the pipeline, you'll get the same version number. Your scheme is not guaranteed to be unique. You need to add something that is guaranteed to make the name unique. – Daniel Mann