Last active
August 26, 2015 00:24
-
-
Save musghost/b8ef29dad7ad3985895b to your computer and use it in GitHub Desktop.
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
docker run --name myjenkins -p 8080:8080 -v $PWD:/app -v /usr/local/bin/docker:/bin/docker -v /var/run/docker.sock:/var/run/docker.sock my-jenkins | |
Mocha reporter | |
/tmp/jenkins-buildenv/${JOB_NAME}/workspace | |
https://github.com/musghost/mocha-test | |
# Build the image to be used for this job. | |
IMAGE=$(docker build . | tail -1 | awk '{ print $NF }') | |
# Build the directory to be mounted into Docker. | |
MNT="$WORKSPACE/.." | |
# Execute the build inside Docker. | |
CONTAINER=$(docker run -d -v $PWD:/app $IMAGE) | |
# Attach to the container so that we can see the output. | |
docker attach $CONTAINER | |
# Get its exit code as soon as the container stops. | |
RC=$(docker wait $CONTAINER) | |
# Delete the container we've just used. | |
docker rm $CONTAINER | |
# Exit with the same value as that with which the process exited. | |
exit $RC | |
results/*.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment