Giter Club home page Giter Club logo

azure-pipelines-agent's Introduction

Azure Pipelines Agent

Announcement - AZP_AGENT_USE_LEGACY_HTTP agent knob future deprecation

We are working on pipeline agent migration to .NET 6. One of the side effect of this migration is that the legacy HTTP handler will be no longer available for use due to changes in the .NET runtime itself.

Thus the related agent knob will not work once the migration will be completed. We recommend stopping using the AZP_AGENT_USE_LEGACY_HTTP knob.

Overview

The cross-platform build and release agent for Azure Pipelines and Team Foundation Server 2015 and beyond. This replaced the deprecated closed source windows build agent and the previous cross-platform agent.

Supported on Windows, macOS, and several Linux flavors. Written for .NET Core in C#.

Status

Build & Test
Win-x64 Windows x64 Build & Test
Win-x86 Windows x86 Build & Test
macOS macOS Build & Test
Linux-x64 Linux x64 Build & Test
Linux-arm Linux ARM Build & Test
RHEL6-x64 RHEL 6 x64 Build & Test

Get the Agent

Get started with the agent.

Supported Usage

This agent can be used for both Azure Pipelines and Azure DevOps Server (Team Foundation Server). Support is extended to all on-premise solutions based on their lifecycle (including extended support).

The only exception is the Windows version of the agent for TFS 2015 since it is distributed along with a separate Node-based agent.

Latest and Pre-release labels for releases

Releases have labels Latest and Pre-release. Please make a note that the labels mean:

  • Latest - this is the current release of the agent, available to all clients or partially available (in case it is an active release that is currently under deployment).
  • Pre-release - Next version, release process of the agent version was started and it's already available for some of the users. And will be available soon for the rest.

Each new version of agent is released for users by groups during several days. And usually it becomes available for all users within 6-8 days after start of release. The release has label "Pre-release" during all these days. So it's expected behavior if specific release is used by builds in pipelines but it's marked as "Pre-release".

Troubleshooting

Troubleshooting tips are located here

Contribute

For developers that want to contribute, read here on how to build and test.

Issues

We accept issue reports both here (file a GitHub issue) and in Developer Community.

Do you think there might be a security issue? Have you been phished or identified a security vulnerability? Please don't report it here - let us know by sending an email to [email protected].

azure-pipelines-agent's People

Contributors

alex-peck avatar ankitgo avatar ashwinichalla avatar bryanmacfarlane avatar chshrikh avatar daniilshmelev avatar denisrumyantsev avatar ericsciple avatar ezzhevnikita avatar fadnavistanmay avatar ismayilov-ismayil avatar ivanduplenskikh avatar jahsu-msft avatar jeschu1 avatar jpricket avatar jtpetty avatar juliobbv avatar kasubram avatar kirill-ivlev avatar konstantintyukalov avatar max-zaytsev avatar mjroghelia avatar omeshp avatar pagangil avatar stephenmichaelf avatar tanvi-soni avatar tingluohuang avatar tingluohuang-test avatar vmapetr avatar vtbassmatt 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  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  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  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

azure-pipelines-agent's Issues

Agent fails when run in same dir as vso-agent

I've configured an agent on OSX via the instructions
I unpacked the same tar.gz downloaded in the first step to a separate directory in order to create another agent on the same machine.
When trying to run ./run.sh from the second directory, I'm met with:

An error occured.  Credentials not stored.  Must reconfigure.

Get sources step(TFVC) fails for OSx agent with authentication error

Logs:

2016-04-29T05:52:10.2676450Z ##[section]Starting: Get Sources
2016-04-29T05:52:10.4158000Z ##[command]/Users/administrator/satishAgent/_layout/externals/tee/tf eula -accept
2016-04-29T05:52:11.5926010Z You have already accepted the terms of this End User License Agreement.
2016-04-29T05:52:13.4593810Z ##[warning]Exit code 1 returned from process: file name '/Users/administrator/satishAgent/_layout/externals/tee/tf', arguments 'eula -accept'.
2016-04-29T05:52:16.5751170Z An error occurred: Access denied connecting to TFS server http://satish-destop:8080/ (authenticating as _)
2016-04-29T05:52:16.5770970Z ##[error]Exit code 100 returned from process: file name '/Users/administrator/satishAgent/layout/externals/tee/tf', arguments 'workspaces -format:xml -collection:http://satish-destop:8080/tfs/TestDefault/ -login:,******** -noprompt'.
2016-04-29T05:52:16.5803310Z ##[section]Finishing: Get Sources

