Jenkins: Difference between revisions
Jump to navigation
Jump to search
Line 28: | Line 28: | ||
Amazon ECR plugin | Amazon ECR plugin | ||
=Useful Stuff= | =Useful Stuff= | ||
Restart http://localhost:8080/safeRestart | *Restart http://localhost:8080/safeRestart | ||
Environment http://localhost:8080/env-vars.html | *Environment http://localhost:8080/env-vars.html |
Revision as of 00:37, 16 April 2023
Introduction
This page is to provide some tips using the Jenkins Build implementation
Setup
By default the home directory is
/var/lib/jenkins
You need to move this as /var/lib is not allowed for docker.
To do this you need to change the jenkins.service which resides in /lib/systemd/system/jenkins.service.
... # Directory where Jenkins stores its configuration and workspaces #Environment="JENKINS_HOME=/var/lib/jenkins" #WorkingDirectory=/var/lib/jenkins Environment="JENKINS_HOME=/home/jenkins" ...
Also if you are using LCOV you will need to implement a permanent change for CSP policy
System.setProperty("hudson.model.DirectoryBrowserSupport.CSP", "default-src 'self'; style-src 'self' 'unsafe-inline';")
Without this the CSS is rendered incorrectly. Again to change this is done in /lib/systemd/system/jenkins.service.
Environment="JAVA_OPTS=-Djava.awt.headless=true -Dhudson.model.DirectoryBrowserSupport.CSP=\"default-src 'self'; style-src 'self' 'unsafe-inline';\""
Groovy
Could not get groovy to work on Ubuntu 22.04 using apt, ended up using snap.
Plugins
Here is the list of some of the plugins I currently use
Build Timestamp Plugin Docker Pipeline HTML Publisher plugin Amazon ECR plugin
Useful Stuff
- Restart http://localhost:8080/safeRestart
- Environment http://localhost:8080/env-vars.html