A maven plugin to help develop and deploy JENKINS workflow libraries and pipelines.
The design goals are
- keep your POM clean: no dependencies
- keep your workspace clean : flexibilty in layout with good defaults
Prerequisite
- Maven is working. That's all. No pom.xml required.
- add jcenter repo to your maven settings, see the minimal settings.xml template.
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>bintray</id>
<name>bintray</name>
<url>https://jcenter.bintray.com</url>
</pluginRepository>
lets go some where safe ...
> mkdir /tmp/jenkins-test; cd /tmp/jenkins-test
run jenkins ...
> mvn com.baloise.maven:jenkins-maven-plugin:run
go play at http://127.0.0.1:8080/
shut down via
or type exit in the console (also works when launched in eclipse via m2 or external task)
Add the following to your ~/.m2/settings.xml
<pluginGroups>
<pluginGroup>com.baloise.maven</pluginGroup>
</pluginGroups>
now you can use
> mvn jenkins:run
Of course you have all the options as where to set the properties (tell me more)
@Parameter(defaultValue = "${project.build.directory}/JENKINS-HOME", property = "jenkins.home") private File home;
@Parameter(defaultValue = "8080", property = "jenkins.port") int port;
@Parameter(defaultValue = "", property = "jenkins.context") String context;
@Parameter(property = "jenkins.war", required=false) String war = null;
@Parameter(property = "jenkins.debug.port", required=false) int debugPort;
@Parameter(defaultValue = "2.320", property = "jenkins.version", required = false) String version;
@Parameter(property = "jenkins.home.template", required = false) File jenkinsHomeTemplate
This documentation might be out of sync. The truth is in the code.