diff --git a/Jenkinsfile b/Jenkinsfile index 6038ed4..c1d2e78 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,27 +39,44 @@ lazyConfig('dummy-jenkins-pl') lazyStage { - name = 'validate' - tasks = [ - [ exec: { echo "This is my first task" }, ], - [ exec: { echo "This is my second task" }, on: '*' ], - [ exec: "third.sh", on: [ '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"] ], + ] } lazyStage { - name = 'test' - tasks = [ - [ exec: { echo "This is my fith task" }, ], - [ exec: { echo "This is my sixth task" }, on: '*' ], - ] + name = 'test' + tasks = [ + [ exec: { echo "This is my fith task" }, ], + [ exec: { echo "This is my sixth task" }, inside: '*' ], + ] } lazyStage { - name = 'package' - tasks = [ - [ exec: { echo "This is my seventh task" }, on: [ 'ubuntu-16', 'centos-7', ] ], - [ exec: { echo "This is my last task" } ], - ] + 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" }, + ], + ] }