diff options
author | smile21prc <xiwe@microsoft.com> | 2017-08-23 01:10:53 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-23 01:10:53 +0300 |
commit | 70dc13edc883b2e7778b4c99d9ba7edabbedec26 (patch) | |
tree | c2578dd6295e7f9917f4d42aacc7e059c32bb472 | |
parent | ac12102849394460d50a09a0c3c113088ed483ef (diff) |
Replace "Initialize tools" to only download docker files (#23450)
* Replace "Initialize tools" to only download docker files
This way "Initialize tools" will be done later INSIDE docker, instead of
OUTSIDE. This fixes issue:
https://github.com/dotnet/core-eng/issues/1544
* Put docker files into dir "tools/dockerscripts" instead of root.
Put docker files into dir "tools/dockerscripts" instead of root.
-rw-r--r-- | buildpipeline/DotNet-CoreFx-Trusted-Linux.json | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/buildpipeline/DotNet-CoreFx-Trusted-Linux.json b/buildpipeline/DotNet-CoreFx-Trusted-Linux.json index 28d110b237..be87ba5db5 100644 --- a/buildpipeline/DotNet-CoreFx-Trusted-Linux.json +++ b/buildpipeline/DotNet-CoreFx-Trusted-Linux.json @@ -71,21 +71,26 @@ } }, { + "environment": {}, "enabled": true, "continueOnError": false, "alwaysRun": false, - "displayName": "Initialize tools", + "displayName": "Download docker files", "timeoutInMinutes": 0, + "condition": "succeeded()", + "refName": "Shell1", "task": { - "id": "d9bafed4-0b18-4f58-968d-86655b4d2ce9", + "id": "10f1f9a1-74b0-47ab-87bf-e3c9c68e8b0d", "versionSpec": "1.*", "definitionType": "task" }, "inputs": { - "filename": "$(PB_GitDirectory)/init-tools.sh", - "arguments": "", - "workingFolder": "$(PB_GitDirectory)", - "failOnStandardError": "false" + "type": "InlineScript", + "scriptPath": "", + "args": "", + "cwd": "", + "failOnStandardError": "false", + "script": "if [[ ! -d $(DockerFileDir) ]]; then\n mkdir -p $(DockerFileDir)\nfi\n\nif command -v curl > /dev/null; then\n curl --retry 10 -sSL -o $(DockerFileDir)/cleanup-docker.sh $(VsoDockerFileDirUrl)cleanup-docker.sh\n curl --retry 10 -sSL -o $(DockerFileDir)/init-docker.sh $(VsoDockerFileDirUrl)init-docker.sh\nelse\n wget $(VsoDockerFileDirUrl)cleanup-docker.sh -q -O $(DockerFileDir)/cleanup-docker.sh\n wget $(VsoDockerFileDirUrl)init-docker.sh -q -O $(DockerFileDir)/init-docker.sh\nfi" } }, { @@ -100,7 +105,7 @@ "definitionType": "task" }, "inputs": { - "filename": "$(Build.SourcesDirectory)/corefx/Tools/scripts/docker/init-docker.sh", + "filename": "$(DockerFileDir)/init-docker.sh", "arguments": "$(PB_DockerImageName)", "workingFolder": "", "failOnStandardError": "false" @@ -402,6 +407,12 @@ "PB_VsoRepositoryName": { "value": "DotNet-CoreFX-Trusted" }, + "DockerFileDir": { + "value": "tools/dockerscripts" + }, + "VsoDockerFileDirUrl": { + "value": "https://$(PB_VsoAccountName):$(VsoPassword)@devdiv.visualstudio.com/DevDiv/_git/DotNet-Buildtools-Trusted/src/Microsoft.DotNet.Build.Tasks/PackageFiles/scripts/docker/" + }, "SourceVersion": { "value": "HEAD", "allowOverride": true |