From 3df22004add216eff51db2a606e605e2e875e940 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Wed, 4 Oct 2023 23:16:48 +0000 Subject: [PATCH] Add docker host required init script to gradle check windows runner Signed-off-by: Peter Zhu --- lib/compute/agent-nodes.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/compute/agent-nodes.ts b/lib/compute/agent-nodes.ts index b8f168bc..9d69db08 100644 --- a/lib/compute/agent-nodes.ts +++ b/lib/compute/agent-nodes.ts @@ -226,7 +226,11 @@ export class AgentNodes { minimumNumberOfSpareInstances: 1, numExecutors: 1, amiId: 'ami-0a00aabd70b0757f9', - initScript: 'echo', + initScript: 'echo %USERNAME% && dockerd --register-service && net start docker && echo started docker deamon && docker ps && ' + + 'echo initializing docker images now waiting for 5min && git clone https://github.com/opensearch-project/opensearch-build.git && ' + + 'bash.exe -c "docker run --rm -it --name docker-windows-test -d `opensearch-build/docker/ci/get-ci-images.sh ' + + '-p windows2019-servercore -u opensearch -t build | head -1` bash.exe && sleep 5" && docker exec docker-windows-test whoami && ' + + 'docker ps && docker stop docker-windows-test && docker ps && rm -rf opensearch-build', remoteFs: 'C:/Users/Administrator/jenkins', }; this.AL2_X64_DEFAULT_AGENT = {