From ffaba986c1dc3dd1e337c8ead735b75184af1bb3 Mon Sep 17 00:00:00 2001 From: Mikhail Goncharov Date: Wed, 17 Jun 2020 09:46:42 +0200 Subject: [PATCH] Deployment changes do not restart win docker as it makes it impossible to stop agent from buildkite UI for maintenance --- docs/playbooks.md | 5 +++-- kubernetes/buildkite/deployment.yaml | 2 +- scripts/windows_agent_start_buildkite.ps1 | 2 -- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/playbooks.md b/docs/playbooks.md index 2659cea..9beedb3 100644 --- a/docs/playbooks.md +++ b/docs/playbooks.md @@ -116,8 +116,8 @@ To spawn a new windows agent: 1. Login to the new machine via RDP (you will need a RDP client, e.g. Chrome app). 1. In the RDP session: run these commands in the CMD window under Administrator to bootstrap the Windows machine: ```powershell - Invoke-WebRequest -uri 'https://raw.githubusercontent.com/google/llvm-premerge-checks/master/scripts/windows_agent_bootstrap.ps1' -OutFile windows_agent_bootstrap.ps1 - ./windows_agent_bootstrap.ps1 + Invoke-WebRequest -uri 'https://raw.githubusercontent.com/google/llvm-premerge-checks/master/scripts/windows_agent_bootstrap.ps1' -OutFile c:\windows_agent_bootstrap.ps1 + c:/windows_agent_bootstrap.ps1 ``` Ignore the pop-up to format the new disk and wait for the machine to reboot. @@ -126,6 +126,7 @@ To spawn a new windows agent: 1. Create `c:\credentials` folder with file `buildkite-env.ps1`: ```powershell $Env:buildkiteAgentToken = "secret-token" + $Env:BUILDKITE_AGENT_NAME = "buildkite-windows-#" $Env:BUILDKITE_AGENT_TAGS = "queue=windows" $Env:CONDUIT_TOKEN = "conduit-api-token" ``` diff --git a/kubernetes/buildkite/deployment.yaml b/kubernetes/buildkite/deployment.yaml index b724ff8..950a860 100644 --- a/kubernetes/buildkite/deployment.yaml +++ b/kubernetes/buildkite/deployment.yaml @@ -18,7 +18,7 @@ metadata: name: premerge-debian namespace: buildkite spec: - replicas: 4 + replicas: 5 template: metadata: labels: diff --git a/scripts/windows_agent_start_buildkite.ps1 b/scripts/windows_agent_start_buildkite.ps1 index 3f58f0f..70361a8 100644 --- a/scripts/windows_agent_start_buildkite.ps1 +++ b/scripts/windows_agent_start_buildkite.ps1 @@ -38,14 +38,12 @@ if (${testing}) { -v ${workdir}:C:\ws ` -v C:\credentials:C:\credentials ` -e BUILDKITE_BUILD_PATH=C:\ws ` - --restart unless-stopped ` ${IMAGE} powershell } else { docker run -d ` -v ${workdir}:C:\ws ` -v C:\credentials:C:\credentials ` -e BUILDKITE_BUILD_PATH=C:\ws ` - --restart unless-stopped ` --name ${NAME} ` ${IMAGE} }