Define the full pipeline and organize the stages in steps.

This commit is contained in:
Manuele Simi 2019-05-28 16:40:30 +02:00
parent f9271e7f99
commit 415da5a172
1 changed files with 29 additions and 13 deletions

42
Jenkinsfile vendored
View File

@ -1,18 +1,34 @@
parameters {
choice(choices: ['SNAPSHOT', 'RELEASE'],
description: 'The type of artifacts the build is expected to generate',
name: 'Type')
if (params.Type == 'SNAPSHOT') {
echo "Will configure Maven for SNAPSHOT artifacts"
}
if (params.Type == 'RELEASE') {
echo "Will configure Maven for RELEASE artifacts"
}
node {
stage('build core components') {
echo "will deploy artifacts of type: ${params.Type}"
withMaven(jdk: 'OpenJDK 8') {
build 'maven-parent'
build 'gcube-bom'
build 'authorization-common-library'
build 'gxRest'
pipeline {
agent any
parameters {
choice(choices: ['SNAPSHOT', 'RELEASE'],
description: 'The type of artifacts the build is expected to generate',
name: 'Type')
}
stages {
stage('build core components') {
steps {
withMaven(jdk: 'OpenJDK 8') {
build 'maven-parent'
build 'gcube-bom'
build 'authorization-common-library'
build 'gxRest'
}
script {
echo "Done with core components"
}
}
}
}
}