Coder Social home page Coder Social logo

azure-pipelines-tool-lib's Introduction

Build Status

Azure Pipelines Tool Installer SDK

Tool installer tasks SDK for Azure Pipelines.

Tool Installer Task Overview: Read Here.

Demo Video: Here

Sample of tool api usage is here

In development. Preview installer tasks soon.

Status

Build & Test
Win-x64 Windows Build & Test
macOS macOS Build & Test
Linux-x64 Linux Build & Test

Build

Once:

$ npm install

Build:

$ npm run build

Test

To run all tests:

$ npm test

To just run unit tests:

$ npm run units

Sample

Build first. Then run

$ npm run sample

The tool cache will be in the _build folder. To clear the cache, build again.

Contributing

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Since at the moment work is proceeding on migrating to Node16, you need to remember the following:

  • master branch for SDK v1 (stable and targets Node10)
  • releases/2.x branch for SDK v2 (preview and targets Node16)
  • Changes that were merged for SDK v1 should be cherry-picked for SDK v2 once they are merged to the master branch

Security issues

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-tool-lib's People

Contributors

amuegge avatar brandonaut avatar brcrista avatar bryanmacfarlane avatar csigs avatar daniilshmelev avatar denis-tikhomirov avatar denisrumyantsev avatar dependabot[bot] avatar dmitriibobreshev avatar egor-bryzgalov avatar ericsciple avatar ezzhevnikita avatar fadnavistanmay avatar keithrob avatar keljos avatar konstantintyukalov avatar kuleshovilya avatar magleaso avatar max-zaytsev avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar mmrazik avatar sergey-koryshev avatar stephenmichaelf avatar tingluohuang avatar tkasparek avatar v-zbsail 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

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

azure-pipelines-tool-lib's Issues

downloadTool not working behind an authenticated proxy.

Hello:
I am working in putting proxy support to different task of a plugin.
Basically I am using downloadTool to download a zip file from a server in the internet.

When using authenticated proxy, I configured the agent to use the proxy:
.\config.cmd --proxyurl http://proxy.optimyth.com:3128 --proxyusername usuario --proxypassword ******

Some logs from today:

2020-04-29T06:53:08.2981043Z [KW] Downloading KLA from https://www.kiuwan.com//pub/analyzer/KiuwanLocalAnalyzer.zip
2020-04-29T06:53:08.2981742Z ##[debug]Agent.ProxyUrl=http://proxy.optimyth.com:3128
2020-04-29T06:53:08.2982331Z ##[debug]Agent.ProxyUsername=usuario
2020-04-29T06:53:08.2983331Z ##[debug]Agent.ProxyPassword=***
2020-04-29T06:53:08.2984570Z ##[debug]Agent.ProxyBypassList=undefined
....
2020-04-29T06:53:08.3057758Z ##[debug]downloading
...
2020-04-29T06:53:08.4791467Z ##[debug]task result: Failed
2020-04-29T06:53:08.4833912Z ##[error]tunneling socket could not be established, statusCode=407
2020-04-29T06:53:08.4843512Z ##[debug]Processed: ##vso[task.issue type=error;]tunneling socket could not be established, statusCode=407
2020-04-29T06:53:08.4843976Z [KW] Task failed: tunneling socket could not be established, statusCode=407
2020-04-29T06:53:08.4849449Z ##[debug]Processed: ##vso[task.complete result=Failed;]tunneling socket could not be established, statusCode=407

Then, I recofigured my proxy not to use user and password.
Also reconfigured the agent not to use user and password using
.\config.cmd --proxyurl http://proxy.optimyth.com:3128

New logs:

2020-04-29T07:07:18.3663258Z ##[debug]c2ae6859-d2e8-4200-8117-db8d920a576f=https://www.kiuwan.com/
2020-04-29T07:07:18.3663678Z [KW] Downloading KLA from https://www.kiuwan.com//pub/analyzer/KiuwanLocalAnalyzer.zip
2020-04-29T07:07:18.3664199Z ##[debug]Agent.ProxyUrl=http://proxy.optimyth.com:3128
2020-04-29T07:07:18.3664690Z ##[debug]Agent.ProxyUsername=undefined
2020-04-29T07:07:18.3665217Z ##[debug]Agent.ProxyPassword=undefined
2020-04-29T07:07:18.3665659Z ##[debug]Agent.ProxyBypassList=undefined
...
2020-04-29T07:07:18.3678969Z ##[debug]downloading
2020-04-29T07:07:18.9731433Z ##[debug]creating stream
2020-04-29T07:07:45.7588101Z ##[debug]download complete
2020-04-29T07:07:45.7592551Z Extracting archive

As you can see in the logs, the download finish when not using authentication.
I am aware that 407 is a proxy authentication issue, but I have tested that proxy with the user and password in browser and it is working.
Also, the local agent was able to connect to AzureDevOps without problem.

Thanks a lot in advance for your help.

Extract Zip on windows failing with corrupt directory

Since we updated to version 0.5.1 our task is not working anymore. Our code does work correctly with version 0.4.1.

What we do:

 let downloadLocation = await to.downloadTool(installerUrl);
 tl.debug(`download locaton: ${downloadLocation}`)
 let extractedLocation = await to.extractZip(downloadLocation);
 tl.debug(`extracted location: ${extractedLocation}`)
 let cacheDir = await to.cacheDir(extractedLocation, 'GitVersion', downloadVersion);
 tl.debug(`cache location: ${cacheDir}`)
 return cacheDir;

The error:

