Propelo's Jenkins Plugin to send reports about jobs' logs and metadata to the Propelo Service.
- Have a Propelo account with permissions to add an integration.
- Have access and permissions to install plugins in Jenkins.
- Login to your Propelo account
- Access the Integrations Settings Tile.
- Add a new Jenkins integration
-
Install the plugin
-
Configure the plugin
- Maven
Steps:
-
Build command:
mvn install
-
This creates an
hpi
file that can be uploaded to Jenkins:
target/propelo-job-reporter.hpi
Notes:
-
Use Java 8 to build otherwise there will be some issues with Javadoc step, e.g.:
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 mvn install
-
- Gradle
Steps:
-
Build command: JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 ./gradlew clean build
-
This creates an
hpi
file that can be uploaded to Jenkins:
build/libs/propelo-job-reporter.hpi
Notes:
-
Use Java 8 to build otherwise there will be some issues with Javadoc step, e.g.:
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 ./gradlew clean build
-
The findbugs step may fail (skipTests=true doesn't seem to work) but anaways runs after the build has been created
- Add Plugin: go to Manage Plugins > Advanced > Upload Plugin http://jenkins-host/pluginManager/advanced
Test while developing
JENKINS_HOME=jenkins-job-reporter/work ./gradlew clean server JENKINS_HOME=jenkins-job-reporter/work JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 ./gradlew clean server GRADLE_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005 JENKINS_HOME=jenkins-job-reporter/work JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 ./gradlew clean server
Run Jenkins docker image:
Blue Ocean Jenkins
https://hub.docker.com/r/jenkinsci/blueocean/
Officcial jenkins docker (lts or any specific version)
docker run -d --name jenkins-dev -p 8080:8080 -p 50000:50000 --mount "type=bind,source=/<base path>/data/jenkins_dev,target=/var/jenkins_home" --env JAVA_OPTS=-Dhudson.footerURL=https://levelops.io jenkins/jenkins:lts
- Run integration test class over Wiremock provided in resources
Jelly UI: https://wiki.jenkins.io/display/JENKINS/Jelly+form+controls
- Adding Plugin Manually return error "413 Request Entity Too Large".
This is a known issue with Jenkins Nginx default settings.
Solution: Increase client max body size limit in Nginx config- Edit Nginx config
vi /etc/nginx/nginx.conf
- Add the following line to http or server or location context to increase the size limit
\# set client body size to 20M \# client_max_body_size 20M;
- Restart Nginx service
service nginx reload
Link to Jenkins Bug.
Link to solution instructions.
Link to Jenkins Gradle Plugin
Link to Jenkins Gradle Plugin - GitHub - Edit Nginx config