Skip to content

Commit

Permalink
review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
npalm committed Dec 13, 2021
1 parent 3d86918 commit a36b991
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ describe('scaleUp with public GH', () => {
it('creates a ephemeral runner.', async () => {
process.env.ENABLE_EPHEMERAL_RUNNERS = 'true';
await scaleUpModule.scaleUp('aws:sqs', TEST_DATA);
expectedRunnerParams.runnerServiceConfig = expectedRunnerParams.runnerServiceConfig + ` --ephemeral`;
expectedRunnerParams.runnerServiceConfig = expectedRunnerParams.runnerServiceConfig + ` --ephemeral`;
expect(createRunner).toBeCalledWith(expectedRunnerParams, LAUNCH_TEMPLATE);
});

Expand Down
10 changes: 5 additions & 5 deletions modules/runners/lambdas/runners/src/scale-runners/scale-up.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,16 @@ export async function scaleUp(eventSource: string, payload: ActionRequestMessage
});
const token = registrationToken.data.token;

const labelsArgument = runnerExtraLabels !== undefined ? `--labels ${runnerExtraLabels}` : '';
const runnerGroupArgument = runnerGroup !== undefined ? `--runnergroup ${runnerGroup}` : '';
const labelsArgument = runnerExtraLabels !== undefined ? `--labels ${runnerExtraLabels} ` : '';
const runnerGroupArgument = runnerGroup !== undefined ? `--runnergroup ${runnerGroup} ` : '';
const configBaseUrl = ghesBaseUrl ? ghesBaseUrl : 'https://github.com';
const ephemeralArgument = ephemeral ? '--ephemeral' : '';
const runnerArgs = `--token ${token} ${labelsArgument} ${ephemeralArgument}`.trim();
const ephemeralArgument = ephemeral ? '--ephemeral ' : '';
const runnerArgs = `--token ${token} ${labelsArgument}${ephemeralArgument}`;

await createRunnerLoop({
environment,
runnerServiceConfig: enableOrgLevel
? `--url ${configBaseUrl}/${payload.repositoryOwner} ${runnerArgs} ${runnerGroupArgument}`.trim()
? `--url ${configBaseUrl}/${payload.repositoryOwner} ${runnerArgs}${runnerGroupArgument}`.trim()
: `--url ${configBaseUrl}/${payload.repositoryOwner}/${payload.repositoryName} ${runnerArgs}`.trim(),
runnerOwner,
runnerType,
Expand Down

0 comments on commit a36b991

Please sign in to comment.