From 27a1a9cc822bf4e0e912153219611146a9bdd463 Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Wed, 14 Jun 2023 15:53:19 +0200 Subject: [PATCH 01/11] Test for pullRequest object Signed-off-by: Theofilos Manitaras --- jenkins/JenkinsfileTestingEB | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/JenkinsfileTestingEB b/jenkins/JenkinsfileTestingEB index a3215cb0fa..31d1ccd90a 100644 --- a/jenkins/JenkinsfileTestingEB +++ b/jenkins/JenkinsfileTestingEB @@ -3,7 +3,7 @@ def methods def machinesList def loginBash = '#!/bin/bash -l' -def pullRequestMessage = env.ghprbPullTitle +def pullRequestMessage = env.CHANGE_ID ? pullRequest.title : "" stage('Initialization') { node('master') { checkout scm From 0d957861f3116a928092b97086a2c1c8092e8d3f Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Wed, 14 Jun 2023 15:57:16 +0200 Subject: [PATCH 02/11] Test printing of object Signed-off-by: Theofilos Manitaras --- jenkins/JenkinsfileTestingEB | 2 ++ 1 file changed, 2 insertions(+) diff --git a/jenkins/JenkinsfileTestingEB b/jenkins/JenkinsfileTestingEB index 31d1ccd90a..9768696557 100644 --- a/jenkins/JenkinsfileTestingEB +++ b/jenkins/JenkinsfileTestingEB @@ -4,6 +4,8 @@ def methods def machinesList def loginBash = '#!/bin/bash -l' def pullRequestMessage = env.CHANGE_ID ? pullRequest.title : "" +println pullRequest + stage('Initialization') { node('master') { checkout scm From febc4e0ccf3fd044a2f86973472393ea3b81e4bf Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Wed, 14 Jun 2023 15:58:30 +0200 Subject: [PATCH 03/11] Test printing of object Signed-off-by: Theofilos Manitaras --- jenkins/JenkinsfileTestingEB | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/JenkinsfileTestingEB b/jenkins/JenkinsfileTestingEB index 9768696557..205e46baaf 100644 --- a/jenkins/JenkinsfileTestingEB +++ b/jenkins/JenkinsfileTestingEB @@ -4,7 +4,7 @@ def methods def machinesList def loginBash = '#!/bin/bash -l' def pullRequestMessage = env.CHANGE_ID ? pullRequest.title : "" -println pullRequest +println env.CHANGE_ID stage('Initialization') { node('master') { From 83fffbb594e9b1258ec8e880e4423aeeb57e2d6b Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Wed, 14 Jun 2023 16:00:15 +0200 Subject: [PATCH 04/11] Test printing of object Signed-off-by: Theofilos Manitaras --- jenkins/JenkinsfileTestingEB | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/JenkinsfileTestingEB b/jenkins/JenkinsfileTestingEB index 205e46baaf..1f7cc009a8 100644 --- a/jenkins/JenkinsfileTestingEB +++ b/jenkins/JenkinsfileTestingEB @@ -4,7 +4,7 @@ def methods def machinesList def loginBash = '#!/bin/bash -l' def pullRequestMessage = env.CHANGE_ID ? pullRequest.title : "" -println env.CHANGE_ID +println env stage('Initialization') { node('master') { From f74a9f9488985b7d26c0f0049978225d2878a70d Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Wed, 14 Jun 2023 16:07:21 +0200 Subject: [PATCH 05/11] Test printing of object Signed-off-by: Theofilos Manitaras --- jenkins/JenkinsfileTestingEB | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkins/JenkinsfileTestingEB b/jenkins/JenkinsfileTestingEB index 1f7cc009a8..e58a157247 100644 --- a/jenkins/JenkinsfileTestingEB +++ b/jenkins/JenkinsfileTestingEB @@ -4,11 +4,11 @@ def methods def machinesList def loginBash = '#!/bin/bash -l' def pullRequestMessage = env.CHANGE_ID ? pullRequest.title : "" -println env stage('Initialization') { node('master') { checkout scm + echo sh(script: 'env|sort', returnStdout: true) def rootDir = pwd() methods = load("${rootDir}/jenkins/util.groovy") machinesList = load("${rootDir}/jenkins/Machines.groovy") From b89c5d762bdb104d95ac2901fb89b0d9a88bf7e5 Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Wed, 14 Jun 2023 16:10:51 +0200 Subject: [PATCH 06/11] Test printing of object Signed-off-by: Theofilos Manitaras --- jenkins/JenkinsfileTestingEB | 1 + 1 file changed, 1 insertion(+) diff --git a/jenkins/JenkinsfileTestingEB b/jenkins/JenkinsfileTestingEB index e58a157247..47222d6fa1 100644 --- a/jenkins/JenkinsfileTestingEB +++ b/jenkins/JenkinsfileTestingEB @@ -9,6 +9,7 @@ stage('Initialization') { node('master') { checkout scm echo sh(script: 'env|sort', returnStdout: true) + println "${pullRequest.title}" def rootDir = pwd() methods = load("${rootDir}/jenkins/util.groovy") machinesList = load("${rootDir}/jenkins/Machines.groovy") From 5d88337bebcf5f77894b83014da8108ebac738a2 Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Wed, 14 Jun 2023 16:47:16 +0200 Subject: [PATCH 07/11] Test printing of object Signed-off-by: Theofilos Manitaras --- jenkins/JenkinsfileTestingEB | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/jenkins/JenkinsfileTestingEB b/jenkins/JenkinsfileTestingEB index 47222d6fa1..71846fdc23 100644 --- a/jenkins/JenkinsfileTestingEB +++ b/jenkins/JenkinsfileTestingEB @@ -3,13 +3,11 @@ def methods def machinesList def loginBash = '#!/bin/bash -l' -def pullRequestMessage = env.CHANGE_ID ? pullRequest.title : "" +def pullRequestMessage = env.CHANGE_TITLE stage('Initialization') { node('master') { checkout scm - echo sh(script: 'env|sort', returnStdout: true) - println "${pullRequest.title}" def rootDir = pwd() methods = load("${rootDir}/jenkins/util.groovy") machinesList = load("${rootDir}/jenkins/Machines.groovy") @@ -71,7 +69,7 @@ stage('Build Stage') { if (arch) commandComplete = "$command $workingDir/jenkins-builds/production.sh --arch=$arch --force=\"\$buildlist\" --list=$prefix/${projectName}.txt --prefix=$prefix --xalt=no --hide-deps --exit-on-error" def buildList = sh(returnStdout: true, - script: "echo \$(git diff origin/master...HEAD --name-only --oneline --no-merges --diff-filter=ACMRTUXB |grep ^easybuild\\/easyconfigs\\/.*\\.eb\\\$ |awk '{print \"basename \"\$0}'|sh)").trim() + script: "echo \$(git diff origin/master...${env.CHANGE_BRANCH} --name-only --oneline --no-merges --diff-filter=ACMRTUXB |grep ^easybuild\\/easyconfigs\\/.*\\.eb\\\$ |awk '{print \"basename \"\$0}'|sh)").trim() withEnv(["EASYBUILD_BUILDPATH=$buildPath", "EASYBUILD_TMPDIR=$prefix/tmp", "EASYBUILD_SOURCEPATH=$prefix/sources", @@ -85,7 +83,7 @@ stage('Build Stage') { mkdir -p $prefix fi - echo -e "\\n Current diff list by 'git diff origin/master...HEAD --name-only --oneline --no-merges --diff-filter=ACMRTUXB':" + echo -e "\\n Current diff list by 'git diff origin/master...${env.CHANGE_BRANCH} --name-only --oneline --no-merges --diff-filter=ACMRTUXB':" git diff origin/master...HEAD --name-only --oneline --no-merges --diff-filter=ACMRTUXB # if buildlist is empty, skip this build; otherwise, write .eb files to file if [ -z \"\$buildlist\" ]; then From 92cdad75845c48f4d234d4cef0352804e8751c54 Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Wed, 14 Jun 2023 16:52:44 +0200 Subject: [PATCH 08/11] Fetch origin master Signed-off-by: Theofilos Manitaras --- jenkins/JenkinsfileTestingEB | 1 + 1 file changed, 1 insertion(+) diff --git a/jenkins/JenkinsfileTestingEB b/jenkins/JenkinsfileTestingEB index 71846fdc23..16852a16ac 100644 --- a/jenkins/JenkinsfileTestingEB +++ b/jenkins/JenkinsfileTestingEB @@ -68,6 +68,7 @@ stage('Build Stage') { def commandComplete = "$command $workingDir/jenkins-builds/production.sh --force=\"\$buildlist\" --list=$prefix/${projectName}.txt --prefix=$prefix --hide-deps --exit-on-error" if (arch) commandComplete = "$command $workingDir/jenkins-builds/production.sh --arch=$arch --force=\"\$buildlist\" --list=$prefix/${projectName}.txt --prefix=$prefix --xalt=no --hide-deps --exit-on-error" + sh("git fetch origin master") def buildList = sh(returnStdout: true, script: "echo \$(git diff origin/master...${env.CHANGE_BRANCH} --name-only --oneline --no-merges --diff-filter=ACMRTUXB |grep ^easybuild\\/easyconfigs\\/.*\\.eb\\\$ |awk '{print \"basename \"\$0}'|sh)").trim() withEnv(["EASYBUILD_BUILDPATH=$buildPath", From fe99ac47a8b8ab1d1f81f6a1a8c827137f749ce4 Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Wed, 14 Jun 2023 17:06:15 +0200 Subject: [PATCH 09/11] Fetch origin master Signed-off-by: Theofilos Manitaras --- jenkins/JenkinsfileTestingEB | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkins/JenkinsfileTestingEB b/jenkins/JenkinsfileTestingEB index 16852a16ac..f07082e5b3 100644 --- a/jenkins/JenkinsfileTestingEB +++ b/jenkins/JenkinsfileTestingEB @@ -70,7 +70,7 @@ stage('Build Stage') { commandComplete = "$command $workingDir/jenkins-builds/production.sh --arch=$arch --force=\"\$buildlist\" --list=$prefix/${projectName}.txt --prefix=$prefix --xalt=no --hide-deps --exit-on-error" sh("git fetch origin master") def buildList = sh(returnStdout: true, - script: "echo \$(git diff origin/master...${env.CHANGE_BRANCH} --name-only --oneline --no-merges --diff-filter=ACMRTUXB |grep ^easybuild\\/easyconfigs\\/.*\\.eb\\\$ |awk '{print \"basename \"\$0}'|sh)").trim() + script: "echo \$(git diff FETCH_HEAD...HEAD --name-only --oneline --no-merges --diff-filter=ACMRTUXB |grep ^easybuild\\/easyconfigs\\/.*\\.eb\\\$ |awk '{print \"basename \"\$0}'|sh)").trim() withEnv(["EASYBUILD_BUILDPATH=$buildPath", "EASYBUILD_TMPDIR=$prefix/tmp", "EASYBUILD_SOURCEPATH=$prefix/sources", @@ -84,7 +84,7 @@ stage('Build Stage') { mkdir -p $prefix fi - echo -e "\\n Current diff list by 'git diff origin/master...${env.CHANGE_BRANCH} --name-only --oneline --no-merges --diff-filter=ACMRTUXB':" + echo -e "\\n Current diff list by 'git diff FETCH_HEAD...HEAD --name-only --oneline --no-merges --diff-filter=ACMRTUXB':" git diff origin/master...HEAD --name-only --oneline --no-merges --diff-filter=ACMRTUXB # if buildlist is empty, skip this build; otherwise, write .eb files to file if [ -z \"\$buildlist\" ]; then From f52a251a8349096cf48a9e606eab9ed2c6b746c8 Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Wed, 14 Jun 2023 17:24:43 +0200 Subject: [PATCH 10/11] Fetch origin master Signed-off-by: Theofilos Manitaras --- jenkins/JenkinsfileTestingEB | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkins/JenkinsfileTestingEB b/jenkins/JenkinsfileTestingEB index f07082e5b3..af1575dfe7 100644 --- a/jenkins/JenkinsfileTestingEB +++ b/jenkins/JenkinsfileTestingEB @@ -70,7 +70,7 @@ stage('Build Stage') { commandComplete = "$command $workingDir/jenkins-builds/production.sh --arch=$arch --force=\"\$buildlist\" --list=$prefix/${projectName}.txt --prefix=$prefix --xalt=no --hide-deps --exit-on-error" sh("git fetch origin master") def buildList = sh(returnStdout: true, - script: "echo \$(git diff FETCH_HEAD...HEAD --name-only --oneline --no-merges --diff-filter=ACMRTUXB |grep ^easybuild\\/easyconfigs\\/.*\\.eb\\\$ |awk '{print \"basename \"\$0}'|sh)").trim() + script: "echo \$(git diff FETCH_HEAD...${scmVars.GIT_COMMIT} --name-only --oneline --no-merges --diff-filter=ACMRTUXB |grep ^easybuild\\/easyconfigs\\/.*\\.eb\\\$ |awk '{print \"basename \"\$0}'|sh)").trim() withEnv(["EASYBUILD_BUILDPATH=$buildPath", "EASYBUILD_TMPDIR=$prefix/tmp", "EASYBUILD_SOURCEPATH=$prefix/sources", @@ -84,7 +84,7 @@ stage('Build Stage') { mkdir -p $prefix fi - echo -e "\\n Current diff list by 'git diff FETCH_HEAD...HEAD --name-only --oneline --no-merges --diff-filter=ACMRTUXB':" + echo -e "\\n Current diff list by 'git diff FETCH_HEAD...${scmVars.GIT_COMMIT}--name-only --oneline --no-merges --diff-filter=ACMRTUXB':" git diff origin/master...HEAD --name-only --oneline --no-merges --diff-filter=ACMRTUXB # if buildlist is empty, skip this build; otherwise, write .eb files to file if [ -z \"\$buildlist\" ]; then From 1aa5cd4082d56d2c0d4085815fb8d30de313667a Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Wed, 14 Jun 2023 17:28:22 +0200 Subject: [PATCH 11/11] Fetch origin master Signed-off-by: Theofilos Manitaras --- jenkins/JenkinsfileTestingEB | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jenkins/JenkinsfileTestingEB b/jenkins/JenkinsfileTestingEB index af1575dfe7..08975dd704 100644 --- a/jenkins/JenkinsfileTestingEB +++ b/jenkins/JenkinsfileTestingEB @@ -84,8 +84,8 @@ stage('Build Stage') { mkdir -p $prefix fi - echo -e "\\n Current diff list by 'git diff FETCH_HEAD...${scmVars.GIT_COMMIT}--name-only --oneline --no-merges --diff-filter=ACMRTUXB':" - git diff origin/master...HEAD --name-only --oneline --no-merges --diff-filter=ACMRTUXB + echo -e "\\n Current diff list by 'git diff FETCH_HEAD...${scmVars.GIT_COMMIT} --name-only --oneline --no-merges --diff-filter=ACMRTUXB':" + git diff FETCH_HEAD...${scmVars.GIT_COMMIT} --name-only --oneline --no-merges --diff-filter=ACMRTUXB # if buildlist is empty, skip this build; otherwise, write .eb files to file if [ -z \"\$buildlist\" ]; then echo -e "\\n No EasyBuild recipe to build, skipping build \\n\"