WIP Moving back towards using named runs.
* Rename artifactsRepo -> buildDataDir to be more explicit about the fact that it holds more than just the artifacts. * Revert removal of run ids. * Move Worker definition into core as part of making the core responsible for accepting run requests. * Make the core module more responsible for internal details of data structure and storage. External callers should not need to construct paths to artifacts, versions, etc. but should be able to call method in the core module to do this work for them. * The working directory no longer contains anything but the checked-out code. All StrawBoss-specific data is stored by StrawBoss elsewhere. * Add a regular maintenance cycle to the server module.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
import cliutils, docopt, os, sequtils, tempfile
|
||||
import cliutils, docopt, os, sequtils, tempfile, uuids
|
||||
|
||||
import strawbosspkg/configuration
|
||||
import strawbosspkg/core
|
||||
@ -30,6 +30,9 @@ Options
|
||||
|
||||
-r --reference <ref> Build the project at this commit reference.
|
||||
|
||||
-i --run-id <id> Use the given UUID as the run ID. If not given, a
|
||||
new UUID is generated for this run.
|
||||
|
||||
-w --workspace <workspace> Use the given directory as the build workspace.
|
||||
|
||||
"""
|
||||
@ -41,11 +44,11 @@ Options
|
||||
|
||||
var cfg = loadStrawBossConfig(cfgFile)
|
||||
cfg.pathToExe = paramStr(0)
|
||||
if not existsDir(cfg.artifactsRepo):
|
||||
echo "Artifacts repo (" & cfg.artifactsRepo & ") does not exist. Creating..."
|
||||
createDir(cfg.artifactsRepo)
|
||||
if not existsDir(cfg.buildDataDir):
|
||||
echo "Build data directory (" & cfg.buildDataDir & ") does not exist. Creating..."
|
||||
createDir(cfg.buildDataDir)
|
||||
|
||||
cfg.artifactsRepo = expandFilename(cfg.artifactsRepo)
|
||||
cfg.buildDataDir = expandFilename(cfg.buildDataDir)
|
||||
|
||||
|
||||
if args["run"]:
|
||||
@ -54,6 +57,7 @@ Options
|
||||
|
||||
try:
|
||||
let req = RunRequest(
|
||||
id: if args["--run-id"]: parseUUID($args["--run-id"]) else: genUUID(),
|
||||
projectName: $args["<project>"],
|
||||
stepName: $args["<step>"],
|
||||
buildRef: if args["--reference"]: $args["--reference"] else: nil,
|
||||
|
Reference in New Issue
Block a user