Skip to content

Instantly share code, notes, and snippets.

@jamesyang124
Forked from justengland/jenkins-script
Created March 27, 2018 08:56
Show Gist options
  • Select an option

  • Save jamesyang124/82f195405ccfa8fce4ec05212f44eb17 to your computer and use it in GitHub Desktop.

Select an option

Save jamesyang124/82f195405ccfa8fce4ec05212f44eb17 to your computer and use it in GitHub Desktop.

Revisions

  1. @justengland justengland created this gist Jul 24, 2016.
    1 change: 1 addition & 0 deletions jenkins-script
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    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';")
    7 changes: 7 additions & 0 deletions report.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    <HTML>
    <body style="margin:0px;padding:0px;overflow:hidden">
    <script>
    location.href='https://s3.amazonaws.com/{your-bucket}/{build}/mochawesome.html';
    </script>
    </body>
    </HTML>
    7 changes: 7 additions & 0 deletions run-mocha
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    # 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