added testing option
this does not start the agent
This commit is contained in:
parent
2f25035eb7
commit
ace846991e
1 changed files with 14 additions and 3 deletions
|
@ -20,7 +20,8 @@
|
||||||
param(
|
param(
|
||||||
[Parameter(Mandatory=$true)]
|
[Parameter(Mandatory=$true)]
|
||||||
[ValidateSet("buildkite", "jenkins")]
|
[ValidateSet("buildkite", "jenkins")]
|
||||||
[string]$master
|
[string]$master,
|
||||||
|
[switch]$testing = $false
|
||||||
)
|
)
|
||||||
|
|
||||||
$NAME="agent-windows-${master}"
|
$NAME="agent-windows-${master}"
|
||||||
|
@ -37,6 +38,15 @@ docker stop ${NAME}
|
||||||
docker rm ${NAME}
|
docker rm ${NAME}
|
||||||
|
|
||||||
Write-Output "Starting container..."
|
Write-Output "Starting container..."
|
||||||
|
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} powershell
|
||||||
|
} else {
|
||||||
docker run -d `
|
docker run -d `
|
||||||
-v D:\:C:\ws `
|
-v D:\:C:\ws `
|
||||||
-v C:\credentials:C:\credentials `
|
-v C:\credentials:C:\credentials `
|
||||||
|
@ -44,3 +54,4 @@ docker run -d `
|
||||||
--restart unless-stopped `
|
--restart unless-stopped `
|
||||||
--name ${NAME} `
|
--name ${NAME} `
|
||||||
${IMAGE}
|
${IMAGE}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue