Git Product home page Git Product logo

gl-vsts-tasks-yarn's Introduction

Icon

Yarn Build and Release Tasks

cistatus

Yarn is Facebook's npm alternative. It is the fast, reliable and secure dependency management. This extension brings the power of Yarn to Visual Studio Team Services Build and Release Management. It enables using yarn with the official npm registry or any registry you like such as Myget or Visual Studio Team Services Package Management.

GeekLearning Loves Yarn

Why so much sudden love for Yarn ? You can find out here

Learn more about this extension on the wiki!

Tasks included

To contribute

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

Known Issues

Please refer to our wiki page

Release Notes

Please refer to our release page

Contributors

This extension was created by Geek Learning, with help from the community. It also uses some foundation code from Azure pipelines Tasks.

Attributions

gl-vsts-tasks-yarn's People

Contributors

asmundg avatar dependabot[bot] avatar janpieterz avatar jessehouwing avatar sandorfr avatar saturate avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gl-vsts-tasks-yarn's Issues

Unable to run yarn in TFS2015

Are you reporting a bug or a feature request ?

  • Bug
  • Feature request

Description

Unable to run run yarn task after install task.
2018-02-27T21:53:31.1404186Z Set workingFolder to default: D:\TFSBuild\tasks\Yarn\2.4.999
2018-02-27T21:53:31.8884718Z ##[debug]agent.workFolder=D:\TFSBuild_work
2018-02-27T21:53:31.8944677Z ##[debug]loading inputs and endpoints
...
2018-02-27T21:53:31.8994698Z ##[debug]loaded 12
2018-02-27T21:53:32.6915198Z ##[debug]check path : D:\TFSBuild\tasks\Yarn\2.4.999\task.json
2018-02-27T21:53:32.6915198Z ##[debug]set resource file to: D:\TFSBuild\tasks\Yarn\2.4.999\task.json
2018-02-27T21:53:32.6915198Z ##[debug]system.culture=en-US
2018-02-27T21:53:33.0005407Z ##[debug]which 'yarn'
2018-02-27T21:53:33.0285447Z ##[debug]not found
2018-02-27T21:53:33.0295439Z ##[debug]Arguments=null
2018-02-27T21:53:33.0335440Z ##[debug]ProjectDirectory=D:\TFSBuild_work\76\s\Web
2018-02-27T21:53:33.0335440Z ##[debug]customRegistry=useNpmrc
2018-02-27T21:53:33.0345439Z ##[debug]customFeed=null
2018-02-27T21:53:33.0345439Z ##[debug]customEndpoint=null
2018-02-27T21:53:33.0355436Z ##[debug]Error: couldn't locate Yarn
2018-02-27T21:53:33.0355436Z ##[debug]Error: couldn't locate Yarn
2018-02-27T21:53:33.0365447Z at D:\TFSBuild\tasks\Yarn\2.4.999\yarnTask.js:58:23
2018-02-27T21:53:33.0365447Z at next (native)
2018-02-27T21:53:33.0375457Z at D:\TFSBuild\tasks\Yarn\2.4.999\yarnTask.js:7:71
2018-02-27T21:53:33.0375457Z at __awaiter (D:\TFSBuild\tasks\Yarn\2.4.999\yarnTask.js:3:12)
2018-02-27T21:53:33.0375457Z at yarnExec (D:\TFSBuild\tasks\Yarn\2.4.999\yarnTask.js:55:12)
2018-02-27T21:53:33.0385439Z at Object. (D:\TFSBuild\tasks\Yarn\2.4.999\yarnTask.js:132:1)
2018-02-27T21:53:33.0385439Z at Module._compile (module.js:413:34)
2018-02-27T21:53:33.0385439Z at Object.Module._extensions..js (module.js:422:10)
2018-02-27T21:53:33.0395437Z at Module.load (module.js:357:32)
2018-02-27T21:53:33.0395437Z at Function.Module._load (module.js:314:12)
2018-02-27T21:53:33.0405438Z ##[debug]task result: Failed
2018-02-27T21:53:33.0475471Z ##[error]Error: couldn't locate Yarn
2018-02-27T21:53:33.0595559Z ##[debug]Agent.BuildDirectory=D:\TFSBuild_work\76
2018-02-27T21:53:33.0605519Z ##[debug]testing directory 'D:\TFSBuild_work\76\npm'
2018-02-27T21:53:33.0605519Z ##[debug]testing directory 'D:\TFSBuild_work\76'
2018-02-27T21:53:33.0605519Z ##[debug]mkdir 'D:\TFSBuild_work\76\npm'
2018-02-27T21:53:33.0615559Z ##[debug]rm -rf D:\TFSBuild_work\76\npm
2018-02-27T21:53:33.0615559Z ##[debug]removing directory

System information

VSTS or TFS:

  • VSTS
  • TFS

Agent:

  • Hosted
  • Custom

OS:

  • Windows
  • Mac
  • Linux

Yarn version:
1.5.1*

Node version:
8.9.1*

Allow updatable Yarn version

Would be nice if you could have everywhere in your code where you download the version of yarn to be from the public location instead of on your private storage account. This would allow for others to submit PRs to help keep this task up to date. As of now, yarn is at Sept 7th 1.0.1 with current version 1.2.1. Alternatively or in addition, you could update the task itself to allow others to specify the version they want like https://github.com/TsuyoshiUshio/KubernetesTask or others.

await downloadFile("https://geeklearningassets.blob.core.windows.net/yarn/tarballs.json", yarnVersionsFile);

Yarn tool install get timeout when behind proxy

Before opening an issue please read this.

Are you reporting a bug or a feature request ?

  • [x ] Bug
  • Feature request

Description