2018-03-19T13:26:48.4274565Z ##[debug]which 'powershell'
2018-03-19T13:26:48.4302226Z ##[debug]found: 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe'
2018-03-19T13:26:48.4302471Z ##[debug]which 'powershell'
2018-03-19T13:26:48.4322083Z ##[debug]found: 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe'
2018-03-19T13:26:48.4322395Z ##[debug]C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe arg: -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command
2018-03-19T13:26:48.4323956Z ##[debug]C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe arg: $ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('D:\a\_temp\67f97e98-d565-4bc7-8dc8-dee6006c9b06', 'D:\a\_temp\66cabaa2-1b51-479a-bb53-b49ebe571836')
2018-03-19T13:26:48.4324504Z ##[debug]exec tool: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
2018-03-19T13:26:48.4324990Z ##[debug]arguments:
2018-03-19T13:26:48.4325421Z ##[debug]   -NoLogo
2018-03-19T13:26:48.4325780Z ##[debug]   -Sta
2018-03-19T13:26:48.4326347Z ##[debug]   -NoProfile
2018-03-19T13:26:48.4326682Z ##[debug]   -NonInteractive
2018-03-19T13:26:48.4326983Z ##[debug]   -ExecutionPolicy
2018-03-19T13:26:48.4327262Z ##[debug]   Unrestricted
2018-03-19T13:26:48.4327548Z ##[debug]   -Command
2018-03-19T13:26:48.4327907Z ##[debug]   $ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('D:\a\_temp\67f97e98-d565-4bc7-8dc8-dee6006c9b06', 'D:\a\_temp\66cabaa2-1b51-479a-bb53-b49ebe571836')
2018-03-19T13:26:48.4331053Z [command]C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -NoLogo -Sta -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command "$ErrorActionPreference = 'Stop' ; try { Add-Type -AssemblyName System.IO.Compression.FileSystem } catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('D:\a\_temp\67f97e98-d565-4bc7-8dc8-dee6006c9b06', 'D:\a\_temp\66cabaa2-1b51-479a-bb53-b49ebe571836')"
2018-03-19T13:26:49.7235351Z Exception calling "ExtractToDirectory" with "2" argument(s): "Central 
2018-03-19T13:26:49.7237895Z Directory corrupt."
2018-03-19T13:26:49.7238949Z At line:1 char:111
2018-03-19T13:26:49.7240884Z + ... catch { } ; [System.IO.Compression.ZipFile]::ExtractToDirectory('D:\a ...
2018-03-19T13:26:49.7241905Z +                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2018-03-19T13:26:49.7350394Z     + CategoryInfo          : NotSpecified: (:) [], ParentContainsErrorRecordE 
2018-03-19T13:26:49.7497928Z    xception
2018-03-19T13:26:49.7507370Z     + FullyQualifiedErrorId : InvalidDataException
2018-03-19T13:26:49.7620877Z  
```

Cache utility accepts the sementic version

Cache utility accepts the sementic version. I have a usecase where for go tool, user can enter 1.10 instead of 1.10.0. Cache utility fails because, semver function expecting patch to be available.

Go, doent specify the patch if it doesn't available in the version list. I have to workaround currently to bypass this problem.

Retry 5xx failures

We've had a couple of builds fail today because the Node tool installer returned a 502 response.
Rerunning it fixed it. It could be interesting if it fails with a 5xx response to wait a second, try again, wait 3 seconds, try again, then fail.

Relevant lines (as far as I can see):
https://github.com/Microsoft/vsts-task-tool-lib/blob/master/tool.ts#L225

Let me know if you'd appreciate this and I can make a pull request.

Relevant logs:

2018-01-06T14:00:55.4185057Z Downloading: https://nodejs.org/dist/v8.9.4/node-v8.9.4-win-x64.7z
2018-01-06T14:00:55.4185442Z ##[debug]destination d:\a\_temp\c35d5f0d-b2b7-43ed-8309-0e1078420071
2018-01-06T14:00:55.4186351Z ##[debug]creating stream
2018-01-06T14:00:55.4208841Z ##[debug]downloading
2018-01-06T14:00:55.4437058Z ##[debug]task result: Failed
2018-01-06T14:00:55.4533722Z ##[error]Unexpected HTTP response: 502
2018-01-06T14:00:55.4534242Z ##[debug]Processed: ##vso[task.issue type=error;]Unexpected HTTP response: 502
2018-01-06T14:00:55.4552145Z ##[debug]Processed: ##vso[task.complete result=Failed;]Unexpected HTTP response: 502

Support tools with non semver version

Hey,

As I tried to create different tool-installers, I noticed one tool which uses a different version schema which is not semver compatible.
I use the GitHub API to get the latest releases, which results in versions like this:

1.17         // without the ".0"
1.17.0.1     // with a build number

The first case can easily be fixed by append a ".0". (There is PR open for that in semver: npm/node-semver#212)
The second case is more complex than that.

I already tried to normalize the versions by extract the last number and append it as a build number.

function normalizeVersion(version) {
    const parts = version.split(".");

    if (parts.length === 4) {
        const main = parts.slice(0, 3);
        const additional = parts[3];

        if(additional === "0") {
            return main.join(".");
        } else {
            return main.join(".") + "+build." + additional;
        }
    } else if (parts.length < 3) {
        return semver.clean(
            [
                ...parts,
                ...("0".repeat(3 - parts.length).split(""))
            ].join(".")
        );
    }

    return version;
}

Some examples:

1.0.5.4 => 1.0.5+build.4
1.0.7.5 => 1.0.7+build.5
1.0.0.3 => 1.0.0+build.3
1.0.0.4 => 1.0.0+build.4
1.0.0.0 => 1.0.0
1.0 => 1.0.0
1.0.0.1 => 1.0.0+build.1
1.0.0.5 => 1.0.0+build.5
1.0.1.0 => 1.0.1
1.0.2.1 => 1.0.2+build.1
1.0.0.2 => 1.0.0+build.2
1.0.3.2 => 1.0.3+build.2
1.0.4.3 => 1.0.4+build.3
1.1.5.4 => 1.1.5+build.4
1.2.7.5 => 1.2.7+build.5
1.3.0.3 => 1.3.0+build.3
1.3 => 1.3.0
1.4.0.4 => 1.4.0+build.4
1.5.0.0 => 1.5.0
1.6.0.1 => 1.6.0+build.1
1.7.0.5 => 1.7.0+build.5
1.7 => 1.7.0
1.8.1.0 => 1.8.1
1.9.2.1 => 1.9.2+build.1
1.10.0.2 => 1.10.0+build.2
1.11.3.3 => 1.11.3+build.3
1.11 => 1.11.0
1.11.3.2 => 1.11.3+build.2
1.11.3.4 => 1.11.3+build.4
1.12.4.3 => 1.12.4+build.3

Unfortunately, this doesn't work cause it looks like the build number will not be used in comparison.

This simple comparer that includes the build number: (since semver 6.1.0)

function compareVersion(a, b) {
    const result = semver.compare(a, b);

    if (result === 0) {
        semver.compareIdentifiers()
        return semver.compareBuild(a, b);
    }

    return result;
}

(these are all just simple examples, there are more cases to cover.)

downloadTool towards github/aws fails due to old rest client

Hello,

I'm trying to us a task (https://github.com/hanabi1224/azure-pipelines-task-adopt-openjdk-installer) which fails when downloading a file from github.

When looking into this I see that typed-rest-client 1.5.0 which this project use will fail to download files from github, probably due to inserting :443 in the url when downloading via proxy. This in turn seems to stem from an older tunnel version.

The newest version does not have this problem.

Would it be possible to bump the version used?

The following console sample (index.ts) illustrate this problem. When executed with version 1.5.0 of typed-rest-client it fails, but with version 1.7.3 it succeeds.

import * as httpm from 'typed-rest-client/HttpClient';
import * as ifm from 'typed-rest-client/Interfaces';

//https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7+10.2/OpenJDK11U-jdk_x64_windows_hotspot_11.0.7_10.zip

const options : ifm.IRequestOptions = { proxy: { proxyUrl: 'http://localhost:8888' }, allowRedirects: true, allowRetries: true, maxRetries: 2 } as  ifm.IRequestOptions;;
const client: httpm.HttpClient = new  httpm.HttpClient("test-client/1.0", undefined, options);

const response: Promise<httpm.HttpClientResponse> = client.get('https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.7+10.2/OpenJDK11U-jdk_x64_windows_hotspot_11.0.7_10.zip');

response.then(r => {
    console.log(r.message.statusCode);
    console.log(r.message.statusMessage);    
});


[NuGet tool installer] Certificate has expired

Duplicating this Issue here, since the other Issue does not seem to be getting much attention from the maintainers.
microsoft/azure-pipelines-tasks#15316

Multiple teams have been hitting this random cert failure for the last week or two.
This seems to happen with both the V1 and V1 version of the pipeline task.

Please take a look and fix ASAP, thanks.

Starting: Use NuGet 4.9.4

Task : NuGet tool installer
Description : Acquires a specific version of NuGet from the internet or the tools cache and adds it to the PATH. Use this task to change the version of NuGet used in the NuGet tasks.
Version : 0.179.1
Author : Microsoft Corporation
Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/package/prev-versions/nuget-installer-0

ERR:certificate has expired
Finishing: Use NuGet 4.9.4

Preview functionality

  • write .complete file
  • unzip on windows
  • extract .7z files on windows
  • fix mocha tests (remove =>)

downloadTool() should retry on HTTP errors

One of our builds failed to download node:

##[section]Starting: Install Node.js 10.x
==============================================================================
Task         : Node Tool Installer
Description  : Finds or Downloads and caches specified version spec of Node and adds it to the PATH.
Version      : 0.136.2
Author       : Microsoft Corporation
Help         : 
==============================================================================
Downloading: https://nodejs.org/dist/v10.14.1/node-v10.14.1-darwin-x64.tar.gz
##[error]Unexpected HTTP response: 502
##[section]Finishing: Install Node.js 10.x

The downloadTool() function should add retries:

https://github.com/Microsoft/azure-pipelines-tool-lib/blob/7820a4aabab205385181d2869fea2fc5bb341c7c/tool.ts#L221

Sample is broken

Sample project run failed with this message:

##vso[task.debug]Agent.Version=2.115.0
##vso[task.debug]Agent.TempDirectory=D:\microsoft\azure-pipelines\tool-lib\_build\TEMP
##vso[task.debug]testing directory 'D:\microsoft\azure-pipelines\tool-lib\_build\TEMP'
Downloading: https://nodejs.org/dist/v5.10.1/node-v5.10.1-win-x64.7z
##vso[task.debug]destination D:\microsoft\azure-pipelines\tool-lib\_build\TEMP\cb9ea2a4-0c1c-4b79-a5e2-79f5550ca582
##vso[task.debug]downloading
##vso[task.debug]Failed to download "cb9ea2a4-0c1c-4b79-a5e2-79f5550ca582" from "https://nodejs.org/dist/v5.10.1/node-v5.10.1-win-x64.7z". Code(404) Message(Not Found)
##vso[task.debug]task result: Failed
##vso[task.issue type=error;]Unexpected HTTP response: 404
##vso[task.complete result=Failed;]Unexpected HTTP response: 404

"node-v5.10.1-win-x64.7z" archive is not present in the node 5.10.1 dist: https://nodejs.org/dist/v5.10.1

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

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```

downloadTool function doesn't log progress, content-length or file size

I had a tool installer task cache a truncated NuGet.exe (3 MB instead of 5 MB) in _tools. When I found the logs from the download there wasn't a lot of detail. See below.

  • If a Content-Length header is returned, downloadTool should log it.
  • During download, downloadTool should output progress.
  • After download, downloadTool should log the downloaded file size on disk.
  • If the Content-Length header is returned and the file size on disk doesn't match, downloadTool should probably retry or fail.
2018-01-10T19:46:36.3426146Z ##[section]Starting: Use NuGet 4.3.0
2018-01-10T19:46:36.3634872Z ==============================================================================
2018-01-10T19:46:36.3635036Z Task         : NuGet Tool Installer
2018-01-10T19:46:36.3635168Z Description  : Acquires a specific version of NuGet from the internet or the tools cache and adds it to the PATH. Use this step to change the version of NuGet used in the NuGet steps.
2018-01-10T19:46:36.3635300Z Version      : 0.1.5
2018-01-10T19:46:36.3635385Z Author       : Microsoft Corporation
2018-01-10T19:46:36.3635482Z Help         : [More Information](https://go.microsoft.com/fwlink/?linkid=852538)
2018-01-10T19:46:36.3635590Z ==============================================================================
2018-01-10T19:46:38.4983586Z Downloading: https://dist.nuget.org/win-x86-commandline/v4.3.0/nuget.exe
2018-01-10T19:46:38.9174057Z Caching tool: NuGet 4.3.0 x64
2018-01-10T19:46:39.5239777Z Using version: 4.3.0
2018-01-10T19:46:39.5242615Z Found tool in cache: NuGet 4.3.0 x64
2018-01-10T19:46:39.5243087Z Using tool path: D:\agents\pc\_work\_tool\NuGet\4.3.0\x64
2018-01-10T19:46:39.5246363Z Prepending PATH environment variable with directory: D:\agents\pc\_work\_tool\NuGet\4.3.0\x64
2018-01-10T19:46:39.5378912Z ##[section]Finishing: Use NuGet 4.3.0

Version spec 3.9 for architecture x64 did not match any version in Agent.ToolsDirectory.

I've been re-running failed jobs here to see when Python 3.9 gets added to Azure pipelines. This new version of Python was released two days ago, though I understand that it will take some time to add it to the pipeline. Any estimate on when that would happen?

Unless... are all of my vmImage settings too old? I'm using:

  • Windows: vmImage: "vs2017-win2016"
  • MacOS: vmImage: "macOS-10.14"
  • Linux: vmImage: "ubuntu-16.04"

Windows:

Versions in C:/hostedtoolcache/windows:
2.7.18 (x86)
3.5.4 (x86)
3.6.8 (x86)
3.7.9 (x86)
3.8.5 (x86)
2.7.18 (x64)
3.5.4 (x64)
3.6.8 (x64)
3.7.9 (x64)
3.8.5 (x64)

MacOS:

Versions in /Users/runner/hostedtoolcache:

2.7.18 (x64)
3.5.9 (x64)
3.6.12 (x64)
3.7.9 (x64)
3.8.5 (x64)

Linux:

Versions in /opt/hostedtoolcache:

2.7.18 (x64)
3.5.10 (x64)
3.6.12 (x64)
3.7.9 (x64)
3.8.6 (x64)

toolLib.downloadTool is not answerable mocked but toolLib.extractZip requires mocks

Environment

azure-pipelines-task-lib version: 4.9.0

Issue Description

We are trying to write tests with the TaskMockRunner. For the most part we don't need any commands mocked.
Our extension in tests using toolLib.downloadTool to download a zip file, and then toolLib.extractZip to extract to a designated directory.

Under the covers the unzip task calls exec, which when used with the TaskMockRunner expects it to be mocked with an answer.
We could do this normally for other commands, however toolLib.downloadTool downloads to a temp directory with a dynamic name, that cannot be staticly defined at test time:

let tmr: tmrm.TaskMockRunner = new tmrm.TaskMockRunner(taskPath);

let mock: ma.MockAnswers = new ma.MockAnswers();
// not gonna fly, path is dynamic
const answers = {
    "exec": {
        "/usr/bin/unzip .test/tmp/6bb7bc61-bf6c-4187-9cdd-8ddfd34d58a4": {
            "code": 0,
            "stdout": "mock unzip stdout here",
            "stderr": "mock unzip stderr here"
        }
    }
}
mock.initialize(answers)
tmr.setAnswers(answers)
tmr.run();

Under the covers unzip calls exec which expects to be mocked in test.

Expected behaviour

toolLib.extractZip can be used with TaskMockRunner without needing to specify a mock answer for the exec it makes.

Actual behaviour

tests that run from the TaskMockRunner cannot call toolLib.extractZip without providing exact mock answers.

Steps to reproduce

Logs

##[error]Version spec 3.7 for architecture x64 did not match any version in Agent.ToolsDirectory.

I followed this doc and configure my self-hosted Linux agent server, but still met this error. The log shows

##[debug]versionSpec=3.7
##[debug]addToPath=true
##[debug]architecture=x64
##[debug]Semantic version spec of 3.7 is 3.7
##[debug]isExplicit: null
##[debug]explicit? false
##[debug]Agent.Version=2.165.2
##[debug]Agent.ToolsDirectory=/home/vmasuser/myagent/_work/_tool
##[debug]isExplicit: 3.7.7
##[debug]explicit? true
##[debug]evaluating 0 versions
##[debug]match not found
##[debug]Agent.Version=2.165.2
##[debug]Agent.ToolsDirectory=/home/vmasuser/myagent/_work/_tool
##[debug]isExplicit: 3.7.7
##[debug]explicit? true
##[debug]Agent.Version=2.165.2
##[debug]Agent.ToolsDirectory=/home/vmasuser/myagent/_work/_tool
##[debug]isExplicit: 3.7.7
##[debug]explicit? true
##[debug]Agent.ToolsDirectory=/home/vmasuser/myagent/_work/_tool
##[debug]task result: Failed
##[error]Version spec 3.7 for architecture x64 did not match any version in Agent.ToolsDirectory.
Versions in /home/vmasuser/myagent/_work/_tool:

Thank you for any suggestion.

Exception "Aborted" when downloading tools from GitHub releases

Since the change introduced in #189 , I have been observing that downloading from GitHub releases directly produces an "Aborted" exception but the binary just seems to be fine... I'm using Node 16.x,

For example when downloading Azure Bicep it produces the following output:

Downloading: https://github.com/Azure/bicep/releases/download/v0.16.1/bicep-osx-x64
##[error]Aborted
##[warning]Content-Length (57479424 bytes) did not match downloaded file size (57435840 bytes).

With version 2.0.2 of this library the warning about Content-Length is not shown and the binary it's always fine...

Sample correct execution on version 2.0.2: https://raulejea.visualstudio.com/Bicep%20Tasks/_build/results?buildId=378&view=logs&j=295e7618-5d04-5731-f417-e49cf049e2b1&t=99b7bc6e-aa6b-56e3-8d64-dbce029ad954

Failing execution on version 2.0.4: https://raulejea.visualstudio.com/Bicep%20Tasks/_build/results?buildId=376&view=logs&j=295e7618-5d04-5731-f417-e49cf049e2b1&t=99b7bc6e-aa6b-56e3-8d64-dbce029ad954

The related extension: https://github.com/piraces/azure-devops-bicep-task

It's GitHub that it's currently aborting the request of could be another type of error?
Please let me know if you need more information about this behaviour.
Thanks!

downloadTool does not support redirects

Hello,

I'm currently using the tool lib to install tool dependencies for our custom build task. I'm currently struggling with the problem, that we would like to download the external tools directly from GitHub releases. As you probably know, the logical download URL gets redirected to a blob location.

If this is the case, the download function fails because the response is a 302 and not 200. I think this is a very common case that download links are often redirected and that the download function should support that.

Thanks for your feedback!

Marc

โš  Medium severity vuln found in [email protected], introduced via [email protected]

Tested 68 dependencies for known vulnerabilities, found 1 vulnerability, 1 vulnerable path.

? โœ— Medium severity vuln found in [email protected], introduced via [email protected]
    Description: Regular Expression Denial of Service (ReDoS)
    Info: https://snyk.io/vuln/SNYK-JS-PATHPARSE-1077067
    From: [email protected] > [email protected] > [email protected] > [email protected] > [email protected]
.0 > [email protected]

Extract .tar.bz2 and .tar.xz files

Hi!

the function extractTar only extract gzip tar files, the parameter "z" passed in tr.arg(['xzC', dest, '-f', file]); extract gzip but nor works for bzip and xz files.

findLocalTool semver support (not just maj, min, patch)

When I provide the version to search for in the cache as 'x' it fails to match with pre-release versions of nuget packages. These packages have folder names as follows: x.y.z-preview-date

The function used for matching the versionSpec ( semver.satisfies() ) only matches major, minor and patch version. If there is any text after the patch version then it treats it as a no match.

Right now our nuget package is only available as a pre-release version and the cache lookup always fails.

Please let me know if you plan on fixing this.

Thanks

Can't find PythonVersion on self hosted ubuntu image

Hi,
I've built an image using Packer, cloning and following the instructions from azure pipelines image generation. The build succedeed and then I deployed a VM with that. I then assigned the VM as a build agent, so far there's no problems, but when I run a UsePythonVersion task the tool doesn't find the installed versions.

Following overview, the env variable AGENT_TOOLSDIRECTORY should overwrite the default _work/tools path, but it seems that this is not happening.

In the VM I can run echo $AGENT_TOOLSDIRECTORY and the result is /opt/hostedtoolcache (as expected), but when I run the pipeline with debug info, the variable Agent.ToolsDirectory keeps reading .../_work/tools

##[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 Python versions at https://go.microsoft.com/fwlink/?linkid=871498.

I guess if there's some other configuration step required to make this work

v2.0.1 isn't working, missing transpiled js files

I just updated my extension to @2.0.1 from @2.0.0-preview and the extension is instantly broken.

Looks like the version published to npm is missing the compiled js files. It only installs ts files.

Archive extraction hangs, when destination folder is already present.

Would it make sense to add -aoa parameter to overwrite all destination files without asking ?

.arg('x') // eXtract files with full paths

I get something like, when trying to use the NodeToolV0 task:

Would you like to replace the existing file:
Path: .\node-v12.8.1-win-x64\node_modules\npm\node_modules\extsprintf.gitmodules
Size: 0 bytes
Modified: 2018-05-26 08:00:21
with the file from archive:
Path: node-v12.8.1-win-x64\node_modules\npm\node_modules\extsprintf.gitmodules
Size: 0 bytes
Modified: 2018-05-26 08:00:21

Moreover, the extraction ignores $(Agent.TempDirectory) variable and extracts to _t.agentID, which is outside of agent install directory.

vsts-task-tool-lib/tool sets resource path

I noticed that vsts-task-tool-lib/tool already set the resource path to lib.json
And because of current implementation, it is not possible for task to set the resource path. Now it is not possible to localize the strings. I have to hardcoded the error message other strings in tasks.

fix(downloadTool): drop abort to fix downloads

Hi! ๐Ÿ‘‹

Firstly, thanks for your work on this project! ๐Ÿ™‚

Today I used patch-package to patch [email protected] for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/azure-pipelines-tool-lib/tool.js b/node_modules/azure-pipelines-tool-lib/tool.js
index 48afe82..911bc89 100644
--- a/node_modules/azure-pipelines-tool-lib/tool.js
+++ b/node_modules/azure-pipelines-tool-lib/tool.js
@@ -234,11 +234,6 @@ function downloadTool(url, fileName, handlers, additionalHeaders) {
                             .on('error', (err) => {
                             file.end();
                             reject(err);
-                        })
-                            .on('aborted', () => {
-                            // this block is for Node10 compatibility since it doesn't emit 'error' event after 'aborted' one
-                            file.end();
-                            reject(new Error('Aborted'));
                         })
                             .pipe(file);
                     }

This issue body was partially generated by patch-package.

I was working on updating the dependency of my packerTool task and found out that for every test run the download would fail with the dreaded Aborted error. By patching your package it was consequently solved.

The event is also already deprecated for a while: https://nodejs.org/api/http.html#event-abort

Pretty sure it will fix these issues: microsoft/azure-pipelines-tasks#18280

Tool.ts steals resource path initilization

Hi,

This line from the task.ts file will steal the resource initialization.

tl.setResourcePath(path.join(__dirname, 'lib.json'));

This is how the resource file is initialized in the task lib:

export function _setResourcePath(path: string): void {
    if (process.env['TASKLIB_INPROC_UNITS']) {
        _resourceFile = null;
        _libResourceFileLoaded = false;
        _locStringCache = {};
        _resourceCulture = 'en-US';
    }

    if (!_resourceFile) {
        _checkPath(path, 'resource file path');
        _resourceFile = path;
        _debug('set resource file to: ' + _resourceFile);

        _resourceCulture = _getVariable('system.culture') || _resourceCulture;
        var locStrs = _loadLocStrings(_resourceFile, _resourceCulture);
        for (var key in locStrs) {
            //cache loc string
            _locStringCache[key] = locStrs[key];
        }

    }
    else {
        _warning(_loc('LIB_ResourceFileAlreadySet', _resourceFile));
    }
}

As you can see the resource path can be set only once and the tool is setting very early it before the task is invoked.

Checking tool cache not working

I'm setting up some self hosted agents and using the TerraformInstaller task, which uses this library. despite me populating the AGENT_TOOLSDIRECTORY terraform is always downloaded

Debug log:

2020-06-05T07:09:32.7192857Z ==============================================================================
2020-06-05T07:09:32.7193449Z Task         : Terraform tool installer
2020-06-05T07:09:32.7194040Z Description  : Find in cache or download a specific version of Terraform and prepend it to the PATH
2020-06-05T07:09:32.7194630Z Version      : 0.0.19
2020-06-05T07:09:32.7195034Z Author       : Microsoft Corporation
2020-06-05T07:09:32.7195704Z Help         : [Learn more about this task](https://aka.ms/AA5jd97)
2020-06-05T07:09:32.7196314Z ==============================================================================
2020-06-05T07:09:32.9684248Z ##[debug]agent.TempDirectory=C:\agent\_work\_temp
2020-06-05T07:09:32.9714273Z ##[debug]loading inputs and endpoints
2020-06-05T07:09:32.9724103Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2020-06-05T07:09:32.9737429Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2020-06-05T07:09:32.9741612Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2020-06-05T07:09:32.9744377Z ##[debug]loading INPUT_TERRAFORMVERSION
2020-06-05T07:09:32.9748909Z ##[debug]loading SECRET_SYSTEM_ACCESSTOKEN
2020-06-05T07:09:32.9753947Z ##[debug]loaded 5
2020-06-05T07:09:32.9770232Z ##[debug]Agent.ProxyUrl=undefined
2020-06-05T07:09:32.9774433Z ##[debug]Agent.CAInfo=undefined
2020-06-05T07:09:32.9775806Z ##[debug]Agent.ClientCert=undefined
2020-06-05T07:09:32.9776669Z ##[debug]Agent.SkipCertValidation=undefined
2020-06-05T07:09:33.0036631Z ##[debug]Agent.ProxyUrl=undefined
2020-06-05T07:09:33.0038400Z ##[debug]Agent.CAInfo=undefined
2020-06-05T07:09:33.0039453Z ##[debug]Agent.ClientCert=undefined
2020-06-05T07:09:33.0044450Z ##[debug]check path : C:\agent\_work\_tasks\TerraformInstaller_a4789e5d-f6e8-431f-add9-379d640a883c\0.0.19\node_modules\azure-pipelines-tool-lib\lib.json
2020-06-05T07:09:33.0047621Z ##[debug]adding resource file: C:\agent\_work\_tasks\TerraformInstaller_a4789e5d-f6e8-431f-add9-379d640a883c\0.0.19\node_modules\azure-pipelines-tool-lib\lib.json
2020-06-05T07:09:33.0049238Z ##[debug]system.culture=en-US
2020-06-05T07:09:33.0094687Z ##[debug]check path : C:\agent\_work\_tasks\TerraformInstaller_a4789e5d-f6e8-431f-add9-379d640a883c\0.0.19\task.json
2020-06-05T07:09:33.0099728Z ##[debug]adding resource file: C:\agent\_work\_tasks\TerraformInstaller_a4789e5d-f6e8-431f-add9-379d640a883c\0.0.19\task.json
2020-06-05T07:09:33.0101232Z ##[debug]system.culture=en-US
2020-06-05T07:09:33.0119539Z ##[debug]terraformVersion=0.12.21
2020-06-05T07:09:33.0124562Z ##[debug]cleaning: 0.12.21
2020-06-05T07:09:33.0129839Z ##[debug]isExplicit: 0.12.21
2020-06-05T07:09:33.0130857Z ##[debug]explicit? true
2020-06-05T07:09:33.0148095Z ##[debug]Agent.Version=2.169.1
2020-06-05T07:09:33.0149118Z ##[debug]Agent.ToolsDirectory=C:\tools_cache
2020-06-05T07:09:33.0150353Z ##[debug]checking cache: C:\tools_cache\terraform\0.12.21\x64
2020-06-05T07:09:33.0152345Z ##[debug]not found
2020-06-05T07:09:33.0165584Z ##[debug]terraform-0.12.21-9f742ba8-f699-4d04-8acd-a1cf689c73e0.zip
2020-06-05T07:09:33.0167025Z ##[debug]Agent.Version=2.169.1
2020-06-05T07:09:33.0167975Z ##[debug]Agent.TempDirectory=C:\agent\_work\_temp
2020-06-05T07:09:33.0171565Z ##[debug]testing directory 'C:\agent\_work\_temp'
2020-06-05T07:09:33.0215657Z Downloading: https://releases.hashicorp.com/terraform/0.12.21/terraform_0.12.21_windows_amd64.zip

However, the tool is definitely present in the cache as seen by running this script before

2020-06-05T07:09:32.1010389Z ##[debug]INPUT_SCRIPT: 'gci $env:AGENT_TOOLSDIRECTORY -Recurse'
2020-06-05T07:09:32.1010858Z Generating script.
2020-06-05T07:09:32.1011376Z ##[debug]AGENT_VERSION: '2.169.1'
2020-06-05T07:09:32.1011953Z ##[debug]AGENT_TEMPDIRECTORY: 'C:\agent\_work\_temp'
2020-06-05T07:09:32.1012611Z ##[debug]Asserting container path exists: 'C:\agent\_work\_temp'
2020-06-05T07:09:32.1013301Z ##[debug]Asserting leaf path exists: 'C:\Program Files\PowerShell\7\pwsh.exe'
2020-06-05T07:09:32.1013795Z ========================== Starting Command Output ===========================
2020-06-05T07:09:32.1014365Z ##[debug]Entering Invoke-VstsTool.
2020-06-05T07:09:32.1015215Z ##[debug] Arguments: '-NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'C:\agent\_work\_temp\57928533-3aa2-41b6-a47c-4db44406d943.ps1'"'
2020-06-05T07:09:32.1016223Z ##[debug] FileName: 'C:\Program Files\PowerShell\7\pwsh.exe'
2020-06-05T07:09:32.1017155Z ##[debug] WorkingDirectory: 'C:\agent\_work\1\s'
2020-06-05T07:09:32.1018133Z ##[command]"C:\Program Files\PowerShell\7\pwsh.exe" -NoLogo -NoProfile -NonInteractive -ExecutionPolicy Unrestricted -Command ". 'C:\agent\_work\_temp\57928533-3aa2-41b6-a47c-4db44406d943.ps1'"
2020-06-05T07:09:32.3721581Z 
2020-06-05T07:09:32.3723605Z 
2020-06-05T07:09:32.3726759Z     Directory: C:\tools_cache
2020-06-05T07:09:32.3729190Z 
2020-06-05T07:09:32.3731947Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.3734287Z ----                 -------------         ------ ----
2020-06-05T07:09:32.3738552Z d----            6/5/2020  6:35 AM                terraform
2020-06-05T07:09:32.3997529Z 
2020-06-05T07:09:32.3998806Z     Directory: C:\tools_cache\terraform
2020-06-05T07:09:32.3999337Z 
2020-06-05T07:09:32.3999901Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.4000652Z ----                 -------------         ------ ----
2020-06-05T07:09:32.4001500Z d----            6/5/2020  6:35 AM                0.12.0
2020-06-05T07:09:32.4002275Z d----            6/5/2020  6:35 AM                0.12.1
2020-06-05T07:09:32.4003010Z d----            6/5/2020  6:35 AM                0.12.10
2020-06-05T07:09:32.4003822Z d----            6/5/2020  6:35 AM                0.12.11
2020-06-05T07:09:32.4004970Z d----            6/5/2020  6:35 AM                0.12.12
2020-06-05T07:09:32.4005857Z d----            6/5/2020  6:35 AM                0.12.13
2020-06-05T07:09:32.4006655Z d----            6/5/2020  6:35 AM                0.12.14
2020-06-05T07:09:32.4007564Z d----            6/5/2020  6:35 AM                0.12.15
2020-06-05T07:09:32.4008326Z d----            6/5/2020  6:35 AM                0.12.16
2020-06-05T07:09:32.4172351Z d----            6/5/2020  6:35 AM                0.12.17
2020-06-05T07:09:32.4173463Z d----            6/5/2020  6:35 AM                0.12.18
2020-06-05T07:09:32.4174541Z d----            6/5/2020  6:35 AM                0.12.19
2020-06-05T07:09:32.4175275Z d----            6/5/2020  6:35 AM                0.12.2
2020-06-05T07:09:32.4176026Z d----            6/5/2020  6:35 AM                0.12.20
2020-06-05T07:09:32.4176740Z d----            6/5/2020  6:35 AM                0.12.21
2020-06-05T07:09:32.4177828Z d----            6/5/2020  6:35 AM                0.12.22
2020-06-05T07:09:32.4178668Z d----            6/5/2020  6:35 AM                0.12.23
2020-06-05T07:09:32.4179434Z d----            6/5/2020  6:35 AM                0.12.24
2020-06-05T07:09:32.4180297Z d----            6/5/2020  6:35 AM                0.12.25
2020-06-05T07:09:32.4181096Z d----            6/5/2020  6:35 AM                0.12.3
2020-06-05T07:09:32.4181896Z d----            6/5/2020  6:35 AM                0.12.4
2020-06-05T07:09:32.4182698Z d----            6/5/2020  6:35 AM                0.12.5
2020-06-05T07:09:32.4183523Z d----            6/5/2020  6:35 AM                0.12.6
2020-06-05T07:09:32.4184309Z d----            6/5/2020  6:35 AM                0.12.7
2020-06-05T07:09:32.4185074Z d----            6/5/2020  6:35 AM                0.12.8
2020-06-05T07:09:32.4185874Z d----            6/5/2020  6:35 AM                0.12.9
2020-06-05T07:09:32.4186751Z 
2020-06-05T07:09:32.4187389Z     Directory: C:\tools_cache\terraform\0.12.0
2020-06-05T07:09:32.4187966Z 
2020-06-05T07:09:32.4188554Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.4189314Z ----                 -------------         ------ ----
2020-06-05T07:09:32.4190043Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.4190623Z 
2020-06-05T07:09:32.4191227Z     Directory: C:\tools_cache\terraform\0.12.0\x64
2020-06-05T07:09:32.4191766Z 
2020-06-05T07:09:32.4192406Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.4193118Z ----                 -------------         ------ ----
2020-06-05T07:09:32.4194034Z -a---           5/22/2019  9:16 PM       45543936 terraform.exe
2020-06-05T07:09:32.4194552Z 
2020-06-05T07:09:32.4195103Z     Directory: C:\tools_cache\terraform\0.12.1
2020-06-05T07:09:32.4195622Z 
2020-06-05T07:09:32.4196177Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.4196877Z ----                 -------------         ------ ----
2020-06-05T07:09:32.4197592Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.4198114Z 
2020-06-05T07:09:32.4198680Z     Directory: C:\tools_cache\terraform\0.12.1\x64
2020-06-05T07:09:32.4199171Z 
2020-06-05T07:09:32.4199755Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.4200415Z ----                 -------------         ------ ----
2020-06-05T07:09:32.4202314Z -a---            6/4/2019  6:23 PM       45546496 terraform.exe
2020-06-05T07:09:32.4325686Z 
2020-06-05T07:09:32.4334324Z     Directory: C:\tools_cache\terraform\0.12.10
2020-06-05T07:09:32.4335237Z 
2020-06-05T07:09:32.4340156Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.4344592Z ----                 -------------         ------ ----
2020-06-05T07:09:32.4345889Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.4346487Z 
2020-06-05T07:09:32.4347122Z     Directory: C:\tools_cache\terraform\0.12.10\x64
2020-06-05T07:09:32.4347729Z 
2020-06-05T07:09:32.4348330Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.4349099Z ----                 -------------         ------ ----
2020-06-05T07:09:32.4349911Z -a---           10/7/2019  5:17 PM       50550784 terraform.exe
2020-06-05T07:09:32.4712710Z 
2020-06-05T07:09:32.4714977Z     Directory: C:\tools_cache\terraform\0.12.11
2020-06-05T07:09:32.4715970Z 
2020-06-05T07:09:32.4716842Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.4717704Z ----                 -------------         ------ ----
2020-06-05T07:09:32.4718612Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.4720241Z 
2020-06-05T07:09:32.4720998Z     Directory: C:\tools_cache\terraform\0.12.11\x64
2020-06-05T07:09:32.4721601Z 
2020-06-05T07:09:32.4722292Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.4723230Z ----                 -------------         ------ ----
2020-06-05T07:09:32.4724389Z -a---          10/17/2019  9:34 PM       51081728 terraform.exe
2020-06-05T07:09:32.4724993Z 
2020-06-05T07:09:32.4725631Z     Directory: C:\tools_cache\terraform\0.12.12
2020-06-05T07:09:32.4726215Z 
2020-06-05T07:09:32.4726832Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.4727652Z ----                 -------------         ------ ----
2020-06-05T07:09:32.4728465Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.4729040Z 
2020-06-05T07:09:32.4729694Z     Directory: C:\tools_cache\terraform\0.12.12\x64
2020-06-05T07:09:32.4730247Z 
2020-06-05T07:09:32.4730970Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.4731677Z ----                 -------------         ------ ----
2020-06-05T07:09:32.4732433Z -a---          10/18/2019  7:42 PM       51082240 terraform.exe
2020-06-05T07:09:32.4732978Z 
2020-06-05T07:09:32.4733567Z     Directory: C:\tools_cache\terraform\0.12.13
2020-06-05T07:09:32.4734133Z 
2020-06-05T07:09:32.4734724Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.4735573Z ----                 -------------         ------ ----
2020-06-05T07:09:32.4736332Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.4737023Z 
2020-06-05T07:09:32.4737770Z     Directory: C:\tools_cache\terraform\0.12.13\x64
2020-06-05T07:09:32.4738359Z 
2020-06-05T07:09:32.4739127Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.4739843Z ----                 -------------         ------ ----
2020-06-05T07:09:32.4740661Z -a---          10/31/2019  7:21 PM       50924544 terraform.exe
2020-06-05T07:09:32.4741161Z 
2020-06-05T07:09:32.4741829Z     Directory: C:\tools_cache\terraform\0.12.14
2020-06-05T07:09:32.4742354Z 
2020-06-05T07:09:32.4742853Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.4743445Z ----                 -------------         ------ ----
2020-06-05T07:09:32.4744044Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.4744485Z 
2020-06-05T07:09:32.4745094Z     Directory: C:\tools_cache\terraform\0.12.14\x64
2020-06-05T07:09:32.4745564Z 
2020-06-05T07:09:32.4746040Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.4746680Z ----                 -------------         ------ ----
2020-06-05T07:09:32.4747324Z -a---          11/13/2019 10:25 PM       50964992 terraform.exe
2020-06-05T07:09:32.4748234Z 
2020-06-05T07:09:32.4748766Z     Directory: C:\tools_cache\terraform\0.12.15
2020-06-05T07:09:32.4749214Z 
2020-06-05T07:09:32.4749736Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.4750342Z ----                 -------------         ------ ----
2020-06-05T07:09:32.4750998Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.4751446Z 
2020-06-05T07:09:32.4752042Z     Directory: C:\tools_cache\terraform\0.12.15\x64
2020-06-05T07:09:32.4752495Z 
2020-06-05T07:09:32.4753309Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.4754065Z ----                 -------------         ------ ----
2020-06-05T07:09:32.4754775Z -a---          11/14/2019 11:09 PM       50965504 terraform.exe
2020-06-05T07:09:32.4755371Z 
2020-06-05T07:09:32.4755900Z     Directory: C:\tools_cache\terraform\0.12.16
2020-06-05T07:09:32.4756394Z 
2020-06-05T07:09:32.4757039Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.4757776Z ----                 -------------         ------ ----
2020-06-05T07:09:32.4758446Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.4758944Z 
2020-06-05T07:09:32.4759684Z     Directory: C:\tools_cache\terraform\0.12.16\x64
2020-06-05T07:09:32.4760198Z 
2020-06-05T07:09:32.4760688Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.4761270Z ----                 -------------         ------ ----
2020-06-05T07:09:32.4761907Z -a---          11/18/2019 10:12 PM       50979840 terraform.exe
2020-06-05T07:09:32.4905707Z 
2020-06-05T07:09:32.4906833Z     Directory: C:\tools_cache\terraform\0.12.17
2020-06-05T07:09:32.4907466Z 
2020-06-05T07:09:32.4908000Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.4908759Z ----                 -------------         ------ ----
2020-06-05T07:09:32.4909646Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.4910184Z 
2020-06-05T07:09:32.4910654Z     Directory: C:\tools_cache\terraform\0.12.17\x64
2020-06-05T07:09:32.4911083Z 
2020-06-05T07:09:32.4911565Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.4912148Z ----                 -------------         ------ ----
2020-06-05T07:09:32.4912778Z -a---           12/2/2019  6:22 PM       51466240 terraform.exe
2020-06-05T07:09:32.4913224Z 
2020-06-05T07:09:32.4913696Z     Directory: C:\tools_cache\terraform\0.12.18
2020-06-05T07:09:32.4914106Z 
2020-06-05T07:09:32.4914554Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.4915175Z ----                 -------------         ------ ----
2020-06-05T07:09:32.4915754Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.4916190Z 
2020-06-05T07:09:32.4916650Z     Directory: C:\tools_cache\terraform\0.12.18\x64
2020-06-05T07:09:32.4917060Z 
2020-06-05T07:09:32.4917531Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.4918115Z ----                 -------------         ------ ----
2020-06-05T07:09:32.4918747Z -a---          12/11/2019  4:17 PM       51541504 terraform.exe
2020-06-05T07:09:32.5023952Z 
2020-06-05T07:09:32.5028094Z     Directory: C:\tools_cache\terraform\0.12.19
2020-06-05T07:09:32.5033791Z 
2020-06-05T07:09:32.5034487Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5035574Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5037788Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.5038591Z 
2020-06-05T07:09:32.5039443Z     Directory: C:\tools_cache\terraform\0.12.19\x64
2020-06-05T07:09:32.5040111Z 
2020-06-05T07:09:32.5040818Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5041725Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5042650Z -a---            1/8/2020 10:43 PM       51617280 terraform.exe
2020-06-05T07:09:32.5055407Z 
2020-06-05T07:09:32.5056643Z     Directory: C:\tools_cache\terraform\0.12.2
2020-06-05T07:09:32.5057727Z 
2020-06-05T07:09:32.5071510Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5075919Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5084873Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.5085281Z 
2020-06-05T07:09:32.5086079Z     Directory: C:\tools_cache\terraform\0.12.2\x64
2020-06-05T07:09:32.5086423Z 
2020-06-05T07:09:32.5087021Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5101542Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5102051Z -a---           6/12/2019  9:12 PM       49208832 terraform.exe
2020-06-05T07:09:32.5106950Z 
2020-06-05T07:09:32.5108149Z     Directory: C:\tools_cache\terraform\0.12.20
2020-06-05T07:09:32.5108842Z 
2020-06-05T07:09:32.5109216Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5109760Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5110738Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.5111101Z 
2020-06-05T07:09:32.5111467Z     Directory: C:\tools_cache\terraform\0.12.20\x64
2020-06-05T07:09:32.5111765Z 
2020-06-05T07:09:32.5112131Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5112607Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5113104Z -a---           1/22/2020  9:54 PM       50722304 terraform.exe
2020-06-05T07:09:32.5113463Z 
2020-06-05T07:09:32.5113806Z     Directory: C:\tools_cache\terraform\0.12.21
2020-06-05T07:09:32.5124687Z 
2020-06-05T07:09:32.5125685Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5126259Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5127278Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.5127678Z 
2020-06-05T07:09:32.5128520Z     Directory: C:\tools_cache\terraform\0.12.21\x64
2020-06-05T07:09:32.5129529Z 
2020-06-05T07:09:32.5130328Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5131228Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5131974Z -a---           2/19/2020  6:04 PM       51652096 terraform.exe
2020-06-05T07:09:32.5248656Z 
2020-06-05T07:09:32.5313199Z     Directory: C:\tools_cache\terraform\0.12.22
2020-06-05T07:09:32.5314845Z 
2020-06-05T07:09:32.5326444Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5338905Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5339694Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.5352791Z 
2020-06-05T07:09:32.5353975Z     Directory: C:\tools_cache\terraform\0.12.22\x64
2020-06-05T07:09:32.5354951Z 
2020-06-05T07:09:32.5360455Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5367981Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5368975Z -a---            3/5/2020  8:10 PM       51656192 terraform.exe
2020-06-05T07:09:32.5369340Z 
2020-06-05T07:09:32.5369660Z     Directory: C:\tools_cache\terraform\0.12.23
2020-06-05T07:09:32.5382680Z 
2020-06-05T07:09:32.5383698Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5395587Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5396129Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.5396515Z 
2020-06-05T07:09:32.5396850Z     Directory: C:\tools_cache\terraform\0.12.23\x64
2020-06-05T07:09:32.5397279Z 
2020-06-05T07:09:32.5397612Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5402645Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5403969Z -a---            3/5/2020  8:59 PM       51656192 terraform.exe
2020-06-05T07:09:32.5404310Z 
2020-06-05T07:09:32.5404692Z     Directory: C:\tools_cache\terraform\0.12.24
2020-06-05T07:09:32.5404974Z 
2020-06-05T07:09:32.5406912Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5407394Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5407831Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.5408224Z 
2020-06-05T07:09:32.5408618Z     Directory: C:\tools_cache\terraform\0.12.24\x64
2020-06-05T07:09:32.5408942Z 
2020-06-05T07:09:32.5409285Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5410503Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5411041Z -a---           3/19/2020  3:17 PM       51672904 terraform.exe
2020-06-05T07:09:32.5411421Z 
2020-06-05T07:09:32.5411882Z     Directory: C:\tools_cache\terraform\0.12.25
2020-06-05T07:09:32.5412176Z 
2020-06-05T07:09:32.5412529Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5412980Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5413485Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.5413808Z 
2020-06-05T07:09:32.5414155Z     Directory: C:\tools_cache\terraform\0.12.25\x64
2020-06-05T07:09:32.5414856Z 
2020-06-05T07:09:32.5415270Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5415734Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5416246Z -a---           5/13/2020  5:53 PM       52874568 terraform.exe
2020-06-05T07:09:32.5416552Z 
2020-06-05T07:09:32.5416858Z     Directory: C:\tools_cache\terraform\0.12.3
2020-06-05T07:09:32.5417171Z 
2020-06-05T07:09:32.5417505Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5418531Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5419620Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.5420044Z 
2020-06-05T07:09:32.5430154Z     Directory: C:\tools_cache\terraform\0.12.3\x64
2020-06-05T07:09:32.5430846Z 
2020-06-05T07:09:32.5431635Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5432209Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5441609Z -a---           6/24/2019  9:10 PM       49405952 terraform.exe
2020-06-05T07:09:32.5442070Z 
2020-06-05T07:09:32.5443111Z     Directory: C:\tools_cache\terraform\0.12.4
2020-06-05T07:09:32.5443819Z 
2020-06-05T07:09:32.5444697Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5445172Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5447087Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.5447576Z 
2020-06-05T07:09:32.5449255Z     Directory: C:\tools_cache\terraform\0.12.4\x64
2020-06-05T07:09:32.5449931Z 
2020-06-05T07:09:32.5450708Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5451605Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5452150Z -a---           7/11/2019  7:00 PM       49415168 terraform.exe
2020-06-05T07:09:32.5464222Z 
2020-06-05T07:09:32.5465084Z     Directory: C:\tools_cache\terraform\0.12.5
2020-06-05T07:09:32.5466037Z 
2020-06-05T07:09:32.5466954Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5467734Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5469648Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.5473291Z 
2020-06-05T07:09:32.5480149Z     Directory: C:\tools_cache\terraform\0.12.5\x64
2020-06-05T07:09:32.5492300Z 
2020-06-05T07:09:32.5492824Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5507201Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5508662Z -a---           7/18/2019  6:07 PM       49483264 terraform.exe
2020-06-05T07:09:32.5509456Z 
2020-06-05T07:09:32.5511537Z     Directory: C:\tools_cache\terraform\0.12.6
2020-06-05T07:09:32.5521329Z 
2020-06-05T07:09:32.5522171Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5522918Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5530885Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.5531546Z 
2020-06-05T07:09:32.5532315Z     Directory: C:\tools_cache\terraform\0.12.6\x64
2020-06-05T07:09:32.5532976Z 
2020-06-05T07:09:32.5534434Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5535313Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5535915Z -a---           7/31/2019  8:25 PM       49638400 terraform.exe
2020-06-05T07:09:32.5536292Z 
2020-06-05T07:09:32.5536846Z     Directory: C:\tools_cache\terraform\0.12.7
2020-06-05T07:09:32.5537185Z 
2020-06-05T07:09:32.5537529Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5538005Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5538486Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.5538787Z 
2020-06-05T07:09:32.5538996Z     Directory: C:\tools_cache\terraform\0.12.7\x64
2020-06-05T07:09:32.5539167Z 
2020-06-05T07:09:32.5539348Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5539631Z ----                 -------------         ------ ----
2020-06-05T07:09:32.5539912Z -a---           8/22/2019  9:00 PM       49229312 terraform.exe
2020-06-05T07:09:32.5634685Z 
2020-06-05T07:09:32.5643591Z     Directory: C:\tools_cache\terraform\0.12.8
2020-06-05T07:09:32.5643915Z 
2020-06-05T07:09:32.5644588Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.5657922Z ----                 -------------         ------ ----
2020-06-05T07:09:32.6050066Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.6112925Z 
2020-06-05T07:09:32.6115813Z     Directory: C:\tools_cache\terraform\0.12.8\x64
2020-06-05T07:09:32.6117107Z 
2020-06-05T07:09:32.6118139Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.6123902Z ----                 -------------         ------ ----
2020-06-05T07:09:32.6125248Z -a---            9/4/2019  7:20 PM       49440768 terraform.exe
2020-06-05T07:09:32.6533800Z 
2020-06-05T07:09:32.6536011Z     Directory: C:\tools_cache\terraform\0.12.9
2020-06-05T07:09:32.6537960Z 
2020-06-05T07:09:32.6540404Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.6542200Z ----                 -------------         ------ ----
2020-06-05T07:09:32.6544229Z d----            6/5/2020  6:35 AM                x64
2020-06-05T07:09:32.6545697Z 
2020-06-05T07:09:32.6548234Z     Directory: C:\tools_cache\terraform\0.12.9\x64
2020-06-05T07:09:32.6549958Z 
2020-06-05T07:09:32.6552354Z Mode                 LastWriteTime         Length Name
2020-06-05T07:09:32.6554138Z ----                 -------------         ------ ----
2020-06-05T07:09:32.6556695Z -a---           9/17/2019  8:21 PM       49644032 terraform.exe

It looks like this line is always returning false

if (tl.exist(cachePath) && tl.exist(`${cachePath}.complete`)) {

Next release?

Hello,

I would like to know when the next version will be published? In fact I saw that you fixed some security issues like shelljs.

Thanks for your help!

Tool caching assumes semantic versions for tools

When you download and cache a tool, it appears the cacheDir method requires the tool have a semantic version
and, if it doesn't, will end up failing with an error TypeError: Cannot read property 'trim' of null somewhere in there.

The equivalent GitHub Actions library handles this by allowing non-semantic-version versions.

Can we open up the tool lib to allow for semver.clean(version) || version or is there some underlying Azure DevOps reason this wouldn't work?

[PERF] Extract directly to cache location

This is probably a architectural choice to not accidentally corrupt the cache directory, but the additional copy step adds a significant amount of time to each build (especially on the hosted agents).

The process one should follow:

  • Download payload
  • Extract to temp location
  • Use Tool Lib to cache the bits
    • copies all contents from temp to the _tools folder on the agent.

This wastes about 34 seconds when using the UseNode task for example:

2020-04-23T08:41:16.3375719Z Caching tool: node 10.20.1 x64
2020-04-23T08:41:50.2986887Z Prepending PATH environment variable with directory: C:\hostedtoolcache\windows\node\10.20.1\x64

And on the Hosted agent it makes no sense at all, since the image is destroyed after the build completes. There is zero benefit, apart from consistency, in populating the _tools folder.

Options:

  1. Detect this is a throw-away image and skip the copy step, adding the path directly to the temp location.
  2. Extract directly into the _tools directory, possibly use marker files to signal success.

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.