diff --git a/Jenkinsfile b/Jenkinsfile index 6446f63..5a0bfbc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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" + } + } } } + }