Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User/salevy/autocomplete pr #325

Open
wants to merge 311 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
311 commits
Select commit Hold shift + click to select a range
0f5e194
roll back artifactory tests
shanifeldman Jul 18, 2016
3fd57bb
remove set -e from deploy script
shanifeldman Jul 18, 2016
af86259
fix mandatory task name in create task
shanifeldman Jul 19, 2016
bccb5f5
test user passwd version from env
shanifeldman Jul 19, 2016
b104c1d
test user passwd version from env roll back
shanifeldman Jul 19, 2016
b764a46
desperate attemt to wrap version number in parantheses :(
shanifeldman Jul 19, 2016
e7d13e3
unify create and deploy scripts
shanifeldman Jul 19, 2016
25c51f2
now deploy error reproducable and should be fixed
shanifeldman Jul 19, 2016
bd7c6ee
now deploy error reproducable and should be fixed
shanifeldman Jul 19, 2016
7a46a5d
direct upload errors to log not to /dev/stderr
shanifeldman Jul 20, 2016
71a02a5
Merge remote-tracking branch 'upstream/master'
shanifeldman Jul 24, 2016
ba78acb
support exporting w/o definition path (default path is name-id.json)
shanifeldman Jul 26, 2016
a9e2b1c
support exporting w/o definition path (default path is name-id.json)
shanifeldman Jul 26, 2016
5d9aa35
test Build.clean=source
shanifeldman Jul 26, 2016
634a475
add ability to export definition with revision
shanifeldman Jul 26, 2016
92cbc27
Merge remote-tracking branch 'upstream/master'
shanifeldman Jul 26, 2016
27976ff
add ability to list and export build templates
shanifeldman Jul 31, 2016
f05da15
remove root curl in deploy
shanifeldman Aug 3, 2016
073093c
push version number add .vscode to .gitignore
shanifeldman Aug 9, 2016
0500ad2
fix task id mandatory value
shanifeldman Aug 18, 2016
303a33e
merge upstream and try to fix gulp issues
Sep 7, 2016
dcca196
refactor a few places with missing q
grawcho Sep 7, 2016
daf8fad
refactor a few places with missing q
grawcho Sep 7, 2016
4b38e26
fix login issue in on-prem
grawcho Sep 7, 2016
2f4764b
roll back login to upsteam after update vso-node-api (still missing s…
grawcho Sep 8, 2016
d763a21
refactor IQBuildApit to IBuildApi
shanifeldman Sep 8, 2016
8e65c51
refactore IQAgentTaskApi to IAgentTaskApi
shanifeldman Sep 8, 2016
fd5acde
fix IQBuildApi issues in queue, details and keep
shanifeldman Sep 8, 2016
5e3f9b4
complete full validation fixes
shanifeldman Sep 8, 2016
5c7705d
fix login messages to reflect the successful failure to login
grawcho Sep 8, 2016
0ebad86
update missing refctor in export template
shanifeldman Sep 8, 2016
c9bf57e
fix bad type in Login return
shanifeldman Sep 12, 2016
93d01b5
merge upstream (need to fix compilation with npm)
shanifeldman Oct 5, 2016
10f97d0
Merge remote-tracking branch 'upstream/master'
grawcho Oct 5, 2016
86345bc
modify create WI to comply with upstream
grawcho Oct 6, 2016
2837659
add missing interpreter statement in app.ts
grawcho Oct 6, 2016
5ef5ce6
fix compilation issues for npm run build (remaining compilation issue…
shanifeldman Oct 10, 2016
704c656
return to Q in login
grawcho Oct 10, 2016
d079e9e
add typings and modify some file to fix compilation issues
shanifeldman Oct 10, 2016
8cbc7b2
fix missing typings for npm build compilation
shanifeldman Oct 10, 2016
830d077
remove resource create - replaced
grawcho Oct 10, 2016
dc5b79b
add manual installation instructions for developers
grawcho Oct 11, 2016
0c04901
add manual installation instructions for developers (fixes)
grawcho Oct 11, 2016
a967b12
add queue status options to build definitions and definitions task docs
grawcho Oct 11, 2016
3530c82
fix typoes in definitions docs.md
grawcho Oct 11, 2016
77b727b
upstream sync 0.3.37
grawcho Oct 18, 2016
4cd34ef
Merge remote-tracking branch 'upstream/master'
shanifeldman Oct 30, 2016
2aef932
upstream sync 0.3.38
shanifeldman Oct 30, 2016
4fcaeee
Merge remote-tracking branch 'upstream/master'
grawcho Nov 7, 2016
bf234c5
merge upsream
grawcho Nov 13, 2016
948b189
upstream sync
grawcho Nov 15, 2016
5498a4e
fix compilation command (missing serverCommand definition from upstream)
grawcho Nov 15, 2016
8ea2fec
change server command to true on acctual server commands
grawcho Nov 15, 2016
241cacd
add serverCommand=true in template list and export
grawcho Nov 15, 2016
17d95ff
refactor all custom features to include appropriate severCommand
grawcho Nov 15, 2016
01eed50
Merge remote-tracking branch 'upstream/master'
grawcho Nov 28, 2016
bd1197b
add ability to queue with params from string JSON
grawcho Nov 28, 2016
d168353
roll version to 0.3.41
grawcho Nov 28, 2016
d05f59f
add help text to explain queue with JSON string params
grawcho Nov 28, 2016
a760ff6
supress parameters message on null parameters
grawcho Nov 29, 2016
1645e05
fix location of version parameter in output
grawcho Nov 29, 2016
0405335
send parameters message to debug log
grawcho Nov 29, 2016
a1452a8
test CI
grawcho Nov 30, 2016
44a7849
Merge remote-tracking branch 'upstream/master'
grawcho Nov 30, 2016
43de8fe
upstream sync
grawcho Dec 13, 2016
d17e3b9
temporary state after API change
shanifeldman Dec 20, 2016
b690d3d
Revert "temporary state after API change"
shanifeldman Dec 20, 2016
c5816f1
remove old vso-node-api from typings
shanifeldman Dec 20, 2016
4b02ea8
added display draft of build definition
grawcho Dec 22, 2016
244a533
add task show function
shanifeldman Feb 1, 2017
81db639
add wait and timeout functionallity to build queue
grawcho Feb 16, 2017
205b1cc
push version number to 0.3.46
grawcho Feb 16, 2017
e1b89d9
add timeout param to help context
grawcho Feb 16, 2017
3275781
merge upstream 0.3.47
shanifeldman Feb 26, 2017
4e0302c
print build steps in queue build with wait
shanifeldman Feb 26, 2017
7e8acfa
Merge remote-tracking branch 'upstream/master'
shanifeldman Feb 28, 2017
769759c
add uuid typing
shanifeldman Feb 28, 2017
ee43779
add build log print feature
shanifeldman Feb 28, 2017
5097ced
download build logs as zip
shanifeldman Mar 6, 2017
713aeee
fix download logs
shanifeldman Mar 6, 2017
a5a48f3
change logs description
grawcho Mar 6, 2017
46e4f71
support native linux http_proxy by default
grawcho Mar 6, 2017
63b2f63
support nativ no_proxy on linux boxes
grawcho Mar 6, 2017
0328019
fix empty no_proxy variable on windows
shanifeldman Mar 7, 2017
2f1f3c6
manipulate maxxParallelism from agent cli
grawcho Mar 8, 2017
f77a279
fix passing 1 parallelism by default logic
grawcho Mar 8, 2017
bcdd787
initial handlig (list, show) for service Endpoints
shanifeldman Mar 14, 2017
111b99f
typo in endpoint show
shanifeldman Mar 28, 2017
5a5a978
another typo in endpoint list
shanifeldman Mar 28, 2017
9317c74
upstream sync with -h addition to args
grawcho Mar 28, 2017
13c0b0e
upstream sync 0.4.1
grawcho Apr 2, 2017
1a0e81f
fixes after upstream sync
grawcho Apr 2, 2017
1d29ef3
add outputPath prop to merge setting
grawcho Apr 2, 2017
18957ff
remove invalid typings
grawcho Apr 3, 2017
528c566
fix archiver typing
grawcho Apr 3, 2017
50866fe
fix compilation errors
grawcho Apr 3, 2017
89b3f15
remove uuid typing
shanifeldman Apr 3, 2017
fe04ad8
Merge remote-tracking branch 'upstream/master'
shanifeldman Apr 4, 2017
acbd7c2
revert latest VSTS API 0.4.2 - upstream sync
shanifeldman Apr 4, 2017
cba67b7
manually merge upstream changes to extention lib publish
grawcho Apr 4, 2017
260884f
add additional options to build doc
shanifeldman Apr 4, 2017
34048b5
fix line streightning in builds.md
grawcho Apr 4, 2017
efb8496
add details to builds.md and sudo -E to README.md
shanifeldman Apr 4, 2017
4647361
add chmod to README.md on build from sources option
shanifeldman Apr 4, 2017
a7fad35
add npm update to README.md on build from sources option
shanifeldman Apr 4, 2017
08875c7
add npm update to README.md on build from sources option
shanifeldman Apr 4, 2017
8a9f9ea
fix build keep
grawcho Apr 4, 2017
a25165d
fix build delete to disallow deletion of retained builds
grawcho Apr 4, 2017
4603e6e
fix build delete
grawcho Apr 4, 2017
9cad3b7
Merge remote-tracking branch 'upstream/master'
shanifeldman Apr 18, 2017
7de0870
Add git controls
Apr 30, 2017
0c28c73
update
Apr 30, 2017
9c9d1c6
another update
Apr 30, 2017
7bd5fa0
Merge pull request #1 from SaltyBadger/master
grawcho Apr 30, 2017
264dbf7
Add classes and request list logic
Apr 30, 2017
36c50f6
implemented complete pullrequest
Stas-shp May 3, 2017
9e6f01d
default.ts changes , complete and abandon implemantation
May 4, 2017
f627297
description update
May 4, 2017
7fa250d
final fixes
May 7, 2017
0b15b61
Merge pull request #2 from SaltyBadger/master
grawcho May 7, 2017
04e181a
add build report and jump version to separate git code PR features
grawcho May 7, 2017
d34d519
add PR details and add data to PR list
grawcho May 9, 2017
0f7acf7
add ability to delete source branch after complete PR
grawcho May 9, 2017
9eb7315
replace parseInt() with +
grawcho May 9, 2017
1187e46
Added filtering to request list
May 9, 2017
8e865f3
Merge branch 'master' into master
grawcho May 9, 2017
5c43673
Merge pull request #3 from SaltyBadger/master
grawcho May 9, 2017
d8ab486
added option to create and delete build agent pools programatically
grawcho May 15, 2017
679b9d7
add auto provision queues = true
grawcho May 15, 2017
a329d8c
handle the pool already exist error
grawcho May 16, 2017
00a71e2
move pools to pool\list and add pool details
grawcho May 16, 2017
af42d62
change pre-req of node 4.0.x to 7.0.x due to async await usage
grawcho May 18, 2017
e04fde2
adding git repository create delete and list options, move details to…
grawcho May 21, 2017
f9acd0d
change details to requestdetails
grawcho May 21, 2017
bd7bde4
Delete agent from pool
May 22, 2017
3525aad
Merge pull request #4 from SaltyBadger/master
shanifeldman May 22, 2017
4e1fef8
fix help for delete-agent
grawcho May 22, 2017
999f8c4
auto complete for new request + option to delete source
May 23, 2017
90640f3
Merge pull request #5 from SaltyBadger/master
shanifeldman May 23, 2017
81c3f22
sync upstream changes
grawcho May 28, 2017
fb4d865
test CI in VSTS
grawcho May 28, 2017
799a257
add vsts build badge to README
grawcho Jun 1, 2017
7140b21
add some relevant additonal badges
grawcho Jun 1, 2017
b7361ef
add some relevant additonal badges change caps
grawcho Jun 1, 2017
9894c0d
Merge remote-tracking branch 'upstream/master'
grawcho Jun 1, 2017
c9706d5
upstream sync
grawcho Jun 1, 2017
4b7d077
Dummy Commit
Stas-shp Jun 1, 2017
bda4fa4
Merge pull request #6 from SaltyBadger/master
grawcho Jun 1, 2017
e69f87d
Merge remote-tracking branch 'upstream/master'
grawcho Jun 21, 2017
70f6bf5
fix typings and add resource create from upstream
grawcho Jun 21, 2017
58b6cd6
lock typescript version to 2.2.2 due to compilation errors with 2.4.0
shanifeldman Jun 22, 2017
7aa2e79
add package-lock.json to git ignore to ignore npm i generated config
grawcho Jun 22, 2017
ae41c42
fix new capability when key does not exist
Jul 6, 2017
a1f2712
Merge pull request #7 from tamaramois/master
shanifeldman Jul 6, 2017
7833a5a
waiting for requests
Jul 10, 2017
4774603
Merge pull request #8 from tamaramois/master
shanifeldman Jul 10, 2017
516d039
..
Jul 11, 2017
2de14b3
Merge pull request #9 from tamaramois/master
grawcho Jul 11, 2017
c048afc
MS upstream changes
Jul 11, 2017
790e753
Merge remote-tracking branch 'grawcho/master'
Jul 11, 2017
cd95986
add test file
dudi938 Jul 11, 2017
cc4ba44
add empty validate model
dudi938 Jul 11, 2017
f9a7a8b
..
Jul 12, 2017
bf07014
Merge pull request #10 from tamaramois/master
grawcho Jul 12, 2017
a58f0b4
..
Jul 12, 2017
38c194f
Merge pull request #11 from tamaramois/master
grawcho Jul 12, 2017
44ab3a3
Fix validation task module
dudi938 Jul 16, 2017
ee8db5f
fix valid task module
dudi938 Jul 16, 2017
17b8c31
final fixing
dudi938 Jul 16, 2017
ef91905
Merge pull request #13 from dudi938/master
grawcho Jul 16, 2017
09731a5
fix typo in validate (validated successfully)
grawcho Jul 16, 2017
fba57da
..
Jul 17, 2017
1ab193c
Merge pull request #14 from tamaramois/master
grawcho Jul 18, 2017
0e19e84
fix the duplicate validate implemntion
dudi938 Jul 18, 2017
51e307f
Merge pull request #15 from dudi938/master
grawcho Jul 18, 2017
ec91b36
..
Aug 2, 2017
7a60d3e
..
Aug 7, 2017
edc0c75
Merge pull request #16 from tamaramois/master
grawcho Aug 7, 2017
0f0114c
remove redundent reference
grawcho Aug 7, 2017
e90fcfb
deleting disable.ts
Aug 7, 2017
58447de
adding validate.ts
Aug 7, 2017
ae9153b
Merge pull request #17 from tamaramois/master
grawcho Aug 7, 2017
c9227f0
fix build agnets list arguments (poolId not agentId)
grawcho Aug 21, 2017
ea19a5c
sync with upstream after changes to markdown parser
grawcho Sep 17, 2017
62748b0
Fix create new task variables bug
SaltyBadger Sep 27, 2017
085b029
Merge pull request #18 from SaltyBadger/master
grawcho Sep 27, 2017
63c425b
upstream sync with 0.4.11 - > 0.5.1
grawcho Oct 3, 2017
a9e37c7
roll ahead typescript version 2.2.2
grawcho Oct 18, 2017
15e2b67
upstream sync with version number conflict
Oct 24, 2017
23dcaf3
upstream changes Oct 25th
Oct 25, 2017
7d5fcdb
Merge remote-tracking branch 'upstream/master'
grawcho Oct 28, 2017
f4ed325
add repodetails support for vsts (TODO: add support for on prem)
Nov 6, 2017
4cff492
Lodash's omit is deprecated. Replaced with pickBy
Nov 14, 2017
0086ba4
Merge pull request #19 from amirhalatzi/updateLodash
grawcho Nov 14, 2017
4e39238
Merge remote-tracking branch 'upstream/master'
grawcho Nov 28, 2017
1556a70
modify build badge to shfeldma.visualstudio.com
grawcho Nov 28, 2017
151db33
fixed a bug that required 'defaultcollection' to be added ty the logi…
Nov 30, 2017
c347c79
You can still connect with 'defaultcollection' in the url field while…
Nov 30, 2017
9c2eedf
Merge pull request #22 from SaltyBadger/master
grawcho Dec 3, 2017
aa0d8ee
upstram sync
grawcho Dec 17, 2017
8491d09
ad lodash ^4.15.0 to @types - fix compilation issues
grawcho Dec 17, 2017
6131dbd
roll back lodash in @types
grawcho Dec 17, 2017
1322d36
replace badge to new TP
grawcho Dec 17, 2017
c82ccbb
lock @types/lodash 4.14.69
grawcho Dec 17, 2017
b9ef5a7
upstream sync for 0.5.* bump to 0.5.2
grawcho Dec 21, 2017
e6fbc36
bump version to 0.5.2 in pre build
grawcho Dec 21, 2017
6897548
upstream sync after some more changes
grawcho Dec 21, 2017
ad765df
add my details as authoring contributor
grawcho Dec 21, 2017
d3c8661
changes in package.json
grawcho Dec 23, 2017
01add06
Merge remote-tracking branch 'upstream/master'
grawcho Dec 23, 2017
5fbf0d2
remove require('q') from residual files in private fork
grawcho Dec 23, 2017
103955a
remove package-lock.json from sources
grawcho Dec 23, 2017
75f1cf6
upstram sync, dropping the package-lock file
grawcho Jan 7, 2018
a3b7e0c
add workitem links
grawcho Jan 10, 2018
ade8ce8
upstream sync 0.5.5
grawcho Feb 28, 2018
7f3b6a8
Merge remote-tracking branch 'upstream/master'
grawcho Mar 8, 2018
0a570c8
upstream sync 14032018
grawcho Mar 14, 2018
4061d6e
upstream sync
grawcho Apr 8, 2018
416b525
add request options
grawcho May 16, 2018
dbb6a3c
add some stuff to PR show options - PR ID squash, autocomplete, etc.
grawcho May 16, 2018
0813f4c
upstream sync 0.5.14
grawcho Jul 7, 2018
07d6fc6
upstream sync 0.5.14
grawcho Jul 7, 2018
17db794
upstream sync to 0.6.1
grawcho Sep 6, 2018
01d25c3
upstream sync to 0.6.3
grawcho Sep 25, 2018
8c75857
add update some build details before deleting
grawcho Oct 4, 2018
699d6e8
Merge remote-tracking branch 'upstream/master'
grawcho Nov 22, 2018
9fdc92c
Merge remote-tracking branch 'upstream/master'
grawcho Mar 25, 2019
cd62a31
add update endpoint info
grawcho Apr 7, 2019
97af7b1
add update endpoint info w/o print
grawcho Apr 7, 2019
cb25aa1
remove secret printing
grawcho Apr 7, 2019
f27a28f
Merge branch 'master' of github.com:Microsoft/tfs-cli
grawcho Apr 30, 2019
6bcddf0
starting to refactor to azure-devops-node-api (build is still boken)
grawcho Apr 30, 2019
2da0646
complete refactor to azure-devops-node-api
grawcho May 5, 2019
1160962
use all parameters in overload method
grawcho May 6, 2019
5108399
Merge branch 'master' of github.com:Microsoft/tfs-cli
grawcho May 6, 2019
3743d39
pop version number to update npm package
grawcho May 23, 2019
d73f70d
pop version number to update npm package
grawcho May 23, 2019
b98f265
add packa-lock file
grawcho May 23, 2019
cfdf2e8
refactor to support vsts node api 8.0.0 (still need to resolve Endpoi…
grawcho May 27, 2019
82769ca
fix compilation issue after api change of connected services (TODO: f…
grawcho Jun 3, 2019
38d1db5
missing saved change
grawcho Jun 3, 2019
5798df3
add build timeline to json function
grawcho Jun 26, 2019
6bb1e21
update package vesion number
grawcho Jun 26, 2019
27c9713
remove redundant file from repo
grawcho Jun 26, 2019
7df805c
fix create PR by adding empty searchCriteria TODO: fix deleteSourceBr…
grawcho Jul 2, 2019
902b84c
Merge branch 'master' of github.com:Microsoft/tfs-cli
grawcho Jul 2, 2019
85e17e3
bump version number after upstream sync
grawcho Jul 2, 2019
393cc15
Merge branch 'master' of github.com:Microsoft/tfs-cli
grawcho Jul 3, 2019
72a233f
upstream sync and bump version number to 0.7.81
grawcho Jul 3, 2019
ab40daa
add merge completion options
samlevy-microsoft Jul 15, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .directory
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[Dolphin]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed?

HeaderColumnWidths=469,82,146
Timestamp=2016,7,15,0,17,26
Version=3
ViewMode=1
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ node_modules

# VS Code Settings
.settings
.vscode
*_sample.json

# Generated by nexe
tmp/
tmp/

# ignore npm i generated package-lock.json
package-lock.json


9 changes: 6 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"**/.git": true,
Expand All @@ -8,5 +7,9 @@
"tmp/": true
},
"editor.insertSpaces": false,
"typescript.tsdk": "./node_modules/typescript/lib"
}
"typescript.tsdk": "./node_modules/typescript/lib",
"vsicons.presets.angular": false,
"editor.formatOnPaste": true,
"editor.minimap.enabled": true,
"editor.snippetSuggestions": "top"
}
38 changes: 36 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@
> NOTE: If you are looking for the new Azure DevOps CLI, see [vsts-cli](https://github.com/microsoft/vsts-cli)

[![NPM version](https://badge.fury.io/js/tfx-cli.svg)](http://badge.fury.io/js/tfx-cli)
#### Internal Deploy / Pull Request validation
[![build passing](https://shfeldma.visualstudio.com/_apis/public/build/definitions/f4b6db46-e446-49f0-a424-0bfb52c0925d/2/badge)](https://shfeldma.visualstudio.com/_apis/public/build/definitions/f4b6db46-e446-49f0-a424-0bfb52c0925d/2/badge)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like your personal org


Command utility for interacting with Microsoft Team Foundation Server and Azure DevOps Services (formerly VSTS). It is cross platform and supported on Windows, OS X, and Linux.

## Setup

First, download and install [Node.js](http://nodejs.org) 4.0.x or later and NPM (included with the installer)
First, download and install [Node.js](http://nodejs.org) 7.0.x or later and NPM (included with the installer or from sources)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Node 7 isn't a release supported by Node. Minimum would be an even number like 8


### Linux/OSX
```bash
sudo npm install -g tfx-cli
sudo -E npm install -g tfx-cli
```

### Windows
Expand All @@ -38,6 +40,7 @@ tfx <command> --help

* `tfx build` ([builds](docs/builds.md)): Queue, view, and get details for builds
* `tfx build tasks` ([build tasks](docs/buildtasks.md)): Create, list, upload and delete build tasks
* `tfx build definition` ([build definition/definitions](docs/definitions.md)): Create, manage, show, list, export, upload and delete build definitions
* `tfx extension` ([extensions](docs/extensions.md)): Package, manage, publisher Team Foundation Server / Azure DevOps extensions
* `tfx workitem` ([work items](docs/workitems.md)): Create, query and view work items.

Expand Down Expand Up @@ -126,3 +129,34 @@ We take contributions and fixes via Pull Request. [Read here](docs/contributions
## Code of Conduct

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [[email protected]](mailto:[email protected]) with any additional questions or comments.

## Manual installation (from sources)
* refer to installation for your OS (and follow the installation steps).
* clone the repository.
* to compile the sources run (see additional node modules):
```bash
npm update
npm run build `(from the repository root)`
```
`link the executable (and make executable)`
### Linux (bash)
```bash
sudo ln -s <repository root>\app.js /usr/bin/tfx
sudo chmod 755 /usr/bin/tfx
```
### windows
replace the content of `%appdata%\npm\tfx.cmd` with the following:
```bash
@IF EXIST "%~dp0\node.exe" (
"%~dp0\node.exe" "%~dp0\node_modules\tfx-cli\_build\app.js" %*
) ELSE (
@SETLOCAL
@SET PATHEXT=%PATHEXT:;.JS;=;%
node "%~dp0\node_modules\tfx-cli\_build\app.js" %*
)
```
### additional node modules
`run "npm outdated / update" to resolve modules dependecy or install the following modules (this may need to happen befor compilation)`
```bash
npm install archiver colors graceful-fs gulp-filter gulp-mocha gulp-tsb gulp-util is-utf8 pug jszip node-uuid prompt q readable-stream ts-promise typescript unique-stream user-home validator azure-devops-node-api xml2js del os-homedir copy-paste shelljs lodash [email protected] pretty-hrtime liftoff tildify interpret v8flags minimist onecolor winreg glob json-in-place mkdirp
```
1 change: 1 addition & 0 deletions app/app.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env node
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TS files aren't directly executable by Node

import command = require("./lib/command");
import common = require("./lib/common");
import errHandler = require("./lib/errorhandler");
Expand Down
39 changes: 39 additions & 0 deletions app/exec/build/agents/default.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import { TfCommand, CoreArguments } from "../../../lib/tfcommand";
import args = require("../../../lib/arguments");
import buildBase = require("../default");

export interface AgentArguments extends buildBase.BuildArguments {
agentId: args.IntArgument;
agentName: args.StringArgument;
poolId: args.IntArgument;
userCapabilityKey: args.StringArgument;
userCapabilityValue: args.StringArgument;
disable: args.StringArgument;
deleteAgent: args.StringArgument;
parallel: args.IntArgument;
waitForInProgressRequests: args.StringArgument;
}

export function getCommand(args: string[]): AgentBase<void> {
return new AgentBase<void>(args);
}

export class AgentBase<T> extends buildBase.BuildBase<AgentArguments, T> {
protected description = "Commands for managing Agents.";
protected serverCommand = false;
protected setCommandArgs(): void {
super.setCommandArgs();
this.registerCommandArgument("agentId", "Agent ID", "Identifies a particular Agent.", args.IntArgument,null);
this.registerCommandArgument("agentName", "Agent Name", "Required Agent Name.", args.StringArgument, null);
this.registerCommandArgument("poolId", "Agent Pool Id", "Required Agent pool ID For Edit.", args.IntArgument, null);
this.registerCommandArgument("userCapabilityKey", "Capability to add / edit", "Capability to add / edit to the Agent.", args.StringArgument, null);
this.registerCommandArgument("userCapabilityValue", "Value to add / edit", "Value to add / edit to the Agent User Capabilities.", args.StringArgument, null);
this.registerCommandArgument("disable", "disable / enable agent", "Update the agent status.", args.StringArgument, null);
this.registerCommandArgument("deleteAgent", "deleteagent", "Delete an agent.", args.StringArgument, null);
this.registerCommandArgument("parallel", "max agent parallelism", "Maximum parallel agent runs.", args.IntArgument, null);
this.registerCommandArgument("waitForInProgressRequests", "Wait For Active Requests", "Waiting for active Agent jobs / requests", args.StringArgument, null);
}
public exec(cmd?: any): Promise<any> {
return this.getHelp(cmd);
}
}
93 changes: 93 additions & 0 deletions app/exec/build/agents/delete.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
import { TfCommand } from "../../../lib/tfcommand";
import args = require("../../../lib/arguments");
import agentBase = require("./default");
import agentClient = require("azure-devops-node-api/TaskAgentApiBase");
import trace = require("../../../lib/trace");
import taskAgentContracts = require("azure-devops-node-api/interfaces/TaskAgentInterfaces");

export function describe(): string {
return "Delete an Agent";
}

export function getCommand(args: string[]): AgentDelete {
return new AgentDelete(args);
}

export class AgentDelete extends agentBase.AgentBase<taskAgentContracts.TaskAgent> {
protected serverCommand = true;
protected description = "Delete a Agent.";
protected getHelpArgs(): string[] {
return ["poolId", "agentId", "agentName", "deleteAgent"];
}


public exec(): Promise<void | taskAgentContracts.TaskAgent> {
trace.debug("delete-agents.exec");
if (this.connection.getCollectionUrl().includes("DefaultCollection")) {
var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/")));
} else {
var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl());
}

return Promise.all<number | string>([
this.commandArgs.poolId.val(),
this.commandArgs.agentId.val(),
this.commandArgs.agentName.val(),
this.commandArgs.deleteAgent.val()
]).then((values) => {
const [poolId, agentid, agentname, deleteAgent] = values;
var agents: number[] = null;
trace.debug("getting pool (id) : %s", poolId);
trace.debug("getting agent (id) : %s", agentid);
trace.debug("getting agent (name) : %s", agentname);
trace.info("Deleting Agent...");
if (agentid) {
agents = [agentid as number];
}
else if (agentname) {
trace.debug("No agent Id provided, checking for agent with name " + agentname);
return agentapi.then((api) => { api.getAgents(poolId as number, agentname as string).then((ao: taskAgentContracts.TaskAgent[]) => {
if (ao.length > 0) {
var aid = ao[0].id;
var an = ao[0].name;
trace.debug("found, agent id %s for agent name %s", aid, an);
return this._deleteAgent(agentapi, poolId as number, agentid as number, deleteAgent as string);
}
else {
trace.debug("No agents found with name " + agentname);
throw new Error("No agents found with name " + agentname);

}
});
});
}

trace.debug("deleting agent: %s", agentname);
return this._deleteAgent(agentapi, poolId as number, agentid as number, deleteAgent as string);
});
}

public friendlyOutput(agent: taskAgentContracts.TaskAgent): void {
trace.println();
trace.success('Agent %s deleted successfully!', agent.name);
}

private _deleteAgent(agentapi, pool: number, agentid: number, deleteAgent: string) {
return agentapi.getAgent(pool, agentid, true, true, null).then((agent) => {
trace.debug("deleting Agent: %s", deleteAgent);

if (deleteAgent) {
if (deleteAgent == "true") {
return agentapi.deleteAgent(pool, agentid).then(() => {
trace.debug("agent set for deletion : %s");
agent.id = null;
return agent;
})
}
if (deleteAgent != "true") {
trace.error("allowed value is [true] only!")
}
}
});
}
}
43 changes: 43 additions & 0 deletions app/exec/build/agents/list.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import { TfCommand } from "../../../lib/tfcommand";
import args = require("../../../lib/arguments");
import agentBase = require("./default");
import agentClient = require("azure-devops-node-api/TaskAgentApiBase");
import trace = require("../../../lib/trace");
import taskAgentContracts = require("azure-devops-node-api/interfaces/TaskAgentInterfaces");

export function getCommand(args: string[]): AgentDetails {
return new AgentDetails(args);
}

export class AgentDetails extends agentBase.AgentBase<taskAgentContracts.TaskAgent> {
protected serverCommand = true;
protected description = "Display extended Agent details.";
protected getHelpArgs(): string[] {
return ["project", "poolId"];
}

public exec(): Promise<taskAgentContracts.TaskAgent[]> {
trace.debug("list-agents.exec");
if (this.connection.getCollectionUrl().includes("DefaultCollection")) {
var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl().substring(0, this.connection.getCollectionUrl().lastIndexOf("/")));
} else {
var agentapi = this.webApi.getTaskAgentApi(this.connection.getCollectionUrl());
}
return this.commandArgs.poolId.val().then((pool) => {
trace.debug("getting pool : %s", pool);
return agentapi.then((api) => { return api.getAgents(pool);
});
});
}

public friendlyOutput(agents: taskAgentContracts.TaskAgent[]): void {
if (!agents) {
throw new Error("pool not supplied or not found");
}
trace.info("Agents in pool:")
trace.println();
agents.forEach((agent) => {
trace.info(" %s (%s) : %s ", agent.id, agent.version, agent.name);
});
}
}
Loading