CheesusCrust
CheesusCrust

Reputation: 21

TFS 2017 change existing parameter of custom build task

In the json file of a custom build task I have changed the value which will be sent to the powershell script when you select a parameter:

{
  "name": "VerbosityLevel",
  "type": "pickList",
  "label": "Level of Verbosity",
  "required": true,
  "helpMarkDown": "Select Verbosity level",
  "defaultValue": "-v:n",
  "options": {
    "quiet": "quiet",
    "minimal": "minimal",
    "normal": "normal",
    "detailed": "detailed",
    "diagnostic": "diagnostic"
  }
}

to this:

{
  "name": "VerbosityLevel",
  "type": "pickList",
  "label": "Level of Verbosity",
  "required": true,
  "helpMarkDown": "Select Verbosity level",
  "defaultValue": "-v:n",
  "options": {
    "-v:q": "quiet",
    "-v:m": "minimal",
    "-v:n": "normal",
    "-v:d": "detailed",
    "-v:diag": "diagnostic"
  }
}

Unfortunately, all build definitions that were already existing before the change and had that build step do not get updated and still contain the old values. Link to Build Definition json

Is there any efficient way to update all preexisting build definitions when you change something on an already existing parameter?

Upvotes: 1

Views: 317

Answers (1)

PatrickLu-MSFT
PatrickLu-MSFT

Reputation: 51153

There is a version of the task in task.json such as below:

"version": {
        "Major": 2,
        "Minor": 0,
        "Patch": 57
    },

You could directly update the version of task such as change 2.0.57 to 2.0.58...the changes will automatically replaced in all preexisting build definitions including the task.

However, if you change the major version of the task such as 2.0.57 to 3.0.57. You need to manually select the version in the top of the task such as below screenshot:

enter image description here

Upvotes: 1

Related Questions