When using Yarn install task in VSTS Self hosted agent it failes with a timeout on Yarn install. I know that the HTTP_PROXY, HTTPS_PROXY enviroment veriable is set and the proxy file on the agent is set, but every time i trieds to run the task it get this teamout
2018-11-26T13:50:35.0516311Z ##[debug]Evaluating condition for step: 'Use Yarn 1.x'
2018-11-26T13:50:35.0517068Z ##[debug]Evaluating: succeeded()
2018-11-26T13:50:35.0517196Z ##[debug]Evaluating succeeded:
2018-11-26T13:50:35.0517392Z ##[debug]=> True
2018-11-26T13:50:35.0517578Z ##[debug]Result: True
2018-11-26T13:50:35.0517751Z ##[section]Starting: Use Yarn 1.x
2018-11-26T13:50:35.0522665Z ==============================================================================
2018-11-26T13:50:35.0522742Z Task : Yarn Tool Installer
2018-11-26T13:50:35.0522777Z Description : Installs a version of Yarn
2018-11-26T13:50:35.0522835Z Version : 2.7.1003
2018-11-26T13:50:35.0522874Z Author : Geek Learning
2018-11-26T13:50:35.0522906Z Help : More Information (Version 2.7.1003)
2018-11-26T13:50:35.0522944Z ==============================================================================
2018-11-26T13:50:38.5930039Z ##[debug]agent.TempDirectory=D:\VSTS\A2\w_temp
2018-11-26T13:50:38.5974688Z ##[debug]loading inputs and endpoints
2018-11-26T13:50:38.5975278Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2018-11-26T13:50:38.6153826Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2018-11-26T13:50:38.6154375Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2018-11-26T13:50:38.6528406Z ##[debug]loading INPUT_CHECKLATEST
2018-11-26T13:50:38.6528939Z ##[debug]loading INPUT_INCLUDEPRERELEASE
2018-11-26T13:50:38.6989762Z ##[debug]loading INPUT_VERSIONSPEC
2018-11-26T13:50:38.6990291Z ##[debug]loaded 6
2018-11-26T13:50:38.7104110Z ##[debug]Agent.ProxyUrl="Proxy setting remove"
2018-11-26T13:50:38.7262481Z ##[debug]Agent.ProxyUsername=undefined
2018-11-26T13:50:38.7263004Z ##[debug]Agent.ProxyPassword=undefined
2018-11-26T13:50:38.7402052Z ##[debug]Agent.ProxyBypassList=undefined
2018-11-26T13:50:38.7403169Z ##[debug]expose agent proxy configuration.
2018-11-26T13:50:38.7403499Z ##[debug]Agent.CAInfo=undefined
2018-11-26T13:50:38.7403743Z ##[debug]Agent.ClientCert=undefined
2018-11-26T13:50:38.7404298Z ##[debug]Agent.ProxyUrl="Proxy setting remove"
2018-11-26T13:50:38.7404490Z ##[debug]Agent.ProxyUsername=undefined
2018-11-26T13:50:38.7404705Z ##[debug]Agent.ProxyPassword=undefined
2018-11-26T13:50:38.7404898Z ##[debug]Agent.ProxyBypassList=undefined
2018-11-26T13:50:38.7405151Z ##[debug]check path : D:\VSTS\A2\w_tasks\YarnInstaller_2ec1147b-5c33-41df-94b5-676758d87c1b\2.7.1003\node_modules\vsts-task-tool-lib\lib.json
2018-11-26T13:50:38.7405392Z ##[debug]set resource file to: D:\VSTS\A2\w_tasks\YarnInstaller_2ec1147b-5c33-41df-94b5-676758d87c1b\2.7.1003\node_modules\vsts-task-tool-lib\lib.json
2018-11-26T13:50:38.7405597Z ##[debug]system.culture=en-US
2018-11-26T13:50:38.8881683Z ##[debug]Agent.BuildDirectory=D:\VSTS\A2\w\12
2018-11-26T13:50:38.8985873Z ##[debug]testing directory 'D:\VSTS\A2\w\12\yarn'
2018-11-26T13:50:38.9078563Z ##[debug]testing directory 'D:\VSTS\A2\w\12'
2018-11-26T13:50:38.9141633Z ##[debug]mkdir 'D:\VSTS\A2\w\12\yarn'
2018-11-26T13:50:38.9180408Z ##[debug]versionSpec=1.x
2018-11-26T13:50:38.9181078Z ##[debug]checkLatest=false
2018-11-26T13:50:38.9181392Z ##[debug]includePrerelease=false
2018-11-26T13:50:38.9181655Z ##[debug]isExplicit: null
2018-11-26T13:50:38.9181909Z ##[debug]explicit? false
2018-11-26T13:50:38.9182162Z ##[debug]isExplicit: null
2018-11-26T13:50:38.9182400Z ##[debug]explicit? false
2018-11-26T13:50:38.9182621Z ##[debug]Agent.Version=2.141.1
2018-11-26T13:50:38.9182865Z ##[debug]Agent.ToolsDirectory=D:\VSTS\A2\w_tool
2018-11-26T13:50:38.9183060Z ##[debug]evaluating 0 versions
2018-11-26T13:50:38.9183314Z ##[debug]match not found
2018-11-26T13:50:38.9184315Z ##[debug]isExplicit: null
2018-11-26T13:50:38.9184591Z ##[debug]explicit? false
2018-11-26T13:51:00.1962453Z ##[debug]task result: Failed
2018-11-26T13:51:00.2044172Z ##[error]connect ETIMEDOUT 52.239.140.202:443
2018-11-26T13:51:00.2062408Z ##[debug]Processed: ##vso[task.issue type=error;]connect ETIMEDOUT 52.239.140.202:443
2018-11-26T13:51:00.2197013Z ##[debug]Processed: ##vso[task.complete result=Failed;]connect ETIMEDOUT 52.239.140.202:443
2018-11-26T13:51:00.2766613Z ##[section]Finishing: Use Yarn 1.x

Expected behavior

Describe the expected behavior

Reproduction

Insert reproduction steps here

MANDATORY FOR BUGS: Insert debug trace

In order to allow us to quickly reproduce you issue please include a link to a reproduction repository

System information

VSTS or TFS:

  • [x ] VSTS
  • TFS

Agent:

  • Hosted
  • Custom

OS:

  • [x ] Windows
  • Mac
  • Linux

Yarn version: 1.x
Yarn version* 1.x

Node version:
Node version*

Introduce a Yarn Tool Installer task

With that task a user could specify a version and the task would download and cache the matching version. This would allow users to use whatever version they'd like no matter what is bundled in the task. In addition it would speed up things as it would remove the need to detar yarn image each time the task is run.

Tool cache documentation

Not honouring Project Directory setting

I have a yarn install task with Project Directory set as $(System.DefaultWorkingDirectory)/Release/ApplicationPackageRoot/WebUIPkg/Code and the Production flag set.

Output is as follows:

2017-09-13T11:00:14.0838653Z [command]C:\Windows\system32\cmd.exe /D /S /C "C:\NPM\Modules\yarn.cmd --production install"
2017-09-13T11:00:14.5278652Z yarn install v1.0.1
2017-09-13T11:00:14.5638843Z info No lockfile found.
2017-09-13T11:00:14.5728658Z [1/4] Resolving packages...
2017-09-13T11:00:16.0594477Z [2/4] Fetching packages...
2017-09-13T11:00:19.3006297Z [3/4] Linking dependencies...
2017-09-13T11:00:20.6145066Z [4/4] Building fresh packages...
2017-09-13T11:00:20.6405089Z success Saved lockfile.
2017-09-13T11:00:20.6425069Z Done in 6.12s.

As in, it's running in the wrong directory!

If I use the npm task with identical settings it works fine.

yarn start failed

In the build agent when I'm installing yarn and after that I run yarn start the operation will automatically cancel.
I tired to update my node to version 8.x and it still didn't work.
Any help would be so great.

