Expirementing with building strawboss in a docker container.

This commit is contained in:
Jonathan Bernard 2017-11-30 17:02:22 -06:00
parent a4e6a4cb81
commit 741124b734
2 changed files with 10 additions and 6 deletions

View File

@ -228,7 +228,7 @@ proc setupProject(wksp: Workspace) =
wksp.sendMsg(lvlDebug, "Setting up project.")
# Clone the project into the $temp directory
let cloneArgs = ["clone", wksp.projectDef.repo, wksp.dir]
let cloneArgs = @["clone", wksp.projectDef.repo, wksp.dir]
wksp.sendMsg(lvlDebug, "git " & $cloneArgs)
let cloneResult = exec("git", ".", cloneArgs, wksp.env, {poUsePath},
@ -238,7 +238,7 @@ proc setupProject(wksp: Workspace) =
raiseEx "unable to clone repo for '" & wksp.projectDef.name & "'"
# Checkout the requested ref
let checkoutArgs = ["checkout", wksp.buildRef]
let checkoutArgs = @["checkout", wksp.buildRef]
wksp.sendMsg(lvlDebug, "git " & $checkoutArgs)
let checkoutResult = exec("git", wksp.dir, checkoutArgs,

View File

@ -3,27 +3,31 @@
"steps": {
"compile": {
"artifacts": ["strawboss"],
"stepCmd": "nimble build"
"stepCmd": "docker run -v `pwd`:/usr/src/strawboss -w /usr/src/strawboss jdbernard/nim:0.17.2 nimble build"
},
"unittest": {
"depends": ["compile"],
"stepCmd": "docker run -v `pwd`:/usr/src/strawboss -v $compile_DIR:/usr/build/strawboss -w /usr/src/strawboss -i jdbernard/nim:0.17.2 /bin/bash",
"cmdInput": [
"cp $build_DIR/strawboss .",
"cp /usr/build/strawboss/strawboss .",
"nim c -r src/test/nim/run_unit_tests"
]
},
"functest": {
"depends": ["compile"],
"stepCmd": "docker run -v `pwd`:/usr/src/strawboss -v $compile_DIR:/usr/build/strawboss -w /usr/src/strawboss -i jdbernard/nim:0.17.2 /bin/bash",
"cmdInput": [
"cp $build_DIR/strawboss .",
"cp /usr/build/strawboss/strawboss .",
"nim c -r src/test/nim/run_functional_tests"
]
},
"build": {
"artifacts": ["strawboss-$VERSION.zip"],
"depends": ["compile", "unittest", "functest"],
"stepCmd": "docker run -v `pwd`:/usr/src/strawboss -v $compile_DIR:/usr/build/strawboss -w /usr/src/strawboss -i jdbernard/nim:0.17.2 /bin/bash",
"cmdInput": [
"zip strawboss-$VERSION.zip $compile_DIR/strawboss \",
"cp /usr/build/strawboss/strawboss .",
"zip strawboss-$VERSION.zip strawboss \ ",
" strawboss.config.json example.json \ ",
" src/main/systemd/strawboss.service"
]