From cd540cc4d0489457407bff7415abccef926ada92 Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Thu, 1 Nov 2018 17:00:46 +0100 Subject: [PATCH] Updated Jenkinsfile --- Jenkinsfile | 76 ++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 58 insertions(+), 18 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index ac85f84..6c64024 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -34,12 +34,26 @@ pipeline { expression { params.build_libraries } } - steps { - sh 'apt-get update' - sh 'git reset --hard origin/master; git submodule update --init --remote --recursive --force' - sh 'git submodule update --merge' - sh './attach_modules.sh' - sh 'cd libraries; ./build.sh' + + stages { + stage ('Updating libraries') { + steps { + sh 'apt-get update' + sh 'git reset --hard origin/master; git submodule update --init --remote --recursive --force' + sh 'git submodule update --merge' + sh './attach_modules.sh' + } + } + + stage ('Building libraries') { + when { + expression { params.build_libraries } + } + + steps { + sh 'cd libraries; ./build.sh' + } + } } } @@ -79,13 +93,26 @@ pipeline { expression { params.build_libraries } } - steps { - sh 'apt-get update' - sh 'git reset --hard origin/master; git submodule update --init --remote --recursive --force' - sh 'git submodule update --merge' - sh './attach_modules.sh' - sh 'cd libraries; ./build.sh' + stages { + stage ('Updating libraries') { + steps { + sh 'apt-get update' + sh 'git reset --hard origin/master; git submodule update --init --remote --recursive --force' + sh 'git submodule update --merge' + sh './attach_modules.sh' + } + } + + stage ('Building libraries') { + when { + expression { params.build_libraries } + } + + steps { + sh 'cd libraries; ./build.sh' + } + } } } @@ -126,13 +153,26 @@ pipeline { expression { params.build_libraries } } - steps { - sh 'apt-get update' - sh 'git reset --hard origin/master; git submodule update --init --remote --recursive --force' - sh 'git submodule update --merge' - sh './attach_modules.sh' - sh 'cd libraries; ./build.sh' + stages { + stage ('Updating libraries') { + steps { + sh 'apt-get update' + sh 'git reset --hard origin/master; git submodule update --init --remote --recursive --force' + sh 'git submodule update --merge' + sh './attach_modules.sh' + } + } + + stage ('Building libraries') { + when { + expression { params.build_libraries } + } + + steps { + sh 'cd libraries; ./build.sh' + } + } } }