Command not found providing arguments other than install

Great work on setting up this task!

I've setup installing my dependencies through yarn on VSTS. I got this working through VSTS command line tasks (e.g. npm install [email protected] -g).

Switching to the yarn task fails, all settings are defaults and arguments is set to: install --pure-lockfile. Also configuring with licenses generate-disclaimer will fail the build:

2016-12-28T15:32:08.7826630Z ##[section]Starting: Yarn licenses generate-disclaimer 2016-12-28T15:32:08.7836632Z ============================================================================== 2016-12-28T15:32:08.7836632Z Task : Yarn task 2016-12-28T15:32:08.7836632Z Description : Executes Yarn 2016-12-28T15:32:08.7836632Z Version : 0.2.2001 2016-12-28T15:32:08.7836632Z Author : Geek Learning 2016-12-28T15:32:08.7836632Z Help : [More Information](https://github.com/geeklearningio/gl-vsts-tasks-yarn/wiki/Yarn) (Version 0.2.2001) 2016-12-28T15:32:08.7836632Z ============================================================================== 2016-12-28T15:32:16.2956023Z [command]C:\a\yarn\dist\bin\yarn.cmd licenses generate-disclaimer 2016-12-28T15:32:16.7386021Z yarn licenses generate-disclaimer v0.18.0 2016-12-28T15:32:16.8396050Z error Command "licenses generate-disclaimer" not found. 2016-12-28T15:32:16.8626098Z Error: C:\a\yarn\dist\bin\yarn.cmd failed with return code: 1 2016-12-28T15:32:16.8736037Z ##[error]Error: C:\a\yarn\dist\bin\yarn.cmd failed with return code: 1 2016-12-28T15:32:16.8796028Z ##[section]Finishing: Yarn licenses generate-disclaimer

Just using install as argument does work as expectd.

Does the task support yarn's other CLI arguments? Am I configuring it incorrectly?

Yarn Installer should prepend global bin directory to path

Before opening an issue please read this.

Are you reporting a bug or a feature request ?

  • Bug
  • Feature request

Description

%LOCALAPPDATA%\Yarn\bin should be prependend to path in order to enable yarn global add to work properly

System information

VSTS or TFS:

  • VSTS
  • TFS

Agent:

  • Hosted
  • Custom

OS:

  • Windows
  • Mac
  • Linux

Yarn version:
N/A

Node version:
N/A

yarnInstaller installs yarn 1.8 pre-release instead of yarn 1.7 stable

yarnInstaller installs yarn 1.8 pre-release instead of yarn 1.7 stable

Are you reporting a bug or a feature request ?

  • Bug
  • Feature request

Description

Yarn 1.8 pre-release is being installed by yarnInstaller when set to install "latest 1.x". It appears that this is due to:

https://geeklearningassets.blob.core.windows.net/yarn/tarballs.json

listing:

"v1.8.0":"https://github.com/yarnpkg/yarn/releases/download/v1.8.0/yarn-v1.8.0.tar.gz"

but:

https://github.com/yarnpkg/yarn/releases

shows it marked as pre-release. I'm unsure how the tarball is generated, but it is the reason that yarnInstaller is picking the pre-release version of yarn.

Expected behavior

yarn 1.7 should be used

System information

VSTS or TFS:

  • VSTS
  • TFS

Agent:

  • Hosted
  • Custom

OS:

  • Windows
  • Mac
  • Linux

Yarn version:
Yarn version*
1.8!

Thanks,

Mark

Build hangs intermittently when calling bash scripts

I'm using node 8.1.4. The yarn build step times out when executing bash scripts. There is no other output, the line in the log is:

bash ./buildScripts/prebuild.sh

It runs for 60 minutes and times out. Occasionally, it will get through this one only to fail on a different bash script. Occasionally, it will build everything just fine in around 4 minutes. One of the bash scripts only has a call to echo some text. Even that one will hang.

I am able to use npm tasks instead of the yarn task to build my project, but I was hoping to use yarn instead. Any suggestions?

yarn run hangs (angular-cli / ng build)

I have a yarn build step that runs the "build-dev-deploy" script from my package.json file.
image
And the "build-dev-deploy" script runs "ng build --prod"
image

  • This build step intermittently hangs forever... maybe about 60% of the time. Other times it executes okay... but seems to take longer than it does when I execute ng build --prod on my local machine.
  • This build step works 100% of the time when I use the npm run build step instead of yarn.
  • To resolve this I'm having to use yarn to install my dependencies (works great!), but then use npm to run my "build-dev-deploy" script. I'd love to use yarn instead, but it just isn't reliable right now.

Here is the execution log in case it helps:

