Variable Update


I want to update an existing Project variable set of an existing release but getting error. Can you confirm if i can do it or not ?

Note: it’s a ProjectVariableSetSnapshot which i want to update and using PUT method to update.

Hi @mohitmishra.mishra1989,

Thanks for getting in touch!

You can’t directly edit the variable snapshot in this way, the correct way to do this would be to update the required project variable and then run the following script to force the release to refresh the variable snapshot.

I hope this helps, please let me know if you have any further questions.


Hi @paul.calvert,

Thanks for your reply !
We have a requirement in which sometimes we delete/disable process step and it’s leading us to deployment failure on higher environments.

for example: we have Dev, Test, PRE-PROD and PROD environment and it took almost 20 days to reach to PROD of a particular release.

Variables are configured to update automatically to the latest available values during every deployment propagation or redeployment of application.

But we if delete a process step (as from new version we don’t need it) and at the same time we we are propagating a release from PRE-PROD to PROD (deploy using update variable) then our variable got update and updated variables may not contains the variables which was used by deleted step but during propagation we still see the deleted process but can’t see the variables which was tagged with that deployment process in project variable.

so i was thinking if we can replace the new project level variables with the project variable template used in the last release. So i tried to update the release object but i came to know know that whenever you update the variables it replaced it with new one and delete the old variable template. So i thought to update the latest project variable template of old release with the values which it has before.

Hi @mohitmishra.mishra1989,

This may need to be handled at a process level.
When deleting steps would it be possible to leave the variables in place instead of immediately deleting them and then perform a review and cleanup of the variables on a periodic basis when you know it is safe to remove them?

Hi @paul.calvert,

This won’t work and it’s doesn’t look like a solution for us.
For Example:
We have 1 variable with three different values scoped with different deployment steps.

component Values_1 Scoped with 1st deployment step
Values_2 Scoped with 2nd deployment step
Values_3 Scoped with 3rd deployment step

Now I have deployed these 3 step project and after that if i delete one of the deployment step , it automatically delete the values which was scoped with that step as we have deleted the step.

Now the deployment will fail if we update the variables as updated variables won’t contain the value which was tagged with that process.

So conclusion is we can’t keep the variables as it get automatically deleted.

Ah ok, hadn’t realised you were using step scoping for the variables too.

Can I ask why the variable snapshot is updated before each release? Do you have security keys or similar within variables that change that often?

Yes, We have multiple things in LibrarySet it could be a Password for services (which will update periodically), other URL’s of different applications for integration purpose (Sometimes URL’s get changed),
color coding coding, SMTP values for mail intigrations and many more


Do we have any solution for this as it’s effecting our Prod Deployment and currently we have lots of steps which we want to remove but only due to this we are not able to delete those steps.

Hi @mohitmishra.mishra1989,

The only solutions I can imagine working for you scenario would be to either disable the steps that you wish to delete until any releases that use those steps are fully deployed, and then delete the steps (and variables) when you are certain it is safe to do so.

Or use channels to manage this. Whenever you’re making a change to the process you could create a new channel for this purpose. You would then scope the unwanted steps to the old channel and any required steps to the new channel.
This way you could easily track when a channel (and associated steps) is no longer needed just by checking the releases attached to that channel.

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.