How to update the built-in Microsoft task library in TFS 2017?

久未见 提交于 2020-07-09 17:07:23

问题


What is the process for upgrading the default tasks loaded by Microsoft in an on-premises TFS with no internet connectivity?

According to https://docs.microsoft.com/en-us/vsts/build-release/tasks/ there are several tasks now available and supported in TFS v2015-2018/VSTS that do not appear in my TFS 2017u2 installation (specifically the Download Secure File task).

The default tasks are not shown in the Manage Extension screens and the git repo (https://github.com/Microsoft/vsts-tasks) does not appear to have any instructions for how to package and install the latest versions in an existing TFS.


回答1:


Download Secure File this task is not support by TFS2017 update2 for now.

In the right of the task, there is a column called Versions which stands for the supported TFS version and VSTS for now.

I use TFS on-premises and I don't see some of these features. Why not?

Some of these features are available only on VSTS and not yet available on-premises. Some features are available on-premises if you have upgraded to the latest version of TFS.

Source Link

The task you need is only available/build-in with VSTS by now.


However, this task is open sourced, you could find it here. You could also build it and package it as normal extension. Take a look at below steps for your reference:

  1. Globally install typescript and tfx-cli (to package VSTS extensions): npm install -g typescript tfx-cli
  2. From the suitable of the repo run npm install. This will pull down the necessary modules for the tasks and for the build tools.
  3. Run npm run build to compile the build tasks or build a specific task (recommended): node make.js build --task ShellScript
  4. Run npm run package -- --version <version> to create the .vsix extension packages (supports multiple environments) that includes the build tasks.

With the .vsix files, you are easy to directly upload the extension. Details about this area, you could refer here:

  • How do you install extension vsix files to TFS 2015 (Update 3)?
  • How do I use the tfs-cli (tfx) to update a TFS extension for an on-premise TFS instance?

Besides, even you have published the extension to your TFS successfully, this task may not compatible with your present version, just Giulio said, you could create a test first. Certainly, you could also create your own extension as your demands.




回答2:


Look at the Contribute page: it is a bit cryptic if you are not familiar with Javascript tooling.

CAVEAT: there is no guarantee that an update Task works with your TFS version and rolling back a change is a non-trivial task. Use, at least, a separate Collection to test changes.



来源:https://stackoverflow.com/questions/48894922/how-to-update-the-built-in-microsoft-task-library-in-tfs-2017

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!