Wednesday, April 10, 2019

Gradle plugin for Jenkins

Maven Sucks, so we welcome Gradle - it can't possibly be worse than Maven!

https://wiki.jenkins.io/display/JENKINS/Gradle+Plugin

it seems that Gradle Plugin is installed as part of the "common plugins". I use an old Jenkins 2.138.


export GRADLE_HOME=/home/centos/gradle/gradle-4.8
#make sure $GRADLE_HOME/bin is in $PATH
cd /home/centos/gitclones
git clone https://github.com/jitpack/gradle-simple
cd gradle-simple/
gradle clean
gradle build
#check if jar was built
ls -ltra build/libs


I configure a freestyle Jenkins item to checkout from Github and "clean build" as gradle tasks...
Then I inspect /home/centos/.jenkins/workspace/gradletest/build/libs/ and the jar has been built there... great!


If I want to copy the plugin to another machine, it's in /home/centos/.jenkins/plugins/gradle.jpi

The MANIFEST.MF says:

Manifest-Version: 1.0
Plugin-Dependencies: structs:1.3
Long-Name: Gradle Plugin
Compatible-Since-Version: 1.0
Plugin-Developers: Stefan Wolf:wolfs:
Group-Id: org.jenkins-ci.plugins
Extension-Name: gradle
Plugin-Version: 1.31
Jenkins-Version: 1.651.3
Url: https://wiki.jenkins.io/display/JENKINS/Gradle+Plugin
Short-Name: gradle







No comments: