Skip to content

Instantly share code, notes, and snippets.

@justengland
Created July 24, 2016 04:34
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save justengland/1a2728df427241be4eb90dff3ed43940 to your computer and use it in GitHub Desktop.
Save justengland/1a2728df427241be4eb90dff3ed43940 to your computer and use it in GitHub Desktop.
Add mochawesome to jenkins
System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "default-src 'none'; script-src 'self' 'unsafe-inline'; connect-src 'self'; img-src 'self'; style-src 'self'; font-src 'self';")
<HTML>
<body style="margin:0px;padding:0px;overflow:hidden">
<script>
location.href='https://s3.amazonaws.com/{your-bucket}/{build}/mochawesome.html';
</script>
</body>
</HTML>
# Run Installs and Test
npm install --production
./node_modules/.bin/mocha test --reporter mochawesome --reporter-options inlineAssets=true
#upload test results to s3
aws s3 rm $REPORT_S3 --recursive
aws s3 cp $REPORT_FOLDER $REPORT_S3 --recursive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment