Maven plugin to communicate with Jenkins server to validate Jenkinsfiles
Switch branches/tags
Nothing to show
Clone or download
Latest commit c8db735 Jun 19, 2017
Permalink
Failed to load latest commit information.
src fixing message per andy's comments Jan 6, 2017
.gitignore Initial commit Dec 25, 2016
LICENSE Initial commit Dec 25, 2016
README.md Update README.md Jun 18, 2017
pom.xml Bump next development version Jan 7, 2017

README.md

jenkinsfile-maven-plugin

Maven Central

Maven plugin the validate the syntax of a Jenkinsfile

Overview

The Pipelines-Model-Definition plugin provides a declarative syntax to construct Jenkins pipelines. Aside from the definition itself, the plugin exposes an endpoint to validate the syntax of a Jenkinsfile. This plugin communicates with a Jenkins server configured with this plugin to validate the syntax of a Jenkinsfile defined within a Maven project

Building

Clone the repository and build the plugin

mvn clean install

Usage

Add the plugin to the pom.xml. The following example demonstrates how the plugin can be employed within a project:

<plugin>
	<groupId>com.andyserver.maven.plugins</groupId>
	<artifactId>jenkinsfile-maven-plugin</artifactId>
	<version>${jenkinsfile.maven.plugin.version}</version>
	<configuration>
		<username>admin</username>
		<password>password</password>
	</configuration>
</plugin>

Execute the plugin

mvn jenkinsfile:validate

Configuration

The following parameters are available to fine tune the plugin execution

Element Description Property Default
jenkinsfile Location of the Jenkinsfile within the project jenkinsfile Jenkinsfile
username Jenkins username jenkins.username
password Jenkins password jenkins.password
insecureSSL Whether to ignore insecure SSL certificates jenkins.insecureSSL false
server Jenkins server jenkins.server http://localhost:8080/jenkins