File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -94,12 +94,6 @@ disconnect-after-job=${Env:BUILDKITE_TERMINATE_INSTANCE_AFTER_JOB}
94
94
"@
95
95
$OFS = " "
96
96
97
- If (! [string ]::IsNullOrEmpty($Env: BUILDKITE_ELASTIC_BOOTSTRAP_SCRIPT )) {
98
- C:\buildkite- agent\bin\bk- fetch.ps1 - From " $Env: BUILDKITE_ELASTIC_BOOTSTRAP_SCRIPT " - To C:\buildkite- agent\elastic_bootstrap.ps1
99
- C:\buildkite- agent\elastic_bootstrap.ps1
100
- Remove-Item - Path C:\buildkite- agent\elastic_bootstrap.ps1
101
- }
102
-
103
97
nssm set lifecycled AppEnvironmentExtra :AWS_REGION= $Env: AWS_REGION
104
98
nssm set lifecycled AppEnvironmentExtra + LIFECYCLED_HANDLER= " C:\buildkite-agent\bin\stop-agent-gracefully.ps1"
105
99
Restart-Service lifecycled
@@ -133,6 +127,15 @@ If ($Env:BUILDKITE_WINDOWS_ADMINISTRATOR -eq "true") {
133
127
Add-LocalGroupMember - Group " Administrators" - Member $UserName | out-null
134
128
}
135
129
130
+ If (! [string ]::IsNullOrEmpty($Env: BUILDKITE_ELASTIC_BOOTSTRAP_SCRIPT )) {
131
+ Write-Output " Running the elastic bootstrap script"
132
+ C:\buildkite- agent\bin\bk- fetch.ps1 - From " $Env: BUILDKITE_ELASTIC_BOOTSTRAP_SCRIPT " - To C:\buildkite- agent\elastic_bootstrap.ps1
133
+ C:\buildkite- agent\elastic_bootstrap.ps1
134
+ Remove-Item - Path C:\buildkite- agent\elastic_bootstrap.ps1
135
+ }
136
+
137
+ Write-Output " Starting the Buildkite Agent"
138
+
136
139
nssm install buildkite- agent C:\buildkite- agent\bin\buildkite-agent.exe start
137
140
nssm set buildkite- agent ObjectName .\$UserName $Password
138
141
nssm set buildkite- agent AppStdout C:\buildkite- agent\buildkite- agent.log
You can’t perform that action at this time.
0 commit comments