Remove the concept of named, identifiable runs.
StarBoss is meant for building things checked into the repo It is also designed around repeatable builds. So it makes the assumption that running a build step for a specific version of a project will always result in the same output. So runs are identified by the project, build step, and version.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import cliutils, logging, json, os, nre, sequtils, strtabs, tables, times, uuids
|
||||
import cliutils, logging, json, os, nre, sequtils, strtabs, tables, times
|
||||
|
||||
from langutils import sameContents
|
||||
from typeinfo import toAny
|
||||
@ -24,7 +24,6 @@ type
|
||||
envVars*: StringTableRef
|
||||
|
||||
RunRequest* = object
|
||||
id*: UUID
|
||||
projectName*, stepName*, buildRef*, workspaceDir*: string
|
||||
forceRebuild*: bool
|
||||
|
||||
@ -69,7 +68,6 @@ proc `==`*(a, b: StrawBossConfig): bool =
|
||||
|
||||
proc `==`*(a, b: RunRequest): bool =
|
||||
result =
|
||||
a.id == b.id and
|
||||
a.projectName == b.projectName and
|
||||
a.stepName == b.stepName and
|
||||
a.buildRef == b.buildRef and
|
||||
@ -197,7 +195,6 @@ proc loadBuildStatus*(statusFile: string): BuildStatus =
|
||||
|
||||
proc parseRunRequest*(reqJson: JsonNode): RunRequest =
|
||||
result = RunRequest(
|
||||
id: parseUUID(reqJson.getOrFail("id", "RunRequest").getStr),
|
||||
projectName: reqJson.getOrFail("projectName", "RunRequest").getStr,
|
||||
stepName: reqJson.getOrFail("stepName", "RunRequest").getStr,
|
||||
buildRef: reqJson.getOrFail("buildRef", "RunRequest").getStr,
|
||||
@ -223,7 +220,6 @@ proc `%`*(p: ProjectDef): JsonNode =
|
||||
|
||||
proc `%`*(req: RunRequest): JsonNode =
|
||||
result = %* {
|
||||
"id": $req.id,
|
||||
"projectName": req.projectName,
|
||||
"stepName": req.stepName,
|
||||
"buildRef": req.buildRef,
|
||||
|
Reference in New Issue
Block a user