From 10a366a9e05eeb601cf6ef95a25c2623418ffaec Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Wed, 1 Sep 2021 13:06:54 +0000 Subject: [PATCH] updating the test jenkinsfiles --- jenkins-pipeline/Jenkinsfile.001 | 45 +++++++++++++++++++++++++------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/jenkins-pipeline/Jenkinsfile.001 b/jenkins-pipeline/Jenkinsfile.001 index f7a5c54..2e26a21 100644 --- a/jenkins-pipeline/Jenkinsfile.001 +++ b/jenkins-pipeline/Jenkinsfile.001 @@ -14,8 +14,8 @@ pipeline { axes { axis { name 'BUILD_TYPE' - //values 'debug-shared', 'debug-static', 'release-shared', 'release-static' - values 'debug-shared', 'debug-static' + values 'debug-shared', 'debug-static', 'release-shared', 'release-static' + //values 'debug-shared', 'debug-static' } axis { @@ -24,7 +24,7 @@ pipeline { values 'fedora' } } - + //excludes { // exclude { // axis { @@ -42,9 +42,32 @@ pipeline { agent { label "${PLATFORM}" } stages { + stage('Setup') { + steps { + script { + if (env.BUILD_TYPE == 'debug-shared') { + env.CONFIG_OPTS = '--enable-debug=yes --enable-static=no --enable-shared=yes' + } + else if (env.BUILD_TYPE == 'debug-static') { + env.CONFIG_OPTS = '--enable-debug=yes --enable-static=yes --enable-shared=no' + } + else if (env.BUILD_TYPE == 'release-shared') { + env.CONFIG_OPTS = '--enable-debug=no --enable-static=no --enable-shared=yes' + } + else if (env.BUILD_TYPE == 'release-static') { + env.CONFIG_OPTS = '--enable-debug=no --enable-static=yes --enable-shared=no' + } + else { + echo "Invalid Build Type - ${env.BUILD_TYPE}" + sh "exit 1" + } + } + } + } + stage('Checkout') { steps { - echo "Checking out for ${BUILD_TYPE} on ${PLATFORM}" + echo "Checking out for ${BUILD_TYPE} on ${PLATFORM} - ${CONFIG_OPTS}" checkout([$class: 'SubversionSCM', additionalCredentials: [], excludedCommitMessages: '', @@ -55,18 +78,20 @@ pipeline { ignoreDirPropChanges: false, includedRegions: '', locations: [[ - depthOption: 'infinity', - ignoreExternalsOption: true, - //local: 'local-dir', - remote: "${THIS_SVN_URL}"]], - workspaceUpdater: [$class: 'UpdateUpdater']]) + depthOption: 'infinity', + ignoreExternalsOption: true, + //local: 'local-dir', + remote: "${THIS_SVN_URL}" + ]], + workspaceUpdater: [$class: 'UpdateUpdater'] + ]) } } stage('Build') { steps { echo "Do build for ${BUILD_TYPE} on ${PLATFORM}" - sh "cd ${THIS_PROJECT} && touch -r * */* && ./configure && make" + sh "ls -laF && cd ${THIS_PROJECT} && touch -r * */* && ./configure ${CONFIG_OPTS} && make" } }