Skip to content

Commit 1b24dd9

Browse files
brandonautDanny McCormick
authored andcommitted
Fix tool cache location (#62) (#63)
1 parent b8b18ab commit 1b24dd9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/overview.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The tool installers will leverage existing distribution mechanisms such as zips
1717

1818
Installers will just be another type of task. The task library UI will have another tab as a sibling of build, test, deploy, and utilities.
1919

20-
An installer task will:
20+
An installer task will:
2121

2222
- Advertise common or well known versions of a tool (LTS or common) via a combo dropdown
2323
- Find that version in a tools cache or acquires it on demand
@@ -26,7 +26,7 @@ An installer task will:
2626

2727
## Tool Cache
2828

29-
The tool cache will be located under `_work/tools` but there's an environment variable `AGENT_TOOLSDIRECTORY` to override the location. This is useful for scenarios such as our hosted image or offline agents which want to build a tools cache and direct the agent to use it: see
29+
The tool cache will be located under `_work/_tool` but there's an environment variable `AGENT_TOOLSDIRECTORY` to override the location. This is useful for scenarios such as our hosted image or offline agents which want to build a tools cache and direct the agent to use it.
3030

3131
The cache will be keyed by name, version, and optionally platform (x86, x64).
3232

@@ -55,7 +55,7 @@ The downloader should also be robust to virus scanners.
5555

5656
## Setting up the environment
5757

58-
The tools folder will be pre-pended to the path. This sets up the environment so subsequent tasks and scripts use the tool version specified. For example, if npm 3.0 is chosen, it doesn't matter if subsequent execution is via the npm task, a cmd line task or a script. It will be used. This also keeps the tasks simple - use the tool in the path regardless if that's a result of a pre-requisite being installed or an installer task acquiring the tool.
58+
The tools folder will be pre-pended to the path. This sets up the environment so subsequent tasks and scripts use the tool version specified. For example, if npm 3.0 is chosen, it doesn't matter if subsequent execution is via the npm task, a cmd line task or a script. It will be used. This also keeps the tasks simple - use the tool in the path regardless if that's a result of a pre-requisite being installed or an installer task acquiring the tool.
5959

6060
The binary folder which will be used may not be directly under the root of the binaries. As as example, node is in the bin folder and expects the libs to be in a sibling lib folder. We should not manipulate the layout of the toolset. The installer has first hand knowledge of that layout (might even vary by version) and knows what folder to prepend to the path (next section).
6161

@@ -74,7 +74,7 @@ Chocolatey task:
7474
demands: [
7575
"chocolatey"
7676
]
77-
```
77+
```
7878

7979
Chocolatey tool installer task:
8080
```JSON
@@ -100,7 +100,7 @@ Being able to multiply the builds using a set of runtime versions is useful for
100100

101101
To achieve this, add a tool installer task and for the version, reference a variable. E.g. $(node.version). In the node.version variable, specific a list of the versions and check the matrix build option on the build definitions option tab.
102102

103-
## Safe Tool Execution under Multiple Agents
103+
## Safe Tool Execution under Multiple Agents
104104

105105
Some tools have caches of there own which when used by multiple agents on the same machine can lead to concurrency issues and failures. Examples are nuget and npm which have cache locations which can be overriden by environment variables. Since the tool installer has the first class knowledge of the tool, it can set the cache location.
106106

0 commit comments

Comments
 (0)