I have created a private npm package which is published to Azure Artifacts. To publish my npm package I have a npm publish step in my tfs build definition. I am using tfs version 16.131.28507.4
.
This all works as intented. However, if a build is triggered where the npm package version is unchanged the npm publish will fail with a 403
forbidden. This error causes the rest of my build to fail. The npm package is part of a larger project, so it will not be uncommon for builds to occur where the npm package is unchanged.
Is it possible to prevent the tfs build step which performs the npm publish
from running if the current version within my packages feed is the same as the version specified within the package json?
I aware of the "Custom Conditions" within the build step, but am unsure how to link the Azure Artifacts current published version with the version in my package.json
. I am also aware of the "Continue on Error" option within the build definition, but this creates a partially succeeded build which I would like to avoid in this case.