microsoft / tfs-cli

Cross-platform CLI for Microsoft Team Foundation Server and Visual Studio Team Services
MIT License
370 stars 131 forks source link

resources for build tasks create are missing #151

Open thoemmi opened 8 years ago

thoemmi commented 8 years ago

I installed the latest release (0.3.30) and created a new task by calling tfx build tasks create. A `task.json' was created, but the sample scripts and the icon are missing. I enabled tracing and discovered that the resources are missing. Here's the output when creating a sample task:

2016-09-26T21:55:17.776Z : loader.load
TFS Cross Platform Command Line Interface v0.3.30
Copyright Microsoft Corporation
2016-09-26T21:55:17.972Z : build-create.exec
> Task Name: sample
> Friendly Task Name: Sample Task
> Task Description: Smaple Task for Docs
> Task Author: Me
2016-09-26T21:55:47.589Z : creating folder for task
2016-09-26T21:55:47.589Z : D:\Documents\GitHub\vsts-tfs-helpers\sample
2016-09-26T21:55:47.590Z : created folder
2016-09-26T21:55:47.591Z : creating definition
2016-09-26T21:55:47.591Z : id: fb502170-8433-11e6-bd4d-31659e843a2f
2016-09-26T21:55:47.591Z : name: sample
2016-09-26T21:55:47.592Z : friendlyName: Sample Task
2016-09-26T21:55:47.592Z : description: Smaple Task for Docs
2016-09-26T21:55:47.592Z : author: Me
2016-09-26T21:55:47.592Z : writing definition file
2016-09-26T21:55:47.593Z : D:\Documents\GitHub\vsts-tfs-helpers\sample\task.json
2016-09-26T21:55:47.593Z : {
2016-09-26T21:55:47.593Z :   "id": "fb502170-8433-11e6-bd4d-31659e843a2f",
2016-09-26T21:55:47.593Z :   "name": "sample",
2016-09-26T21:55:47.593Z :   "friendlyName": "Sample Task",
2016-09-26T21:55:47.593Z :   "description": "Smaple Task for Docs",
2016-09-26T21:55:47.593Z :   "author": "Me",
2016-09-26T21:55:47.593Z :   "helpMarkDown": "Replace with markdown to show in help",
2016-09-26T21:55:47.593Z :   "category": "Utility",
2016-09-26T21:55:47.593Z :   "visibility": [
2016-09-26T21:55:47.593Z :     "Build",
2016-09-26T21:55:47.593Z :     "Release"
2016-09-26T21:55:47.593Z :   ],
2016-09-26T21:55:47.593Z :   "demands": [],
2016-09-26T21:55:47.593Z :   "version": {
2016-09-26T21:55:47.593Z :     "Major": "0",
2016-09-26T21:55:47.593Z :     "Minor": "1",
2016-09-26T21:55:47.593Z :     "Patch": "0"
2016-09-26T21:55:47.593Z :   },
2016-09-26T21:55:47.593Z :   "minimumAgentVersion": "1.95.0",
2016-09-26T21:55:47.593Z :   "instanceNameFormat": "sample $(message)",
2016-09-26T21:55:47.593Z :   "inputs": [
2016-09-26T21:55:47.593Z :     {
2016-09-26T21:55:47.593Z :       "name": "cwd",
2016-09-26T21:55:47.593Z :       "type": "filePath",
2016-09-26T21:55:47.593Z :       "label": "Working Directory",
2016-09-26T21:55:47.593Z :       "defaultValue": "",
2016-09-26T21:55:47.593Z :       "required": false,
2016-09-26T21:55:47.593Z :       "helpMarkDown": "Current working directory when sample is run."
2016-09-26T21:55:47.593Z :     },
2016-09-26T21:55:47.593Z :     {
2016-09-26T21:55:47.593Z :       "name": "msg",
2016-09-26T21:55:47.593Z :       "type": "string",
2016-09-26T21:55:47.593Z :       "label": "Message",
2016-09-26T21:55:47.593Z :       "defaultValue": "Hello World",
2016-09-26T21:55:47.593Z :       "required": true,
2016-09-26T21:55:47.593Z :       "helpMarkDown": "Message to echo out"
2016-09-26T21:55:47.593Z :     }
2016-09-26T21:55:47.593Z :   ],
2016-09-26T21:55:47.593Z :   "execution": {
2016-09-26T21:55:47.593Z :     "Node": {
2016-09-26T21:55:47.593Z :       "target": "sample.js",
2016-09-26T21:55:47.593Z :       "argumentFormat": ""
2016-09-26T21:55:47.593Z :     },
2016-09-26T21:55:47.593Z :     "PowerShell3": {
2016-09-26T21:55:47.593Z :       "target": "sample.ps1"
2016-09-26T21:55:47.593Z :     }
2016-09-26T21:55:47.593Z :   }
2016-09-26T21:55:47.593Z : }
2016-09-26T21:55:47.602Z : created definition file.
2016-09-26T21:55:47.602Z : creating temporary icon
2016-09-26T21:55:47.603Z : src: C:\Users\Thomas\AppData\Roaming\npm\node_modules\tfx-cli\_build\exec\build\tasks\_resources\icon.png
2016-09-26T21:55:47.603Z : dest: D:\Documents\GitHub\vsts-tfs-helpers\sample\icon.png
cp: no such file or directory: C:\Users\Thomas\AppData\Roaming\npm\node_modules\tfx-cli\_build\exec\build\tasks\_resources\icon.png

2016-09-26T21:55:47.605Z : icon.png copied
2016-09-26T21:55:47.605Z : src: C:\Users\Thomas\AppData\Roaming\npm\node_modules\tfx-cli\_build\exec\build\tasks\_resources\sample.js
2016-09-26T21:55:47.606Z : dest: D:\Documents\GitHub\vsts-tfs-helpers\sample\sample.js
cp: no such file or directory: C:\Users\Thomas\AppData\Roaming\npm\node_modules\tfx-cli\_build\exec\build\tasks\_resources\sample.js

2016-09-26T21:55:47.607Z : sample.js copied
2016-09-26T21:55:47.607Z : src: C:\Users\Thomas\AppData\Roaming\npm\node_modules\tfx-cli\_build\exec\build\tasks\_resources\sample.ps1
2016-09-26T21:55:47.608Z : dest: D:\Documents\GitHub\vsts-tfs-helpers\sample\sample.ps1
cp: no such file or directory: C:\Users\Thomas\AppData\Roaming\npm\node_modules\tfx-cli\_build\exec\build\tasks\_resources\sample.ps1

2016-09-26T21:55:47.609Z : sample.ps1 copied

created task @ D:\Documents\GitHub\vsts-tfs-helpers\sample
id   : fb502170-8433-11e6-bd4d-31659e843a2f
name: sample

A temporary task icon was created.  Replace with a 32x32 png with transparencies

The only file that was generated was task.json.

bryanmacfarlane commented 8 years ago

Don't use that right now. Use this: https://github.com/Microsoft/vsts-task-lib/blob/master/node/docs/stepbystep.md

Since I finished the step by step, next step is to update tfx

SanthoshYalamuri commented 8 years ago

Same behavior while executing tfx build tasks create command on windows platform.Only task.json file is created, any alternative methods to follow?