Commit 92202ff1 authored by Raphael Defosseux's avatar Raphael Defosseux

Try modify env variable across stages

Signed-off-by: Raphael Defosseux's avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent dfc66b66
Pipeline #10178 passed with stage
in 0 seconds
......@@ -13,6 +13,9 @@ pipeline {
gitLabConnection('OAI GitLab')
gitlabBuilds(builds: ["Build", "Test"])
}
environment {
TERMINATE = "todo"
}
stages {
stage ("Verify Parameters") {
......@@ -21,6 +24,7 @@ pipeline {
//echo "Base URL is ${JENKINS_URL}"
echo "Git URL is ${GIT_URL}"
echo "GitLab Act is ${env.gitlabActionType}"
echo "TERMINATE is ${env.TERMINATE}"
script {
if ("MERGE".equals(env.gitlabActionType)) {
//echo "GitLab src branch is ${env.gitlabSourceBranch}"
......@@ -53,6 +57,14 @@ pipeline {
sh "cppcheck --enable=warning --force --xml --xml-version=2 src 2> cppcheck.xml"
}
}
post {
always {
sh '''
export TERMINATE="done"
echo $TERMINATE
'''
}
}
}
stage ("Test") {
steps {
......@@ -61,6 +73,7 @@ pipeline {
sh "./bin/test2"
sh "./bin/test3"
}
echo "TERMINATE is ${env.TERMINATE}"
}
}
stage ("Test slave job") {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment