Expirementing with building strawboss in a docker container.
This commit is contained in:
		@@ -228,7 +228,7 @@ proc setupProject(wksp: Workspace) =
 | 
				
			|||||||
  wksp.sendMsg(lvlDebug, "Setting up project.")
 | 
					  wksp.sendMsg(lvlDebug, "Setting up project.")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Clone the project into the $temp directory
 | 
					  # 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)
 | 
					  wksp.sendMsg(lvlDebug, "git " & $cloneArgs)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  let cloneResult = exec("git", ".", cloneArgs, wksp.env, {poUsePath},
 | 
					  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 & "'"
 | 
					    raiseEx "unable to clone repo for '" & wksp.projectDef.name & "'"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Checkout the requested ref
 | 
					  # Checkout the requested ref
 | 
				
			||||||
  let checkoutArgs = ["checkout", wksp.buildRef]
 | 
					  let checkoutArgs = @["checkout", wksp.buildRef]
 | 
				
			||||||
  wksp.sendMsg(lvlDebug, "git " & $checkoutArgs)
 | 
					  wksp.sendMsg(lvlDebug, "git " & $checkoutArgs)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  let checkoutResult = exec("git", wksp.dir, checkoutArgs,
 | 
					  let checkoutResult = exec("git", wksp.dir, checkoutArgs,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,27 +3,31 @@
 | 
				
			|||||||
  "steps": {
 | 
					  "steps": {
 | 
				
			||||||
    "compile": {
 | 
					    "compile": {
 | 
				
			||||||
      "artifacts": ["strawboss"],
 | 
					      "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": {
 | 
					    "unittest": {
 | 
				
			||||||
      "depends": ["compile"],
 | 
					      "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": [
 | 
					      "cmdInput": [
 | 
				
			||||||
        "cp $build_DIR/strawboss .",
 | 
					        "cp /usr/build/strawboss/strawboss .",
 | 
				
			||||||
        "nim c -r src/test/nim/run_unit_tests"
 | 
					        "nim c -r src/test/nim/run_unit_tests"
 | 
				
			||||||
      ]
 | 
					      ]
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "functest": {
 | 
					    "functest": {
 | 
				
			||||||
      "depends": ["compile"],
 | 
					      "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": [
 | 
					      "cmdInput": [
 | 
				
			||||||
        "cp $build_DIR/strawboss .",
 | 
					        "cp /usr/build/strawboss/strawboss .",
 | 
				
			||||||
        "nim c -r src/test/nim/run_functional_tests"
 | 
					        "nim c -r src/test/nim/run_functional_tests"
 | 
				
			||||||
      ]
 | 
					      ]
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "build": {
 | 
					    "build": {
 | 
				
			||||||
      "artifacts": ["strawboss-$VERSION.zip"],
 | 
					      "artifacts": ["strawboss-$VERSION.zip"],
 | 
				
			||||||
      "depends": ["compile", "unittest", "functest"],
 | 
					      "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": [
 | 
					      "cmdInput": [
 | 
				
			||||||
        "zip strawboss-$VERSION.zip $compile_DIR/strawboss \",
 | 
					        "cp /usr/build/strawboss/strawboss .",
 | 
				
			||||||
 | 
					        "zip strawboss-$VERSION.zip strawboss \ ",
 | 
				
			||||||
        "  strawboss.config.json example.json \ ",
 | 
					        "  strawboss.config.json example.json \ ",
 | 
				
			||||||
        "  src/main/systemd/strawboss.service"
 | 
					        "  src/main/systemd/strawboss.service"
 | 
				
			||||||
      ]
 | 
					      ]
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user