Skip to content

Commit b4f8851

Browse files
authored
fix: Windows Fargate/ECS stopped working due to runner groups (#634)
This issue was never present in a release. It was caused by #630.
1 parent 956536f commit b4f8851

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/providers/fargate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ export function ecsRunCommand(os: Os, dind: boolean): string[] {
236236
'powershell', '-Command',
237237
`cd \\actions ;
238238
if ($Env:RUNNER_VERSION -eq "latest") { $RunnerFlags = "" } else { $RunnerFlags = "--disableupdate" } ;
239-
./config.cmd --unattended --url "\${Env:REGISTRATION_URL}" --token "\${Env:RUNNER_TOKEN}" --ephemeral --work _work --labels "\${Env:RUNNER_LABEL},cdkghr:started:\$(Get-Date -UFormat +%s)" $RunnerFlags --name "\${Env:RUNNER_NAME} \${Env:RUNNER_GROUP}" ;
239+
./config.cmd --unattended --url "\${Env:REGISTRATION_URL}" --token "\${Env:RUNNER_TOKEN}" --ephemeral --work _work --labels "\${Env:RUNNER_LABEL},cdkghr:started:\$(Get-Date -UFormat +%s)" $RunnerFlags --name "\${Env:RUNNER_NAME}" \${Env:RUNNER_GROUP} ;
240240
./run.cmd ;
241241
$STATUS = Select-String -Path './_diag/*.log' -Pattern 'finish job request for job [0-9a-f\\-]+ with result: (.*)' | %{$_.Matches.Groups[1].Value} | Select-Object -Last 1 ;
242242
if ($STATUS) { echo "CDKGHA JOB DONE $\{Env:RUNNER_LABEL\} $STATUS" }`,

test/default.integ.snapshot/github-runners-test.assets.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,15 +209,15 @@
209209
}
210210
}
211211
},
212-
"0eece65ce89e8b0a0eff19463f60aa3274e2f723c1409b9b782331f68c42015d": {
212+
"8bb62aeee5548222e3e98319bc0e7cfe845151944b237f23c932704ac173f858": {
213213
"source": {
214214
"path": "github-runners-test.template.json",
215215
"packaging": "file"
216216
},
217217
"destinations": {
218218
"current_account-current_region": {
219219
"bucketName": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}",
220-
"objectKey": "0eece65ce89e8b0a0eff19463f60aa3274e2f723c1409b9b782331f68c42015d.json",
220+
"objectKey": "8bb62aeee5548222e3e98319bc0e7cfe845151944b237f23c932704ac173f858.json",
221221
"assumeRoleArn": "arn:${AWS::Partition}:iam::${AWS::AccountId}:role/cdk-hnb659fds-file-publishing-role-${AWS::AccountId}-${AWS::Region}"
222222
}
223223
}

test/default.integ.snapshot/github-runners-test.template.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11459,7 +11459,7 @@
1145911459
"Command": [
1146011460
"powershell",
1146111461
"-Command",
11462-
"cd \\actions ;\n if ($Env:RUNNER_VERSION -eq \"latest\") { $RunnerFlags = \"\" } else { $RunnerFlags = \"--disableupdate\" } ;\n ./config.cmd --unattended --url \"${Env:REGISTRATION_URL}\" --token \"${Env:RUNNER_TOKEN}\" --ephemeral --work _work --labels \"${Env:RUNNER_LABEL},cdkghr:started:$(Get-Date -UFormat +%s)\" $RunnerFlags --name \"${Env:RUNNER_NAME} ${Env:RUNNER_GROUP}\" ;\n ./run.cmd ;\n $STATUS = Select-String -Path './_diag/*.log' -Pattern 'finish job request for job [0-9a-f\\-]+ with result: (.*)' | %{$_.Matches.Groups[1].Value} | Select-Object -Last 1 ;\n if ($STATUS) { echo \"CDKGHA JOB DONE ${Env:RUNNER_LABEL} $STATUS\" }"
11462+
"cd \\actions ;\n if ($Env:RUNNER_VERSION -eq \"latest\") { $RunnerFlags = \"\" } else { $RunnerFlags = \"--disableupdate\" } ;\n ./config.cmd --unattended --url \"${Env:REGISTRATION_URL}\" --token \"${Env:RUNNER_TOKEN}\" --ephemeral --work _work --labels \"${Env:RUNNER_LABEL},cdkghr:started:$(Get-Date -UFormat +%s)\" $RunnerFlags --name \"${Env:RUNNER_NAME}\" ${Env:RUNNER_GROUP} ;\n ./run.cmd ;\n $STATUS = Select-String -Path './_diag/*.log' -Pattern 'finish job request for job [0-9a-f\\-]+ with result: (.*)' | %{$_.Matches.Groups[1].Value} | Select-Object -Last 1 ;\n if ($STATUS) { echo \"CDKGHA JOB DONE ${Env:RUNNER_LABEL} $STATUS\" }"
1146311463
],
1146411464
"Cpu": 1024,
1146511465
"Essential": true,
@@ -13625,7 +13625,7 @@
1362513625
"Command": [
1362613626
"powershell",
1362713627
"-Command",
13628-
"cd \\actions ;\n if ($Env:RUNNER_VERSION -eq \"latest\") { $RunnerFlags = \"\" } else { $RunnerFlags = \"--disableupdate\" } ;\n ./config.cmd --unattended --url \"${Env:REGISTRATION_URL}\" --token \"${Env:RUNNER_TOKEN}\" --ephemeral --work _work --labels \"${Env:RUNNER_LABEL},cdkghr:started:$(Get-Date -UFormat +%s)\" $RunnerFlags --name \"${Env:RUNNER_NAME} ${Env:RUNNER_GROUP}\" ;\n ./run.cmd ;\n $STATUS = Select-String -Path './_diag/*.log' -Pattern 'finish job request for job [0-9a-f\\-]+ with result: (.*)' | %{$_.Matches.Groups[1].Value} | Select-Object -Last 1 ;\n if ($STATUS) { echo \"CDKGHA JOB DONE ${Env:RUNNER_LABEL} $STATUS\" }"
13628+
"cd \\actions ;\n if ($Env:RUNNER_VERSION -eq \"latest\") { $RunnerFlags = \"\" } else { $RunnerFlags = \"--disableupdate\" } ;\n ./config.cmd --unattended --url \"${Env:REGISTRATION_URL}\" --token \"${Env:RUNNER_TOKEN}\" --ephemeral --work _work --labels \"${Env:RUNNER_LABEL},cdkghr:started:$(Get-Date -UFormat +%s)\" $RunnerFlags --name \"${Env:RUNNER_NAME}\" ${Env:RUNNER_GROUP} ;\n ./run.cmd ;\n $STATUS = Select-String -Path './_diag/*.log' -Pattern 'finish job request for job [0-9a-f\\-]+ with result: (.*)' | %{$_.Matches.Groups[1].Value} | Select-Object -Last 1 ;\n if ($STATUS) { echo \"CDKGHA JOB DONE ${Env:RUNNER_LABEL} $STATUS\" }"
1362913629
],
1363013630
"Essential": true,
1363113631
"Image": {

0 commit comments

Comments
 (0)