diff --git a/Jenkinsfile b/Jenkinsfile index c1d2e78..857ecd8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,62 +21,67 @@ // Load Jenkins shared libraries common to all projects def libCmn = [ - remote: 'https://code.in.digital-me.nl/git/DEVops/JenkinsLibLazy.git', - branch: env.BRANCH_NAME, - credentialsId: null, + remote: 'https://code.in.digital-me.nl/git/DEVops/JenkinsLibLazy.git', + branch: env.BRANCH_NAME, + credentialsId: null, ] library( - identifier: "libCmn@${libCmn.branch}", - retriever: modernSCM([ - $class: 'GitSCMSource', - remote: libCmn.remote, - credentialsId: libCmn.credentialsId - ]) + identifier: "libCmn@${libCmn.branch}", + retriever: modernSCM([ + $class: 'GitSCMSource', + remote: libCmn.remote, + credentialsId: libCmn.credentialsId + ]) ) // Initialize configuration -lazyConfig('dummy-jenkins-pl') +lazyConfig( + name: 'dummy-jenkins-pl', + sdir: 'lazy-ci', + dists: ['ubuntu-16', 'centos-7'], + labels: [ default: 'master', docker: 'docker', mac: 'mac', android: 'android', ] +) lazyStage { - name = 'validate' - tasks = [ - [ exec: { echo "This is my first task" }, ], - [ exec: { echo "This is my second task" }, inside: '*' ], - [ exec: "third.sh", inside: [ 'ubuntu-16', 'centos-7', ] ], - [ exec: [ "fourth-a.sh", "fourth-b.sh"] ], - ] + name = 'validate' + tasks = [ + [ exec: { echo "This is my first task" }, ], + [ exec: { echo "This is my second task" }, inside: '*' ], + [ exec: "third.sh", inside: [ 'ubuntu-16', 'centos-7', ] ], + [ exec: [ "fourth-a.sh", "fourth-b.sh"], on: 'mac' ], + [ exec: [ "fourth-a.sh", "fourth-b.sh"], on: 'android' ], + ] } lazyStage { - name = 'test' - tasks = [ - [ exec: { echo "This is my fith task" }, ], - [ exec: { echo "This is my sixth task" }, inside: '*' ], - ] + name = 'test' + tasks = [ + [ exec: { echo "This is my fith task" }, ], + [ exec: { echo "This is my sixth task" }, inside: '*' ], + [ exec: [ 'junit.sh', 'jmeter.sh', ], inside: '*', postout: { echo 'Archiving test reports' } ], + ] } lazyStage { - name = 'package' - tasks = [ -// [ exec: { echo "Building packages"; echo "Archive packages"; }, on: 'windows', ] -// [ exec: { echo "Building packages"; echo "Archive packages"; }, on: 'mac', ] - [ - exec: { echo "Building packages"; }, - inside: [ 'ubuntu-16', 'centos-7', ], - postout: { echo "Archiving packages" }, - ], - ] + name = 'package' + tasks = [ +// [ exec: { echo "Building packages"; echo "Archive packages"; }, on: 'windows', ] +// [ exec: { echo "Building packages"; echo "Archive packages"; }, on: 'mac', ] + [ + exec: { echo "Building packages"; }, inside: [ 'ubuntu-16', 'centos-7', ], postout: { echo "Archiving packages" }, + ], + ] } lazyStage { - name = 'publish' - tasks = [ - [ - preout: { echo "Unarchiving packages" }, - exec: { echo "Creating repo with packages" }, - inside: [ 'ubuntu-16', 'centos-7', ], - postout: { echo "Publishing package repos" }, - ], - ] + name = 'publish' + tasks = [ + [ + preout: { echo "Unarchiving packages" }, + exec: { echo "Creating repo with packages" }, + inside: [ 'ubuntu-16', 'centos-7', ], + postout: { echo "Publishing package repos" }, + ], + ] }