Adding pipeline constant declarations
diff --git a/Jenkinsfile b/Jenkinsfile
index ecb7717..f5002c7 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -21,33 +21,36 @@
* Jenkins Pipeline configuration.
*
*/
-node('ubuntu') {
+
+def labels = 'ubuntu'
+def buildJdk = 'JDK 1.8 (latest)'
+def buildMvn = 'Maven 3.5.2'
+def deploySettings = 'DefaultMavenSettingsProvider.1331204114925'
+
+node(labels) {
stage ('Clone Sources') {
-
git url: 'https://gitbox.apache.org/repos/asf/archiva-redback-components-parent.git'
-
}
stage ('Build') {
withMaven(
- // Maven installation declared in the Jenkins "Global Tool Configuration"
- maven: 'Maven 3.5.2', jdk: 'JDK 1.8 (latest)') {
+ maven: buildMvn,
+ jdk: buildJdk
+ ) {
// Run the maven build
sh "mvn clean install -B -U -e -fae -Dmaven.compiler.fork=false"
-
} // withMaven will discover the generated Maven artifacts, JUnit Surefire & FailSafe & FindBugs reports...
}
stage ('Deploy') {
withMaven(
- maven: 'Maven 3.5.2',
- jdk: 'JDK 1.8 (latest)',
- mavenSettingsConfig: 'DefaultMavenSettingsProvider.1331204114925'
+ maven: buildMvn,
+ jdk: buildJdk,
+ mavenSettingsConfig: deploySettings
) {
// Run the maven build
sh "mvn clean deploy -Dmaven.test.skip=true -B -U -e -fae -Dmaven.compiler.fork=false"
-
} // withMaven will discover the generated Maven artifacts, JUnit Surefire & FailSafe & FindBugs reports...
}
}
\ No newline at end of file