Skip to content

VSTS Marketplace Task doesn't work in a Linux build agent #1476

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

Closed
dracan opened this issue Sep 14, 2018 · 18 comments
Closed

VSTS Marketplace Task doesn't work in a Linux build agent #1476

dracan opened this issue Sep 14, 2018 · 18 comments

Comments

@dracan
Copy link

dracan commented Sep 14, 2018

Looks like the VSTS build task doesn't work in a "Linux Preview" build agent. I'm using Linux containers, Docker, and AKS - so need to use the Linux build agent. Are there any other options for using GitVersion in VSTS?

Thanks for any help with this - awesome work with GitVersion btw! :)

@gep13
Copy link
Member

gep13 commented Sep 23, 2018

@dracan thanks for raising this.

As you have spotted, the Azure Pipelines (formerly known as VSTS) Task for GitVersion currently only supports Windows Build Agents.

There have been discussions about updating the Task to support more operating systems, and I believe the plan is to finalise the migration to .NET Core/Standard, and from there, update the external tooling to support it, including updating the Task, etc.

@pascalberger
Copy link
Member

The Azure DevOps task itself should be cross-plattform since #1189 where it was rewritten from using a PowerShell script to using Node scripts. This version is not released on the marketplace yet though.

The other issue is GitVersion itself and its dependencies as @gep13 has pointed out

@gep13
Copy link
Member

gep13 commented Sep 23, 2018

@pascalberger where was that change merged to?

Looking at the current master branch:

https://github.com/GitTools/GitVersion/tree/master/src/GitVersionTfsTask

It is still the PowerShell version.

@pascalberger
Copy link
Member

@gep13 This uses the node engine: https://github.com/GitTools/GitVersion/blob/master/src/GitVersionTfsTask/task.json#L70_L74

The powershell scripts in there are only for building and packaging the task.

Or where do you see that it uses PowerShell?

@gep13
Copy link
Member

gep13 commented Sep 23, 2018

Oh, hold on... Sorry, I completely read that wrong. Ok, move along, nothing to see here 😄

@pascalberger
Copy link
Member

The script executed by the tasks is this one, which has some OS specific code in here: https://github.com/GitTools/GitVersion/blob/master/src/GitVersionTfsTask/GitVersion.ts#L42-L47

@stale
Copy link

stale bot commented Jun 29, 2019

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 29, 2019
@dracan
Copy link
Author

dracan commented Jun 29, 2019

Just adding a comment to stop this issue from being closed by the stale bot.

@stale stale bot removed the stale label Jun 29, 2019
@stale
Copy link

stale bot commented Sep 27, 2019

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 27, 2019
@evanrobertson
Copy link

Is there any progress or planned progress on this issue?

@stale stale bot removed the stale label Oct 15, 2019
@arturcic
Copy link
Member

@stale
Copy link

stale bot commented Jan 13, 2020

This issue has been automatically marked as stale because it has not had recent activity. After 30 days from now, it will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 13, 2020
@NightFox7
Copy link

Is there any progress or planned progress on this issue?

@stale stale bot removed the stale label Feb 4, 2020
@arturcic
Copy link
Member

arturcic commented Feb 4, 2020

@NightFox7
Copy link

NightFox7 commented Feb 4, 2020

I got this error:

2020-02-04T13:07:11.1237309Z --------------------------
2020-02-04T13:07:11.1237597Z Installing GitVersion.Tool version 5.x
2020-02-04T13:07:11.1237880Z --------------------------
2020-02-04T13:07:11.1239306Z Found tool in cache: GitVersion.Tool 5.1.3 x64
2020-02-04T13:07:11.1284425Z ##[error]Error: ENOENT: no such file or directory, readlink ''

using this config

    steps:
      - task: gittools.usegitversion.gitversion-task.UseGitVersion@5
        displayName: GitVersion
        inputs:
          versionSpec: 5.x

@NightFox7
Copy link

@arturcic I had to install dotnet core on my linux build agent and now it works. Thanks !

@arturcic
Copy link
Member

arturcic commented Feb 4, 2020

great! Closing this issue

@arturcic arturcic closed this as completed Feb 4, 2020
@Vijay-Nirmal
Copy link

Still getting this error

--------------------------
Installing GitVersion.Tool version 5.x
--------------------------
Found tool in cache: GitVersion.Tool 5.2.4 x64
##[error]Error: EINVAL: invalid argument, readlink '/appdata/agent/_work/_tool/dotnet/dotnet'

I have installed dotnet core as mentioned by @NightFox7. This is my Build Task to install dotnet core on my linux build agent. I have tried with vertion 3.1.100, 3.0.103, 2.2.203

- task: UseDotNet@2
  displayName: 'Install .NET Core sdk'
  inputs:
    packageType: sdk
    version: 3.1.100
    installationPath: $(Agent.ToolsDirectory)/dotnet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants