Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

AGENT_TOOLSDIRECTORY is empty and/or not pointing to /opt/hostedtoolcache #61

Closed
majorvin opened this issue Jan 21, 2020 · 2 comments
Closed

Comments

@majorvin
Copy link

majorvin commented Jan 21, 2020

Similar issue as #57
Running echo $AGENT_TOOLSDIRECTORY in the server shows /opt/hostedtoolscache but when I run this on a build agent hosted internally,$AGENT_TOOLSDIRECTORY returns _work/tools which is empty.

When running use python version task on ubuntu private agents:

##[debug]Evaluating condition for step: 'UsePythonVersion'
##[debug]Evaluating: SucceededNode()
##[debug]Evaluating SucceededNode:
##[debug]=> True
##[debug]Result: True
##[section]Starting: UsePythonVersion
==============================================================================
Task         : Use Python version
Description  : Use the specified version of Python from the tool cache, optionally adding it to the PATH
Version      : 0.151.1
Author       : Microsoft Corporation
Help         : https://docs.microsoft.com/azure/devops/pipelines/tasks/tool/use-python-version
==============================================================================
##[debug]agent.TempDirectory=~/myagent/_work/_temp
##[debug]loading inputs and endpoints
##[debug]loading INPUT_VERSIONSPEC
##[debug]loading INPUT_ADDTOPATH
##[debug]loading INPUT_ARCHITECTURE
##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
##[debug]loading SECRET_SYSTEM_ACCESSTOKEN
##[debug]loaded 7
##[debug]Agent.ProxyUrl=undefined
##[debug]Agent.CAInfo=undefined
##[debug]Agent.ClientCert=undefined
##[debug]Agent.SkipCertValidation=undefined
##[debug]Agent.ProxyUrl=undefined
##[debug]Agent.CAInfo=undefined
##[debug]Agent.ClientCert=undefined
##[debug]check path : ~/myagent/_work/_tasks/UsePythonVersion_33c63b11-352b-45a2-ba1b-54cb568a29ca/0.151.1/node_modules/azure-pipelines-tool-lib/lib.json
##[debug]adding resource file: ~/myagent/_work/_tasks/UsePythonVersion_33c63b11-352b-45a2-ba1b-54cb568a29ca/0.151.1/node_modules/azure-pipelines-tool-lib/lib.json
##[debug]system.culture=en-US
##[debug]check path : ~/myagent/_work/_tasks/UsePythonVersion_33c63b11-352b-45a2-ba1b-54cb568a29ca/0.151.1/task.json
##[debug]adding resource file: ~/myagent/_work/_tasks/UsePythonVersion_33c63b11-352b-45a2-ba1b-54cb568a29ca/0.151.1/task.json
##[debug]system.culture=en-US
##[debug]versionSpec=3.6
##[debug]addToPath=true
##[debug]architecture=x64
##[debug]Semantic version spec of 3.6 is 3.6
##[debug]isExplicit: null
##[debug]explicit? false
##[debug]Agent.Version=2.153.2
##[debug]Agent.ToolsDirectory=~/myagent/_work/_tool
##[debug]evaluating 0 versions
##[debug]match not found
##[debug]Agent.Version=2.153.2
##[debug]Agent.ToolsDirectory=~/myagent/_work/_tool
##[debug]Agent.Version=2.153.2
##[debug]Agent.ToolsDirectory=~/myagent/_work/_tool
##[debug]Agent.ToolsDirectory=~/myagent/_work/_tool
##[debug]task result: Failed
##[error]Version spec 3.6 for architecture x64 did not match any version in Agent.ToolsDirectory.
Versions in ~/myagent/_work/_tool:


If this is a Microsoft-hosted agent, check that this image supports side-by-side versions of Python at https://aka.ms/hosted-agent-software.
If this is a self-hosted agent, see how to configure side-by-side```

@damccorm
Copy link

Hey @majorvin - we don't prepopulate the tool-cache on your private machine. If you want it to function like the hosted machines you'll need to download your own versions of python.

@stephenmichaelf
Copy link
Member

Looks like this was answered, please reopen if you still have an issue or questions. Thanks!

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

3 participants