Created
August 28, 2017 10:37
-
-
Save ragavsathish/81629cc709a82896a51ec6027dc3e84b to your computer and use it in GitHub Desktop.
Auto generated jenkins job script for sa-labs-analysis-core
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Jenkins shell script: | |
| #!/bin/sh | |
| ## Begin script generated by mjsWriteDockerRunScript.m | |
| # embed the Matlab job as JSON | |
| JOB_JSON="{\"cleanupCommand\": \"\",\"diskGB\": null,\"jobCommand\": [\"cd(fullfile(tbLocateToolbox(''sa-labs-analysis-core''), ''src\/test\/matlab''));\",\"tbAssertTestsPass()\"],\"memoryGB\": null,\"name\": \"testSALabsAnalysisCore\",\"setupCommand\": \"\",\"toolboxCommand\": \"tbUse(''sa-labs-analysis-core'')\"}" | |
| # find where Matlab is installed, dynamically | |
| MATLAB_LINK="$(which matlab)" | |
| MATLAB_EXECUTABLE="$(readlink -f "$MATLAB_LINK")" | |
| MATLAB_BIN_DIR="$(dirname "$MATLAB_EXECUTABLE")" | |
| MATLAB_DIR="$(dirname "$MATLAB_BIN_DIR")" | |
| # refresh the Docker image | |
| docker pull "brainardlab/mjs-docker:latest" | |
| # invoke "docker run" with lots of options | |
| # using conventions established in brainardlab/mjs-base | |
| docker run --rm --net=host \ | |
| -v "$MATLAB_DIR":/usr/local/MATLAB/from-host \ | |
| -v /var/run/docker.sock:/var/run/docker.sock \ | |
| -v "$WORKSPACE":/mjs/ToolboxToolbox \ | |
| -e "INPUT_DIR=/var/mjs" \ | |
| -e "OUTPUT_DIR=/var/mjs" \ | |
| -e "WORKING_DIR=/var/mjs" \ | |
| brainardlab/mjs-docker:latest \ | |
| -r "mjsRunJobAndExit('$JOB_JSON');" | |
| ## End script generated by mjsWriteDockerRunScript.m |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment