Skip to content

Instantly share code, notes, and snippets.

@evgmoskalenko
Last active April 18, 2016 15:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evgmoskalenko/09124063d0b24b031f561b267bfda0c8 to your computer and use it in GitHub Desktop.
Save evgmoskalenko/09124063d0b24b031f561b267bfda0c8 to your computer and use it in GitHub Desktop.
Jenkins, Allure, MacOS

Jenkins

You can use launchctl to start and stop jenkins

$ To manually start the daemon: sudo launchctl load /Library/LaunchDaemons/org.jenkins-ci.plist
$ To manually stop the daemon: sudo launchctl unload /Library/LaunchDaemons/org.jenkins-ci.plist

For more about launchctl and install see:

Jenkins + Allure

Configure Jenkins Content Security

By default, Jenkins sets Content Security Policy for plugin pages. Allure requires less strict policy, you can set it via system property.

If you haven't done it before, add the following to Jenkins system properties configuration (you need to set both Hudson and Jenkins properties to make it works):

Jenkins script console (executes arbitrary script for administration/trouble-shooting/diagnostics) - http://localhost:8080/script , execute:

$ System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline';")

$ System.setProperty("jenkins.model.DirectoryBrowserSupport.CSP", "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline';")

You can read more about it in the Jenkins docs and find details in issue #715 in the Github repository of allure-core:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment