diff --git a/Jenkinsfile b/Jenkinsfile index 0129978..dd66c87 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -39,13 +39,20 @@ lazyConfig( name: 'dummy-jenkins-pl', dists: ['ubuntu-16', 'centos-7'], - labels: [ default: 'master', docker: 'docker', mac: 'mac', android: 'android', ] + labels: [ default: 'master', docker: 'docker', mac: 'mac', android: 'android', ], + env: [ 'DRYRUN=true' ], ) lazyStage { name = 'validate' tasks = [ - [ run: { echo "This is my first task" }, ], + [ + run: { env -> + echo "This is my first task" + echo "Creating repo with packages" + if (env.DRYRUN == 'true') { echo "DRYRUN is true = ${env.DRYRUN}" } + if (env.DRYRUN == 'false') { echo "DRYRUN is false = ${env.DRYRUN}" } + }, ], [ run: { echo "This is my second task" }, in: '*', on: 'docker' ], [ run: "third.sh", in: [ 'ubuntu-16', 'centos-7'], on: 'docker',], [ run: [ "fourth-a.sh", "fourth-b.sh"], on: 'mac' ], @@ -95,10 +102,16 @@ [ pre: { echo "Unarchiving packages" - unarchive(mapping:['target/packages/' : 'target']) + unarchive(mapping:['target/packages/' : '.']) sh("ls -lA target/packages") }, - run: { echo "Creating repo with packages" }, + run: { + //withEnv(["DRYRUN=true"]) { + echo "Creating repo with packages" + if (env.DRYRUN) { echo "DRYRUN is true = ${env.DRYRUN}" } + if (!env.DRYRUN) { echo "DRYRUN is false = ${env.DRYRUN}" } + //} + }, in: [ 'ubuntu-16', 'centos-7', ], on: 'docker', post: { echo "Publishing package repos" },