skip to Main Content

enter image description hereenter image description hereenter image description hereI’m trying to update Azure DevOps Release Pipeline Variable Values but it is they are not updating.

Used In-line script PowerShell script.

2

Answers


    1. In your script, you are trying to move the value to the time variable but you do not use it.
    2. You can not use a new value of a pipeline variable in the same step through the pipeline variable reference. If you pass a new value with Write-Host "##vso... myvar]$somevalue" you may print it in some next build step: Write-Host "$(myvar)"

    Check the documentation:

    Login or Signup to reply.
  1. Even though you could change the initial value of your variables during the pipeline running, I suppose that the variable value you defined in the ui could not be updated after finishing.

    If you are going to pass the variables between stages, I suppose that you could refer to output variables.

    Update on 1/2

    =========================================

    After more tests, i realized that stages of release pipelines are run on different agents, and output variables could not be a good choice for you.

    If you are going to pass and update the value of your variable between different stages, I suppose that yaml could be the better choice instead of release pipeline.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search