From ebdda6fdc6b0b3c19ddbfb1692842cdfedb27e03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=BChnel?= Date: Thu, 23 Jan 2020 10:33:56 +0100 Subject: [PATCH] updated start script --- scripts/windows_agent_start.ps1 | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/scripts/windows_agent_start.ps1 b/scripts/windows_agent_start.ps1 index bb98577..0045a80 100644 --- a/scripts/windows_agent_start.ps1 +++ b/scripts/windows_agent_start.ps1 @@ -12,9 +12,18 @@ # See the License for the specific language governing permissions and # limitations under the License. -$IMAGE="gcr.io/llvm-premerge-checks/agent-windows-jenkins" +# Pull and start the Docker container for a Windows agent. +# To setup a Windows agent see docs/playbooks.md -# check for new images on every start -docker pull $IMAGE:latest -docker run $IMAGE -docker run -v D:\:C:\ws -v C:\credentials:C:\credentials -e PARENT_HOSTNAME=$env:computername $IMAGE +$NAME="agent-windows-jenkins" +$IMAGE="gcr.io/llvm-premerge-checks/${NAME}" + +docker pull ${IMAGE}:latest +docker stop ${NAME} +docker run ` + -v D:\:C:\ws ` + -v C:\credentials:C:\credentials ` + -e PARENT_HOSTNAME=$env:computername ` + --restart unless-stopped ` + --name ${NAME} ` + ${IMAGE} \ No newline at end of file