2017-07-24T21:52:37.7638766Z ##[section]Starting: Yarn run build-dev-deploy 2017-07-24T21:52:37.7795062Z ============================================================================== 2017-07-24T21:52:37.7795062Z Task : Yarn task 2017-07-24T21:52:37.7795062Z Description : Executes Yarn 2017-07-24T21:52:37.7795062Z Version : 0.7.1001 2017-07-24T21:52:37.7795062Z Author : Geek Learning 2017-07-24T21:52:37.7795062Z Help : [More Information](https://github.com/geeklearningio/gl-vsts-tasks-yarn/wiki/Yarn) (Version 0.7.1001) 2017-07-24T21:52:37.7795062Z ============================================================================== 2017-07-24T21:52:38.3420124Z ##[debug]agent.workFolder=D:\2017_1_BuildAgent\_work 2017-07-24T21:52:38.3420124Z ##[debug]loading inputs and endpoints 2017-07-24T21:52:38.3420124Z ##[debug]loading ENDPOINT_AUTH_$/ 2017-07-24T21:52:38.3576381Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_$/_ACCESSTOKEN 2017-07-24T21:52:38.3576381Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN 2017-07-24T21:52:38.3576381Z ##[debug]loading ENDPOINT_AUTH_SCHEME_$/ 2017-07-24T21:52:38.3576381Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION 2017-07-24T21:52:38.3576381Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION 2017-07-24T21:52:38.3576381Z ##[debug]loading INPUT_ARGUMENTS 2017-07-24T21:52:38.3576381Z ##[debug]loading INPUT_PRODUCTIONMODE 2017-07-24T21:52:38.3576381Z ##[debug]loading INPUT_PROJECTDIRECTORY 2017-07-24T21:52:38.3576381Z ##[debug]loaded 9 2017-07-24T21:52:38.4357835Z ##[debug]Absolute path for pathSegments: D:\2017_1_BuildAgent\externals\vstsom/yarn = D:\2017_1_BuildAgent\externals\vstsom\yarn 2017-07-24T21:52:38.4357835Z ##[debug]Absolute path for pathSegments: C:\ProgramData\Oracle\Java\javapath/yarn = C:\ProgramData\Oracle\Java\javapath\yarn 2017-07-24T21:52:38.4357835Z ##[debug]Absolute path for pathSegments: C:\Windows\system32/yarn = C:\Windows\system32\yarn 2017-07-24T21:52:38.4357835Z ##[debug]Absolute path for pathSegments: C:\Windows/yarn = C:\Windows\yarn 2017-07-24T21:52:38.4357835Z ##[debug]Absolute path for pathSegments: C:\Windows\System32\Wbem/yarn = C:\Windows\System32\Wbem\yarn 2017-07-24T21:52:38.4357835Z ##[debug]Absolute path for pathSegments: C:\Windows\System32\WindowsPowerShell\v1.0\/yarn = C:\Windows\System32\WindowsPowerShell\v1.0\yarn 2017-07-24T21:52:38.4357835Z ##[debug]Absolute path for pathSegments: C:\Program Files\Microsoft SQL Server\130\Tools\Binn\/yarn = C:\Program Files\Microsoft SQL Server\130\Tools\Binn\yarn 2017-07-24T21:52:38.4357835Z ##[debug]Absolute path for pathSegments: C:\Program Files\dotnet\/yarn = C:\Program Files\dotnet\yarn 2017-07-24T21:52:38.4357835Z ##[debug]Absolute path for pathSegments: C:\Program Files\Git\cmd/yarn = C:\Program Files\Git\cmd\yarn 2017-07-24T21:52:38.4357835Z ##[debug]Absolute path for pathSegments: C:\Program Files\nodejs\/yarn = C:\Program Files\nodejs\yarn 2017-07-24T21:52:38.4357835Z ##[debug]Absolute path for pathSegments: C:\Users\svctfsapppd\AppData\Roaming\npm/yarn = C:\Users\svctfsapppd\AppData\Roaming\npm\yarn 2017-07-24T21:52:38.4357835Z ##[debug]Absolute path for pathSegments: D:\2017_1_BuildAgent\bin/yarn = D:\2017_1_BuildAgent\bin\yarn 2017-07-24T21:52:38.4357835Z ##[debug]Absolute path for pathSegments: D:\2017_1_BuildAgent\bin/yarn = D:\2017_1_BuildAgent\bin\yarn 2017-07-24T21:52:38.4357835Z ##[debug]yarn=null 2017-07-24T21:52:38.4513888Z ##[debug]Arguments=run build-dev-deploy 2017-07-24T21:52:38.4513888Z ##[debug]ProjectDirectory=D:\2017_1_BuildAgent\_work\4\s\Source\MyApp\Web Application Client 2017-07-24T21:52:38.4513888Z ##[debug]AGENT_WORKFOLDER=D:\2017_1_BuildAgent\_work 2017-07-24T21:52:38.7483374Z ##[debug]D:\2017_1_BuildAgent\_work\yarn 2017-07-24T21:52:38.7483374Z ##[debug]["dist"] 2017-07-24T21:52:38.7483374Z ##[debug]D:\2017_1_BuildAgent\_work\yarn\dist\bin\yarn.cmd 2017-07-24T21:52:38.7483374Z ##[debug]ProductionMode=false 2017-07-24T21:52:38.7483374Z ##[debug]D:\2017_1_BuildAgent\_work\yarn\dist\bin\yarn.cmd arg: run build-dev-deploy 2017-07-24T21:52:38.7483374Z ##[debug]exec tool: D:\2017_1_BuildAgent\_work\yarn\dist\bin\yarn.cmd 2017-07-24T21:52:38.7483374Z ##[debug]Arguments: 2017-07-24T21:52:38.7483374Z ##[debug] run 2017-07-24T21:52:38.7483374Z ##[debug] build-dev-deploy 2017-07-24T21:52:38.7483374Z [command]D:\2017_1_BuildAgent\_work\yarn\dist\bin\yarn.cmd run build-dev-deploy 2017-07-24T21:52:39.4201542Z yarn run v0.27.5 2017-07-24T21:52:39.5920321Z $ ng build --prod 2017-07-24T23:18:28.0901375Z ##[error]The operation was canceled. <-- from where I manually have to cancel the build

TFS/VSTS Package Management authentication

Great to use Yarn as a build task but unlike the npm tasks available, Yarn doesn't seem to automatically authenticate for npm registries created by the Package Management feature in TFS2017/VSTS. Is there a solution for using Package Management registries in combination with the Yarn build task?

install fails with 1.x ( TypeError: Cannot read property 'replace' of null )

I tried updating our yarn task from 0.* to 1.* today, and yarn fails with TypeError: Cannot read property 'replace' of null. Logs below:

broken 1.x:

##[debug]Evaluating condition for step: 'Install Packages'
##[debug]Evaluating: succeeded()
##[debug]Evaluating succeeded:
##[debug]=> (Boolean) True
##[debug]Expanded: True
##[debug]Result: True
##[section]Starting: Install Packages
==============================================================================
Task         : Yarn task
Description  : Executes Yarn
Version      : 1.0.999
Author       : Geek Learning
Help         : [More Information](https://github.com/geeklearningio/gl-vsts-tasks-yarn/wiki/Yarn) (Version 1.0.999)
==============================================================================
##[debug]agent.workFolder=d:\a
##[debug]loading inputs and endpoints
##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
##[debug]loading INPUT_CUSTOMREGISTRY
##[debug]loading INPUT_PRODUCTIONMODE
##[debug]loading INPUT_PROJECTDIRECTORY
##[debug]loaded 6
##[debug]which 'yarn'
##[debug]not found
##[debug]Arguments=null
##[debug]ProjectDirectory=d:\a\1\s
##[debug]customRegistry=useNpmrc
##[debug]customFeed=null
##[debug]customEndpoint=null
##[debug]AGENT_WORKFOLDER=d:\a
##[debug]d:\a\yarn
##[debug]["dist"]
##[debug]d:\a\yarn\dist\bin\yarn.cmd
##[debug]Build.BuildId=10081
##[debug]Agent.BuildDirectory=d:\a\1
##[debug]testing directory 'd:\a\1\npm'
##[debug]testing directory 'd:\a\1'
##[debug]mkdir 'd:\a\1\npm'
##[debug]Build.BuildId=10081
##[debug]Agent.BuildDirectory=d:\a\1
##[debug]Using registries in .npmrc
TypeError: Cannot read property 'replace' of null
##[debug]task result: Failed
##[error]TypeError: Cannot read property 'replace' of null
##[debug]Processed: ##vso[task.issue type=error;]TypeError: Cannot read property 'replace' of null
##[debug]Processed: ##vso[task.complete result=Failed;]TypeError: Cannot read property 'replace' of null
##[debug]Agent.BuildDirectory=d:\a\1
##[debug]rm -rf d:\a\1\npm
##[debug]removing directory
##[section]Finishing: Install Packages

working 0.x

##[debug]Evaluating condition for step: 'Install Packages'
##[debug]Evaluating: succeeded()
##[debug]Evaluating succeeded:
##[debug]=> (Boolean) True
##[debug]Expanded: True
##[debug]Result: True
##[section]Starting: Install Packages
==============================================================================
Task         : Yarn task
Description  : Executes Yarn
Version      : 0.7.1001
Author       : Geek Learning
Help         : [More Information](https://github.com/geeklearningio/gl-vsts-tasks-yarn/wiki/Yarn) (Version 0.7.1001)
==============================================================================
##[debug]agent.workFolder=d:\a
##[debug]loading inputs and endpoints
##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
##[debug]loading INPUT_PRODUCTIONMODE
##[debug]loading INPUT_PROJECTDIRECTORY
##[debug]loaded 5
##[debug]Absolute path for pathSegments: C:\LR\mms\Services\Mms\Provisioner\TaskAgent\agents\2.120.1\externals\git\cmd/yarn = C:\LR\mms\Services\Mms\Provisioner\TaskAgent\agents\2.120.1\externals\git\cmd\yarn
##[debug]Absolute path for pathSegments: C:\ProgramData\Oracle\Java\javapath/yarn = C:\ProgramData\Oracle\Java\javapath\yarn
##[debug]Absolute path for pathSegments: C:\Windows\system32/yarn = C:\Windows\system32\yarn
##[debug]Absolute path for pathSegments: C:\Windows/yarn = C:\Windows\yarn
##[debug]Absolute path for pathSegments: C:\Windows\System32\Wbem/yarn = C:\Windows\System32\Wbem\yarn
##[debug]Absolute path for pathSegments: C:\Windows\System32\WindowsPowerShell\v1.0\/yarn = C:\Windows\System32\WindowsPowerShell\v1.0\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\/yarn = C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Microsoft SQL Server\100\Tools\Binn\/yarn = C:\Program Files\Microsoft SQL Server\100\Tools\Binn\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Microsoft SQL Server\100\DTS\Binn\/yarn = C:\Program Files\Microsoft SQL Server\100\DTS\Binn\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\/yarn = C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Microsoft SQL Server\110\Tools\Binn\/yarn = C:\Program Files\Microsoft SQL Server\110\Tools\Binn\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.4\/yarn = C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.4\yarn
##[debug]Absolute path for pathSegments: C:\Users\VssAdministrator\.dnx\bin/yarn = C:\Users\VssAdministrator\.dnx\bin\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Microsoft DNX\Dnvm\/yarn = C:\Program Files\Microsoft DNX\Dnvm\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Microsoft SQL Server\120\Tools\Binn\/yarn = C:\Program Files\Microsoft SQL Server\120\Tools\Binn\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Microsoft SQL Server\130\Tools\Binn\/yarn = C:\Program Files\Microsoft SQL Server\130\Tools\Binn\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft Emulator Manager\1.0\/yarn = C:\Program Files (x86)\Microsoft Emulator Manager\1.0\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\/yarn = C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\wbin/yarn = C:\Program Files (x86)\Microsoft SDKs\Azure\CLI\wbin\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\/yarn = C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Microsoft\Web Platform Installer\/yarn = C:\Program Files\Microsoft\Web Platform Installer\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Git LFS/yarn = C:\Program Files\Git LFS\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\GtkSharp\2.12\bin/yarn = C:\Program Files (x86)\GtkSharp\2.12\bin\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Git\cmd/yarn = C:\Program Files\Git\cmd\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Git\bin/yarn = C:\Program Files\Git\bin\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Git\usr\bin/yarn = C:\Program Files\Git\usr\bin\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\/yarn = C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\/yarn = C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\/yarn = C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\/yarn = C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\/yarn = C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\/yarn = C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies\/yarn = C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\PrivateAssemblies\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\/yarn = C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\yarn
##[debug]Absolute path for pathSegments: C:\Python27/yarn = C:\Python27\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\dotnet\/yarn = C:\Program Files\dotnet\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\CMake\bin/yarn = C:\Program Files (x86)\CMake\bin\yarn
##[debug]Absolute path for pathSegments: C:\NPM\Modules/yarn = C:\NPM\Modules\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\nodejs\/yarn = C:\Program Files\nodejs\yarn
##[debug]Absolute path for pathSegments: C:\NPM\Modules/yarn = C:\NPM\Modules\yarn
##[debug]Absolute path for pathSegments: C:\cordova/yarn = C:\cordova\yarn
##[debug]Absolute path for pathSegments: C:\java\ant\apache-ant-1.9.7\bin/yarn = C:\java\ant\apache-ant-1.9.7\bin\yarn
##[debug]Absolute path for pathSegments: C:\NPM\Modules/yarn = C:\NPM\Modules\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\/yarn = C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\/yarn = C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\yarn
##[debug]Absolute path for pathSegments: C:\cf-cli_6.25.0_winx64\/yarn = C:\cf-cli_6.25.0_winx64\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code/yarn = C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code\yarn
##[debug]Absolute path for pathSegments: C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager/yarn = C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager\yarn
##[debug]Absolute path for pathSegments: C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\/yarn = C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\yarn
##[debug]Absolute path for pathSegments: C:\LR\mms\Services\Mms\Provisioner\TaskAgent\agents\2.120.1\bin/yarn = C:\LR\mms\Services\Mms\Provisioner\TaskAgent\agents\2.120.1\bin\yarn
##[debug]Absolute path for pathSegments: C:\LR\mms\Services\Mms\Provisioner\TaskAgent\agents\2.120.1\bin/yarn = C:\LR\mms\Services\Mms\Provisioner\TaskAgent\agents\2.120.1\bin\yarn
##[debug]yarn=null
##[debug]Arguments=null
##[debug]ProjectDirectory=d:\a\1\s
##[debug]AGENT_WORKFOLDER=d:\a
##[debug]d:\a\yarn
##[debug]["dist"]
##[debug]d:\a\yarn\dist\bin\yarn.cmd
##[debug]ProductionMode=false
##[debug]exec tool: d:\a\yarn\dist\bin\yarn.cmd
##[debug]Arguments:
[command]d:\a\yarn\dist\bin\yarn.cmd
yarn install v0.27.5
[1/4] Resolving packages...
[2/4] Fetching packages...
warning [email protected]: The platform "win32" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Building fresh packages...
Done in 123.98s.
##[debug]rc:0
##[debug]success:true
##[debug]task result: Succeeded
##[debug]Processed: ##vso[task.complete result=Succeeded;]Yarn executed successfully
##[section]Finishing: Install Packages

Error: ENOENT: no such file or directory, stat '../318.npmrc'

I have .npmrc file in my repo at /frontend/.npmrc

// .npmrc

loglevel=error
color=true
registry=https://registry.npmjs.org/

I told the yarn task to use folder frontend

yarn_error

Then I get this error:

2017-10-06T17:07:39.9206165Z ##[section]Starting: Yarn Install (frontend)
2017-10-06T17:07:39.9206165Z ==============================================================================
2017-10-06T17:07:39.9206165Z Task         : Yarn task
2017-10-06T17:07:39.9206165Z Description  : Executes Yarn
2017-10-06T17:07:39.9206165Z Version      : 2.0.1002
2017-10-06T17:07:39.9206165Z Author       : Geek Learning
2017-10-06T17:07:39.9206165Z Help         : [More Information](https://github.com/geeklearningio/gl-vsts-tasks-yarn/wiki/Yarn) (Version 2.0.1002)
2017-10-06T17:07:39.9206165Z ==============================================================================
2017-10-06T17:07:40.8402446Z ##[warning]Resource file haven\'t set, can\'t find loc string for key: FoundLocalRegistries
2017-10-06T17:07:40.8402446Z ##[warning]Resource file haven\'t set, can\'t find loc string for key: SavingFile
2017-10-06T17:07:40.8402446Z ##[warning]generated npmrc is empty
2017-10-06T17:07:40.8412440Z ##[error]Error: ENOENT: no such file or directory, stat 'C:\dev\VSTS\CustomAgent01\_work\1\npm\318.npmrc'
2017-10-06T17:07:40.8572440Z ##[section]Finishing: Yarn Install (frontend)

What does it want me to do?
Additionally, why do I have to set a registry in my npmrc? It should use the default

Cannot install plugin Azure Devops

All the task versions belonging to Contribution yarn-task should have the same task id. The tasks at Tasks/Yarn/task.json (version 2.5.999) and Tasks/YarnInstaller/task.json (version 2.5.999) do not have the same ids.

Multiple versions of yarn being installed.

Before opening an issue please read this.

Are you reporting a bug or a feature request ?

  • Bug
  • [] Feature request

Description

I think this may be a bug, or just my not understanding how things work. I set Yarn installer to use version 1.9.x for my build server.
On the build server, under the 1.9.4 folder, I see yarn v1.5.1 through v1.10.1

In the build log, I see the following for the Yarn Install task.
NOTE: the Prepended path environment references v1.5.1, then the build ends up using 1.5.1 to build.
Depending if i configure the yarn install with 1.9.x and/or the always download the latest matching version, it'll download v1.10.1 and use that version instead of the 1.9.4. Our build has issues with 1.10.1, so i want to avoid that.

2018-10-05T13:32:30.5636701Z ##[section]Starting: Use Yarn 1.9.x 2018-10-05T13:32:30.5640486Z ============================================================================== 2018-10-05T13:32:30.5640765Z Task : Yarn Tool Installer 2018-10-05T13:32:30.5640893Z Description : Installs a version of Yarn 2018-10-05T13:32:30.5640998Z Version : 2.5.999 2018-10-05T13:32:30.5641098Z Author : Geek Learning 2018-10-05T13:32:30.5641237Z Help : [More Information](https://github.com/geeklearningio/gl-vsts-tasks-yarn/wiki/Yarn) (Version 2.5.999) 2018-10-05T13:32:30.5641371Z ============================================================================== 2018-10-05T13:32:31.7552065Z Found tool in cache: yarn 1.9.4 x64 2018-10-05T13:32:31.7825168Z Prepending PATH environment variable with directory: E:\BuildAgent01\w\_tool\yarn\1.9.4\x64\yarn-v1.5.1\bin 2018-10-05T13:32:31.7929759Z ##[section]Finishing: Use Yarn 1.9.x

The yarn build command has the following log:
`2018-10-05T13:34:11.4572524Z ##[section]Starting: Yarn build
2018-10-05T13:34:11.4576905Z ==============================================================================
2018-10-05T13:34:11.4577072Z Task : Yarn task
2018-10-05T13:34:11.4577177Z Description : Executes Yarn
2018-10-05T13:34:11.4577282Z Version : 2.5.999
2018-10-05T13:34:11.4577404Z Author : Geek Learning
2018-10-05T13:34:11.4577589Z Help : More Information (Version 2.5.999).

Dear Angular and Ember CLI users, please check our known issues
2018-10-05T13:34:11.4577823Z ==============================================================================
2018-10-05T13:34:13.4806315Z [command]C:\Windows\system32\cmd.exe /D /S /C "E:\BuildAgent01\w_tool\yarn\1.9.4\x64\yarn-v1.5.1\bin\yarn.cmd build"
2018-10-05T13:34:13.7372320Z yarn run v1.5.1
2018-10-05T13:34:13.8562164Z $ node scripts/build.js
2018-10-05T13:34:20.9559565Z Creating an optimized production build...
2018-10-05T13:35:09.8951658Z Compiled successfully.`

Expected behavior

The yarn command only installs and runs the intended version, if 1.9.x version is set, it only downloads 1.9.x and only runs 1.9.x in the path.

Reproduction

image
image
image

In order to allow us to quickly reproduce you issue please include a link to a reproduction repository

System information

VSTS or TFS:

  • VSTS
  • TFS

Agent:

  • Hosted
  • Custom

OS:

  • Windows
  • Mac
  • Linux

Yarn version: 1.9.4
*Yarn version**1.9.4

Node version:
Node version*

Azure DevOps: Yarn task missing from build definition selection

Before opening an issue please read this.

Are you reporting a bug or a feature request ?

  • Bug
  • Feature request

Description

After installing the Yarn extension via Marketplace to my org's Azure DevOps account, there is only one 1 Yarn task available in the build definition (Yarn Tool Installer). The actual Yarn task is missing.

Expected behavior

There should be two "tasks" available in the build definition: Yarn task & Yarn Tool Installer

Reproduction

Added Yarn to Azure DevOps using "manage extensions" in the Org Settings.

MANDATORY FOR BUGS: Insert debug trace

In order to allow us to quickly reproduce you issue please include a link to a reproduction repository

System information

VSTS or TFS:

  • VSTS
  • TFS

Agent:

  • Hosted
  • Custom

OS:

  • Windows
  • Mac
  • Linux

Yarn version:
Version 2.6.999

image

Fails in azure pipelines when using a feed

Hi,
fairly basic example to install a packages fails

UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to find api location for area: npm id

I created the yml via the designer.

Pipeline

resources:

  • repo: self
    fetchDepth: 15

queue:
name: Hosted VS2017

steps:

  • task: geeklearningio.gl-vsts-tasks-yarn.yarn-task.Yarn@2
    displayName: 'Yarn'
    inputs:
    ProjectDirectory: .
    customRegistry: useFeed
    customFeed: '00000000-0000-0000-0000-000000000000'

Log

2018-12-10T01:01:23.6731431Z ==============================================================================
2018-12-10T01:01:23.6731492Z Task         : Yarn task
2018-12-10T01:01:23.6731546Z Description  : Executes Yarn
2018-12-10T01:01:23.6731582Z Version      : 2.7.1003
2018-12-10T01:01:23.6731614Z Author       : Geek Learning
2018-12-10T01:01:23.6732552Z Help         : [More Information](https://github.com/geeklearningio/gl-vsts-tasks-yarn/wiki/Yarn) (Version 2.7.1003).

Dear Angular and Ember CLI users, please check our [known issues](https://github.com/geeklearningio/gl-vsts-tasks-yarn/wiki/Known-Issues)
2018-12-10T01:01:23.6732890Z ==============================================================================
2018-12-10T01:01:24.4604473Z SYSTEMVSSCONNECTION exists true
2018-12-10T01:01:24.6293722Z (node:1300) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to find api location for area: npm id:

TFS 2015 Update 2 task doesn't show up

I installed it and it appears as installed on my collection. However, when I try to add it to a build or release definition it's not showing up in the list of available tasks. Is there something I can do?

Task does not fail when yarnTask fails

When running a yarn task that throws an error (typescript compile error), the task still looks like it succeded.
I think some configuration might be missing here:

var result = await yarn.exec({
            cwd: projectPath,
            env: <any>process.env,
            silent: false,
            failOnStdErr: undefined,
            ignoreReturnCode: undefined,
            outStream: undefined,
            errStream: undefined
        });

        tl.setResult(tl.TaskResult.Succeeded, "Yarn executed successfully");

image

Latest release (2.7.1001) broken custom registries

Before opening an issue please read this.

Are you reporting a bug or a feature request ?

Bug

Description

The most recent release (2.7.1001) appears to have broken the custom registries. We are getting an error on all of our builds that use the yarn task:
capture

This is a custom repository in Azure Devops (VSTS). When I click on the dropdown box there are 'no results found'

The functionality was working before the update and I can confirm that tasks that use NuGet are still working. In other words, I do not believe that the issue is with our repository.

Expected behavior

The yarn task should allow you to select an Azure Devops repository

Reproduction

  1. Insert yarn task in Azure Devops Builds
  2. Select "Use packages from this VSTS/TFS registry"
  3. Dropdown box does not supply list of VSTS registries.
MANDATORY FOR BUGS: Insert debug trace

In order to allow us to quickly reproduce you issue please include a link to a reproduction repository

System information

VSTS or TFS:

  • VSTS

Agent:

  • Hosted

OS:

  • Windows

Yarn version:
Yarn version*

Node version:
Node version*

Why is there a `yarn` demand?

It seems with #27 a new yarn demand was added. This means that the build agent will need to have a yarn capability already set. This doesn't seem to make sense since the task will install Yarn if it's not present already. Should we consider removing the demand, or is this now a requirement? If it's a requirement, consider putting a note in the Visual Studio Marketplace description and/or readme.md.

Yarn don't get env variable

I'm receiving an error when trying to release with yarn:

2017-12-15T17:21:06.5780570Z Error: Cannot cleanup: 
2017-12-15T17:21:06.5780570Z 
2017-12-15T17:21:06.5780570Z Error #1 --------------------------------------------------------------------------------
2017-12-15T17:21:06.5780570Z Error: GitHub Personal Access Token is not set, neither programmatically, nor using env "GH_TOKEN"

image

Calling recursively doesn't work

I have the following setup in my package.json, where I want to execute script commands recursively.

"scripts": {
  "ci": "yarn run install && yarn run lint",
  ...
}

This gives me the following ouput, where it seems to run the first run ci command correctly, but then chokes when it tries to call itself recursively.

2017-01-06T11:50:03.6089591Z [command]C:\a\yarn\dist\bin\yarn.cmd run ci
2017-01-06T11:50:04.5253923Z yarn run ci v0.18.0
2017-01-06T11:50:04.6803924Z $ yarn install && yarn run lint && yarn test 
2017-01-06T11:50:04.7643909Z 'yarn' is not recognized as an internal or external command,
2017-01-06T11:50:04.7643909Z operable program or batch file.
2017-01-06T11:50:04.7693981Z error Command failed with exit code 1.

Task not working after a fresh install on a custom agent running as `Network Service`

Hi, for me the task ends with a green check, but the whole process fails because yarn did nothing.
Here are the logs:

2017-02-22T13:27:59.9407375Z ##[section]Starting: Yarn 
2017-02-22T13:28:06.3967413Z { [Error: ENOTSUP: operation not supported on socket, link 'f:\yarn\dist\node_modules\loose-envify\cli.js' -> 'f:\yarn\dist\node_modules\.bin\loose-envify']
2017-02-22T13:28:06.3967413Z   errno: -4049,
2017-02-22T13:28:06.3967413Z   code: 'ENOTSUP',
2017-02-22T13:28:06.3967413Z   syscall: 'link',
2017-02-22T13:28:06.3967413Z   path: 'f:\\yarn\\dist\\node_modules\\loose-envify\\cli.js',
2017-02-22T13:28:06.3967413Z   dest: 'f:\\yarn\\dist\\node_modules\\.bin\\loose-envify',
2017-02-22T13:28:06.3967413Z   fstream_type: 'SymbolicLink',
2017-02-22T13:28:06.3967413Z   fstream_path: 'f:\\yarn\\dist\\node_modules\\.bin\\loose-envify',
2017-02-22T13:28:06.3967413Z   fstream_linkpath: '../loose-envify/cli.js',
2017-02-22T13:28:06.3967413Z   fstream_class: 'LinkWriter',
2017-02-22T13:28:06.3967413Z   fstream_stack: 
2017-02-22T13:28:06.3967413Z    [ 'f:\\_tasks\\Yarn_0888c9a9-d1b2-4567-aae2-beadcb2059b3\\0.5.999\\node_modules\\fstream\\lib\\link-writer.js:76:26',
2017-02-22T13:28:06.3967413Z      'FSReqWrap.oncomplete (fs.js:82:15)' ] }
2017-02-22T13:28:06.4124088Z ##[section]Finishing: Yarn 

any thoughts ?

Task seems to be running an old yarn version

When running the yarn task on VSTS the builds seem to fail sporadically due to problems with @types packages, this is supposed to be fixed in Yarn 0.16.x, and brief look at your code gives me the impression that the task should be using the latest version, but looking through the logs of the failing build I can see the following line:

2017-01-18T12:57:47.8477202Z �[2K�[1Gyarn install v0.15.1

Any idea as to why the task would end up using an old version of yarn, or more importantly do you have any insight into how one would go about fixing it?

Environment Variables not being passed to Node.js

Before opening an issue please read this.

Are you reporting a bug or a feature request ?

  • Bug
  • Feature request

Description

When adding environment variables to a build pipeline, they don't show up in Node.js when running a yarn command.

Expected behavior

I should see my environment variables in process.env.

Reproduction

Run a command that looks at process.env.NODE_ENV and set that up in the build pipeline as an environment variable.

MANDATORY FOR BUGS: Insert debug trace

In order to allow us to quickly reproduce you issue please include a link to a reproduction repository

System information

VSTS or TFS:

  • VSTS
  • TFS

Agent:

  • Hosted
  • Custom

OS:

  • Windows
  • Mac
  • Linux

Yarn version:
1.10.1

Node version:
8.12.0

Yarn Test task hangs

If you face the same issue, please refer to known issues : https://github.com/geeklearningio/gl-vsts-tasks-yarn/wiki/Known-Issues

We have the following workflow...

yarn install
yarn test
yarn build

Intermittently the build will hang on the 'yarn test' task. The build will eventually timeout.
The build only ever hangs on the test task. We are using the Jest testing framework.

I've reverted back to using NPM to see if this is more reliable.

Arguments and Install Options

It appears that when I create a yarn task to build, and append the Production install flag, it's running the task with the arguments out of order. It'll run "yarn --production build" which causes it to ignore the build portion.
image

I have to manually flag the --production on the arguments line:
image

... works fine:
image

capability to do repo traversal and invoke yarn in dirs where yarn.lock file is detected

I have scenario where repository contains multiple node projects with each project having its own yarn.lock. I want to be able to have this task to traverse the repo and execute yarn install when it finds yarn.lock file similar to nuget restore task where you can provide a wild card and the task does the the job of traversing and restoring nuget packages. I believe this is a common scenario and would be plus if you add the capability

[Mitigated] Yarn Install adds npm as demand

Are you reporting a bug or a feature request ?

  • Bug
  • Feature request

Description

When adding 'Yarn Task' to install dependencies using yarn, it adds npm as a demand the build agent must have. This doesn't seem right, since Yarn is not NPM, and it ultimately fails with the message

No agent found in pool Default which satisfies the specified demands:
msbuild
visualstudio
npm
Agent.Version -gtVersion 1.95.0

Everything exists on the server except npm. Our build steps include:

  • Use Node 8.x
  • Use Yarn 1.x
  • Yarn Install

As soon as the Yarn Install task is added, npm appears as a demand.

Expected behavior

NPM should not be listed as a demand if it's not being used

Reproduction

  1. Create a new build definition
  2. Add a Yarn task
  3. See npm as a demand

(No logs to report other than already mentioned)

System information

VSTS or TFS:

  • VSTS
  • TFS

Agent:

  • Hosted
  • Custom

OS:

  • Windows
  • Mac
  • Linux

Yarn version:
2.4.999
Node version:
8.11.1

Yarn installer failing with "incorrect header check"

Before opening an issue please read this.

Are you reporting a bug or a feature request ?

  • Bug
  • Feature request

Description

==============================================================================
Task         : Yarn Tool Installer
Description  : Installs a version of Yarn
Version      : 2.4.999
Author       : Geek Learning
Help         : [More Information](https://github.com/geeklearningio/gl-vsts-tasks-yarn/wiki/Yarn) (Version 2.4.999)
==============================================================================
{ Error: incorrect header check
    at Zlib._handle.onerror (zlib.js:370:17) errno: -3, code: 'Z_DATA_ERROR' }

Expected behavior

Describe the expected behavior

Yarn will install correctly

Reproduction

Queue a build - look at the console

MANDATORY FOR BUGS: Insert debug trace

In order to allow us to quickly reproduce you issue please include a link to a reproduction repository

System information

VSTS or TFS:

  • VSTS
  • TFS

Agent:

  • [X ] Hosted
  • Custom

OS:

  • Windows
  • Mac
  • Linux

Yarn version:
1.32

Node version:
Node version*

Document how to use the plugin with Azure Pipelines defined in Yaml

Since VSTS became Azure DevOps and launched the azure-pipeline.yml option for configuring builds and releases, there are multiple ways to use this task - you can either configure it with the web GUI, or in a yaml file in your repository. However, I can't find any documentation on the Yaml schema to use.

It probably comes down to something like

- task: Yarn@<version>
  <options here>

but it would be nice to have a reference spec for names of available options, their default values etc. One can look e.g. at the top of https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/tool/node-js?view=vsts for inspiration.

Add Nightly Option

Are you reporting a bug or a feature request ?

  • Bug
  • Feature request

Description

When specifying the version to use, "nightly" should be an option to use bleeding-edge features as they are developed.

My use case is that I need a "nohoist" workspace feature that should drop with v1.4.2. I plan on using nightly builds for a short time period until they appear in main builds.

Expected behavior

Set version to "nightly", the build downloads the latest Yarn build.

System information

VSTS or TFS:

  • VSTS
  • TFS

Agent:

  • Hosted
  • Custom

OS:

  • Windows
  • Mac
  • Linux

Yarn version:
Under discussion

Node version:
8.x

File not found: '********\npmauth.js'

Before opening an issue please read this.

Are you reporting a bug or a feature request ?

  • Bug
  • Feature request

Description

When running yarn in Azure DevOps-pipeline I get the following message:
2018-11-14T10:55:14.0277545Z ##[error]File not found: 'D:\a_tasks\Yarn_0888c9a9-d1b2-4567-aae2-beadcb2059b3\2.6.999\npmauth.js'

This makes the build fail.

I have just added Yarn with UI in Azure DevOps-Pipeline.

Worked for Version 2.5.999, not for 2.6.999.

MANDATORY FOR BUGS: Insert debug trace

2018-11-14T10:55:13.9869500Z ##[section]Starting: Yarn
2018-11-14T10:55:13.9872914Z ==============================================================================
2018-11-14T10:55:13.9872988Z Task : Yarn task
2018-11-14T10:55:13.9873033Z Description : Executes Yarn
2018-11-14T10:55:13.9873095Z Version : 2.6.999
2018-11-14T10:55:13.9873139Z Author : Geek Learning
2018-11-14T10:55:13.9873215Z Help : More Information (Version 2.6.999).

Dear Angular and Ember CLI users, please check our known issues
2018-11-14T10:55:13.9873302Z ==============================================================================
2018-11-14T10:55:14.0277545Z ##[error]File not found: 'D:\a_tasks\Yarn_0888c9a9-d1b2-4567-aae2-beadcb2059b3\2.6.999\npmauth.js'
2018-11-14T10:55:14.0293835Z ##[section]Finishing: Yarn

System information

VSTS or TFS:

  • VSTS
  • TFS

Agent:

  • Hosted
  • Custom

OS:

  • Windows
  • Mac
  • Linux

Yarn version: 1.9.4 (local)
Yarn version*

Node version: 10.10
Node version*

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.