This repo contains the in-the-box tasks for Team Services build. Tasks in this repo get deployed every three weeks to Team Services and appear in TFS quarterly updates.
If you are creating tasks that you believe the community can benefit from consider creating an extension.
Windows and Mac OSX: Download and install node from nodejs.org
Linux: Install using package manager
From a terminal ensure at least node 4.2 and npm 3:
$ node -v && npm -v
v4.2.0
3.5.0To install npm separately:
[sudo] npm install npm@3 -g
npm -v
3.5.0
Note: On windows if it's still returning npm 2.x run where npm. Notice hits in program files. Rename those two npm files and the 3.5.0 in AppData will win.
Once:
npm installALL:
# once
npm install
# build and test
npm run build
npm testTask:
# once
npm install
#build and test
node make.js build --task ShellScript
node make.js test --task ShellScript --suite L0From the root of the repo ...
Build all tasks
npm run build
# which is alias for
node make.js buildBuild a single task
node make.js build --task ShellScriptTasks will be created in the _build directory. It will also generate a tasks.loc.json and an english strings file under Strings in your source tree. You can check these back in. Another localization process will create the other strings files.
Tests for each task are located in Tests folder for each task
Set the environment variable TASK_TEST_TRACE to 1 for STDOUT to be printed from the test.
Run tests for tasks built
npm test
# which is alias for
node make.js testJust run tests for a given task and/or suite type
node make.js test --task ShellScript --suite L0Legacy tests are located in a Tests-Legacy folder which is a sibling to Tasks.
node make.js testLegacyFor a specific task
node make.js testLegacy --task XcodeThis must be done on a windows machine with nuget.exe in the path
From the root of the repo (replace version with appropriate version)
gulp package --version 1.0.29Tasks will be create a nuget package in the _package directory. This is only used for TFS internal engineering.
Tests should be run with changes. Ideally, new tests are added for your change.
Read here