FilePath input is not prepended by source directory for windows agent

FilePath input(vsts-task) is expected to be prepended by source directory.
This happens in case of linux agent but not for windows agent.
for example, filepath "resultFiles\a.xml" is supposed to be chanaged as "C:\buildDir_work\1\s\resultFiles\a.xml"
To repro create a build definition with publish test results task which has 'testResultsFiles' a filePath input
From debug logs you can find the difference between how it is prepended for linux and not for windows agents.

Inject agent system capabilities as environment variables for tasks to use

Hi,

It would be very useful to be able to access system capabilities as variables inside tasks.

That way, I could simply lookup the variable "MSBuild" using tl.getVariable("MSBuild) and get the path to msbuild.exe without having to either hard code it or insert it in the PATH.

This was expected to work that way, but I was disappointed to learn that it only works for build definitions' demands.

Thanks

Authentication issue from agent on Ubuntu to the TFS 2015 OnPrem

Hi, It looks very promising!

I installed .NET Core and the agent on Ubuntu 14.04.4 LTS.
Added all chains of certificates from tfs.company.com to /etc/ssl/certs/ca-certificates.crt
However, I got an authentication issue.

buildaccount@linuxvm:~/agent$ ./run.sh configure --url https://tfs.company.com/tfs --agent linuxvm --pool PoolName --auth Negotiate --username DOMAIN\\buildaccount

>> End User License Agreements:

Building sources from a TFVC repository requires accepting the Team Explorer Everywhere End User License Agreement. This step is not required for building sources from Git repositories.

A copy of the Team Explorer Everywhere license agreement can be found at:
  /home/buildaccount/agent/externals/tee/license.html

Enter accept the Team Explorer Everywhere license agreement now? (Y/N) (press enter for N) > Y

>> Connect:

Enter password > **************
Connecting to server ...
An error occurred while sending the request.
Failed to connect.  Try again or ctrl-c to quit
Enter password > Exiting...

Here is the part of the log:

[2016-05-04 20:42:44Z ERR  Terminal] System.Net.Http.HttpRequestException: An error occurred while sending the request. ---> System.Net.Http.CurlException: SSL peer certificate or SSH remote key was not OK
   at System.Net.Http.CurlHandler.ThrowIfCURLEError(CURLcode error)
   at System.Net.Http.CurlHandler.MultiAgent.FinishRequest(EasyRequest completedOperation, CURLcode messageResult)
   --- End of inner exception stack trace ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.Common.VssHttpMessageHandler.<SendAsync>d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Net.Http.HttpClient.<FinishSendAsync>d__58.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__45.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.<SendAsync>d__42`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.Location.Client.LocationHttpClient.<GetConnectionDataAsync>d__6.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at Microsoft.VisualStudio.Services.Client.VssServerDataProvider.<ConnectAsync>d__39.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.AgentServer.<ConnectAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.ConfigurationManager.<TestConnectAsync>d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.ConfigurationManager.<ConfigureAsync>d__7.MoveNext()

Two questions:

  1. Does the agent use the certificates installed in the Linux?
  2. Does NTLM authentication work on v2.99.0?

OSX agent fails on long running builds

I have a build configuration which downloads binaries created by another build and then runs a series of very timeconsuming tests (they take 2+ hours to complete on a linux VM). If I run the tests on OSX using the vsts-agent, they fail after about 15 minutes with a message like this:

The job has been abandoned because agent prose-mac-test-1 did not renew the lock. Ensure agent is running, not sleeping, and has not lost communication with the service.

When this first happens, no log information is available from the main task that runs the tests and the build agent shows a red bar even though it says that it's status is idle. After another 5 minutes or so, the job finally completes and the agent status goes back to green.

Possibly relevant is that all of my tests are run by executing a single executable (a custom test runner) configured as a "CommandLine" task in the build. This executable generates lots of output to stdio which does appear in the console during the first 15 minutes before the error comes up.

Also note that essentially the exact same configuration runs to completion over 2+ hours on an ubuntu linux machine.

Configuration & running agent behind corporate proxy

Wondering if there is a way we can specify proxy settings when running the configuration?

At the moment within corporate boundaries I'm getting this after running ./config.sh and entering my server URL and PAT ...

Connecting to server ...
An error occurred while sending the request.
Failed to connect. Try again or ctrl-c to quit.

However, when I connect my Mac outside of corporate boundaries the configuration and running of the agent works OK.

I noticed this thread for the previous agent microsoft/vso-agent#67 . I tried this ...

export HTTP_PROXY=[proxy url]

... but it didn't seem to work. Does this agent support proxies?

Async Command timeout

When using a Copy Publish Artifact task, I encounter an HTTP Timeout during execution of the async upload command.

So looking for enhancement...

Although the default timeout of 5 minutes is typically plenty, there are occasions where it is not - obviously it may not make sense to change the default timeout but would be ideal to add a configuration/capability setting to override when truly needed.

How to connect to on-premise TFS 2015?

Looks like it is not possible to get PAT token in TFS 2015 Update 2.

And when specifying ALT credentials type, after providing user name and password, I get an error:
"An error occured. Must call ReadCredential first."

OS X 10.11

Input prompts not falling back to english

The prompt for inputs are showing prompt0 and prompt0Default1 while linux agent gives proper prompts for inputs(server url, pat etc.,). Same sequence of inputs as linux didnt work to connect to server either

"Failed to connect" v2.99.0 on OSX

Trying the latest preview release but getting the following error after entering PAT:

System.TypeInitializationException: The type initializer for 'System.Net.Http.CurlHandler' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Http' threw an exception. ---> System.TypeInitializationException: The type initializer for 'HttpInitializer' threw an exception. ---> System.TypeInitializationException: The type initializer for 'CryptoInitializer' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'System.Security.Cryptography.Native': The specified module could not be found.
(Exception from HRESULT: 0x8007007E)
at Interop.CryptoInitializer.EnsureOpenSslInitialized()
at Interop.CryptoInitializer..cctor()
--- End of inner exception stack trace ---
at Interop.CryptoInitializer.Initialize()
at Interop.HttpInitializer..cctor()
--- End of inner exception stack trace ---
at Interop.HttpInitializer.Initialize()
at Interop.Http..cctor()
--- End of inner exception stack trace ---
at Interop.Http.GetSupportedFeatures()
at System.Net.Http.CurlHandler..cctor()
--- End of inner exception stack trace ---
at System.Net.Http.CurlHandler..ctor()
at System.Net.Http.HttpClientHandler..ctor()
at Microsoft.VisualStudio.Services.Common.VssHttpMessageHandler..ctor(VssCredentials credentials, VssHttpRequestSettings settings)
at Microsoft.VisualStudio.Services.Client.VssConnection..ctor(Uri baseUrl, VssCredentials credentials, VssClientHttpRequestSettings settings)
at Microsoft.VisualStudio.Services.Agent.Util.ApiUtil.CreateConnection(Uri serverUri, VssCredentials credentials)
at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.ConfigurationManager.d__9.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Services.Agent.Listener.Configuration.ConfigurationManager.d__7.MoveNext()

Are there any prerequisites that needs to be installed?

Password is in clear text in .Credentials file

I noticed, that build account user name and password are stored in agent.Credentials:

{
  "Scheme": "Negotiate",
  "Data": {
    "username": "DOMAIN\\BuildUser",
    "password": "asfk(KOJ292la#",
    "url": "https://tfs.company.com/tfs"
  }

Is it going to be like that?

Can't find CryptoInitializer DLL on OSX (Default OpenSsl not supported)

After entering a VSTS URL and Personal Access Token, the setup process running ./run.sh fails with "System.Net.Http.Curlhandler" threw an exception.

In the diag log file, the stack trace ends at 'CryptoInitializer' threw an exception. ---> System.DllNotFoundException: Unable to load DLL 'System.Security.Cryptography.Native': The specified Module could not be found.
at Interop.CryptoInitialzier.EnsureOpenSslInitialized()
etc.

The URL is HTTPS, so OpenSsl certainly should be in play. Perhaps a missing component?

I'm running preview 2, from vsts-agent-darwin-2.99.0-0428.tar.gz

I can provide more if it would be helpful, although the error line was pretty specific about the missing DLL.

installation instruction should specify linux or osx

vsts-agent-linux-1.999.0-0405.tar.gz is for linux
vsts-agent-linux-1.999.0-0405.tar.gz is for osx

people not familiar with OSX won't tell the difference, this should be clearly stated on the readme.md file.

Also in the README.md file, the curl command is referring to the linux package and the following command is referring to osx package.

Secret environment variables not accessible in task

We have a simple build task that takes in 2 variables. One is secret, the other not. The non-secret variable can be accessed fine by the task (a shell script that calls through to npm), but the secret variable is not accessible.

A printenv command executed before the npm call in the shell script does not show the secret variable (on the old agent it would show up but be starred out).

OSX Service: can't copy to LaunchAgents

I've been running the 0.7 release successfully (not as a service) on a mac for a month or so. Yesterday I upgraded to v2.100.0, and while I'm able to run it the way I was before (not as a service), if I try to configure it to run as a service I get this result:

Enter work folder (press enter for _work) >
Enter run agent as service? (Y/N) (press enter for N) > Y
Creating launch agent in /Users/prose/Library/LaunchAgents/vsts.agent.msdata.prose-mac-test-2.plist
creating /Users/prose/Library/Logs/vsts.agent.msdata.prose-mac-test-2
cp: /Users/prose/Library/LaunchAgents/vsts.agent.msdata.prose-mac-test-2.plist: No such file or directory
svc.sh: line 40: failed to copy plist: command not found
Cannot start the service. Check the logs for more details.
An error occured. Exit code 127 returned from process: file name '/bin/bash', arguments 'svc.sh install'.

Here's the log file from the _diag folder:
Agent_20160510-165044-utc.log.txt

Suggestions?

Read permission on ancestor directories not validated up front

and results in the task blowing up during execution when attempting to perform read operations.

Validation should be performed up front. Either at configure time (challenges with impersonation when installing as service, challenges with change account), or at startup time, or both.

Create instructions for linux distros

I know:

  • Ubuntu 16.04 has a libicu issue (I think you have to install libicu52 via appget for coreclr)
  • Ubuntu 15.10 same as 16.04
  • Ubuntu 14.04 won't run as a service because doesn't have svc mgr we use. Add note about they can create their own service file (.sh).
  • centos - let's try it, so far not on our testing radar.

Command line args

  1. If the options are specified on the command line, then prompting is omitted. The problem is when validation fails on the group of inputs, then the while loop is tried again. However, since the values were already supplied on the command line, validation on the group of inputs is performed on the same incorrect values...in a while loop. The second time through any of the input while loops, we should force prompting - the value supplied on the command line should be the default.
    2) Agent exits if --nostart is specified on the command line.
  2. Should error out early if unknown command line parameter (i.e. typo)

Task download must work when name resolution differs on platforms (osx etc...)

There's scenarios like OSX .local etc... or Linux where not participating in same DNS where the agent refers to the server by a different name than the server knows itself as. So, we need to ensure we use the host name from how the agent knows the server by and the relative url from the task download endpoint.

TF enhancements

It would be nice if the default variables would always be included, even if their value is empty. For example, when building from Shelveset or in a Gated Checking the variable "Build.SourceTfvcShelveset" is set, but when the same build is executed normally, the variable is undefined and where referenced will actually output:

$(Build.SourceTfvcShelveset)

It would be nice if the standard variables would always be defined, but left empty if not applicable.

Fix Terminal.ReadSecret

Reported issues:

Delete key is not handled properly:

  • it is counted like a real character and crate agent fails, because of invalid characters
  • pressing backspace after delete key is messing things and could have led to effects similar to issue 1. If I type β€œ123”, then press DEL twice and then backspace twice, I can see β€œ1” on the screen, but the agent is named β€œ123” in the web UI.

and:

I’ve seen other issues with num lock not being on, using num keys and seeing weird characters. Obviously, the input code is not handling chars.

I think the best fix is to ditch the current read-key-interpretation approach, and stay out of the way as much as possible. In Windows it's possible to pinvoke to temporarily disable "echo input". See: http://stackoverflow.com/a/36029698

A similar fix is likely possible on OSX/Linux as well.

Implement Unconfigure command

Implement "Unconfigure" command. There is a placeholder in agent.cs:
if (command.Unconfigure)
{
// TODO: Unconfiure, remove config and exit
return Constants.Agent.ReturnCode.Success;
}

Missing variables

I need to look into some of these further. I compared against a hosted build, so some of them may be set by the hosted build agent only.
AGENT_ID
AGENT_JOBNAME
AGENT_MACHINENAME
AGENT_NAME
AGENT_ROOTDIRECTORY
AGENT_SERVEROMDIRECTORY
AGENT_WORKFOLDER
AGENT_WORKINGDIRECTORY
build.fetchtags
SYSTEM_WORKFOLDER
TASK_DISPLAYNAME

Can't install/run as service on OSX

Continuing from microsoft/vso-agent#283...

installing the OSX agent per instructions and electing Y when prompted to run as service results in an error.

Enter Work Folder (press Enter for _work) > 
Enter Run Agent as service (press Enter for N) > Y
An error occured.  The method or operation is not implemented.

Mac is running OSX El Capitan v10.11.4

log from _diag can be found here

Does not work with 2015 QU1 (works with RTM and QU2)

Hello!
I'd like thank you for what you are doing.

I installed CMake,
registered the agent
created build definition,
and queued a build

It seams the agent did not tried to get sources and gave the log on the web:
What is missing? Could you please give me a hint?

******************************************************************************
Starting: Build
******************************************************************************
API resource location 60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd is not registered on https://tfs.company.com/tfs/COLLECTION/.
******************************************************************************
Finishing: Build
******************************************************************************

On the VM log looks like that:

2016-05-06 17:02:17Z: Listening for Jobs
2016-05-06 17:02:39Z: Running job: Build
2016-05-06 17:02:46Z: Job Build completed with result: Failed

Worker_* log looks like that:

[2016-05-06 17:02:44Z INFO TaskManager] Ensuring task exists: ID '7d831c3c-3c68-459a-a5c9-bde6e659596c', version '1.0.9', name 'CMake', directory '/home/buildvm/agent/_work/_tasks/CMake_7d831c3c-3c68-459a-a5c9-bde6e659596c/1.0.9'.
[2016-05-06 17:02:44Z INFO TaskManager] Getting task.
[2016-05-06 17:02:44Z ERR  JobRunner] Caught exception from TaskManager: Microsoft.VisualStudio.Services.WebApi.VssResourceNotFoundException: API resource location 60aac929-f0cd-4bc8-9ce4-6b30e8f1b1bd is not registered on https://tfs.company.com/tfs/COLLECTION/.
   at Microsoft.VisualStudio.Services.WebApi.VssHttpClientBase.
.. 
STACK TRACE
..
[2016-05-06 17:02:44Z INFO JobRunner] Shutting down the job server queue.

Can't build Cordova apps

We've got an Ionic (Cordova-based) app and build definition that worked fine with the VSO Agent. Upon migrating to the VSTS Agent, we're getting failures in the build which look like:

Results at '/Users/brandonh/djbuildagent-internal/_work/1/s/platforms/ios/build/device/MarketWatch.ipa' 
Module cache at /Users/brandonh/.taco_home/node_modules
cordova already installed.
Skipping packaging. Detected cordova-ios verison that auto-creates ipa.

/usr/bin/security delete-keychain /Users/brandonh/djbuildagent-internal/_work/1/s/_tasktmp.keychain

/bin/rm -f /Users/brandonh/Library/MobileDevice/Provisioning Profiles/b629873d-31b6-4608-8d99-245065d41099.mobileprovision
Arguments to path.resolve must be strings

these never happened in the VSO agent and we haven't changed the build definition in VSTS at all.

as a sanity check I installed the old vso-agent and ran a build which passed flawlessly. the matching area of the build log when that agent runs it looks like:

Results at '/Users/brandonh/djbuildagent-internal1/_work/2/s/platforms/ios/build/device/MarketWatch.ipa' 
Module cache at /Users/brandonh/.taco_home/node_modules
cordova already installed.
Skipping packaging. Detected cordova-ios verison that auto-creates ipa.

/usr/bin/security delete-keychain /Users/brandonh/djbuildagent-internal1/_work/2/s/_tasktmp.keychain

/bin/rm -f /Users/brandonh/Library/MobileDevice/Provisioning Profiles/b629873d-31b6-4608-8d99-245065d41099.mobileprovision

******************************************************************************

Running CopyPublishBuildArtifacts

PATH being overridden

I'm currently running the agent in a Docker container and modifying the PATH environment variable in my Dockerfile follows:

ENV PATH "$GOPATH/bin:/usr/local/go/bin:$PATH"

If I /bin/bash in to the container, I can verify that the PATH is set correctly. However, the actual build tasks themselves seem to be using a different PATH and overriding what my image sets for PATH. The overriding path is as follows as viewed from the Agent Capabilities listing:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

This requires me to use the fully-qualified path to any executales I run in a Build task.

I'm using v2.99.0-0428 of the agent but this also occurred with v0.7.

Thanks

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.