refactor around job claim name and runner instance labels (#20)

* refactor around job claim name, and runner instance labels

* repaired failing test
This commit is contained in:
Nikola Jokic
2022-06-22 06:32:50 -07:00
committed by GitHub
parent 4307828719
commit 20c19dae27
4 changed files with 26 additions and 21 deletions

View File

@@ -44,9 +44,9 @@ const STEP_POD_NAME_SUFFIX_LENGTH = 8
export const JOB_CONTAINER_NAME = 'job'
export class RunnerInstanceLabel {
runnerhook: string
private podName: string
constructor() {
this.runnerhook = process.env.ACTIONS_RUNNER_POD_NAME as string
this.podName = getRunnerPodName()
}
get key(): string {
@@ -54,10 +54,10 @@ export class RunnerInstanceLabel {
}
get value(): string {
return this.runnerhook
return this.podName
}
toString(): string {
return `runner-pod=${this.runnerhook}`
return `runner-pod=${this.podName}`
}
}