1
0
Fork 0

added testing option

this does not start the agent
This commit is contained in:
Christian Kühnel 2020-04-02 08:42:08 +02:00
parent 2f25035eb7
commit ace846991e

View file

@ -20,7 +20,8 @@
param(
[Parameter(Mandatory=$true)]
[ValidateSet("buildkite", "jenkins")]
[string]$master
[string]$master,
[switch]$testing = $false
)
$NAME="agent-windows-${master}"
@ -37,10 +38,20 @@ docker stop ${NAME}
docker rm ${NAME}
Write-Output "Starting container..."
docker run -d `
if (${testing}) {
docker run -it `
-v D:\:C:\ws `
-v C:\credentials:C:\credentials `
-e PARENT_HOSTNAME=$env:computername `
--restart unless-stopped `
--name ${NAME} `
${IMAGE}
${IMAGE} powershell
} else {
docker run -d `
-v D:\:C:\ws `
-v C:\credentials:C:\credentials `
-e PARENT_HOSTNAME=$env:computername `
--restart unless-stopped `
--name ${NAME} `
${IMAGE}
}