Last active
October 20, 2017 17:56
-
-
Save cwoolum/be33b2fb6115e6f50b3d4a5f7014ccca to your computer and use it in GitHub Desktop.
Using this you can create a brand new build agent for VSTS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Write-Output "Running config with subdomain $Env:VSTS_SUBDOMAIN and token $Env:VSTS_PATTOKEN" | |
./config.cmd --unattended --url "https://$Env:VSTS_SUBDOMAIN.visualstudio.com" --auth PAT --token $Env:VSTS_PATTOKEN --pool default | |
./run.cmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM stefanscherer/node-windows:6.11 | |
ENV VSTS_AGENT_VERSION 2.123.0 | |
RUN powershell -Command \ | |
Invoke-WebRequest $('https://github.com/Microsoft/vsts-agent/releases/download/v2.123.0/vsts-agent-win7-x64-2.123.0.zip') -OutFile 'vsts-agent.zip' -UseBasicParsing;\ | |
Expand-Archive -path 'vsts-agent.zip' -destinationpath '.\agent' | |
ADD BootstrapAgent.ps1 /agent | |
WORKDIR /agent | |
ENTRYPOINT ["powershell" ,"./BootstrapAgent.ps1 -SubDomain $VSTS_SUBDOMAIN -Token $VSTS_PATTOKEN"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment