From c6bedb5ec5d098ccefbc3f484bef6a9d14c12f57 Mon Sep 17 00:00:00 2001 From: Michal Konečný Date: Jun 21 2022 08:21:38 +0000 Subject: Add correct label to .cico.pipeline The new openshift jenkins instance need to have label specified to execute on correct node. Signed-off-by: Michal Konečný --- diff --git a/.cico.pipeline b/.cico.pipeline index e712534..d784a04 100644 --- a/.cico.pipeline +++ b/.cico.pipeline @@ -25,60 +25,64 @@ def syncfromduffynode(rsyncpath){ sh 'rsync -e "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -l root " -Ha --include=' + rsyncpath + " ${DUFFY_NODE}.ci.centos.org:~/ ./" } -node('pagure') { +agent { + node('pagure') { - properties([ - parameters([ - string(defaultValue: "", description: "", name: "REPO"), - string(defaultValue: "", description: "", name: "BRANCH"), + label 'cico-workspace' + + properties([ + parameters([ + string(defaultValue: "", description: "", name: "REPO"), + string(defaultValue: "", description: "", name: "BRANCH"), + ]) ]) - ]) - - stage('Allocate Node'){ - env.CICO_API_KEY = env.DUFFY_KEY - duffy_rtn=sh( - script: 'cico --debug node get -f value -c hostname -c comment', - returnStdout: true - ).trim().tokenize(' ') - env.DUFFY_NODE=duffy_rtn[0] - env.SSID=duffy_rtn[1] - env.BRANCH=params.BRANCH - env.REPO=params.REPO - } - try { - stage('Pre Setup Node'){ - // Install EPEL - onmyduffynode 'yum -y install epel-release git' + stage('Allocate Node'){ + env.CICO_API_KEY = env.DUFFY_KEY + duffy_rtn=sh( + script: 'cico --debug node get -f value -c hostname -c comment', + returnStdout: true + ).trim().tokenize(' ') + env.DUFFY_NODE=duffy_rtn[0] + env.SSID=duffy_rtn[1] + env.BRANCH=params.BRANCH + env.REPO=params.REPO } - stage('Notify PR'){ - notifyPagurePR("pagure", "Tests running ", "BUILDING", "STARTED") - } + try { + stage('Pre Setup Node'){ + // Install EPEL + onmyduffynode 'yum -y install epel-release git' + } - stage('Clone Test Suite') { - onmyduffynode "GIT_TRACE=1 GIT_CURL_VERBOSE=1 git clone --single-branch --depth 1 https://pagure.io/pagure.git" - } + stage('Notify PR'){ + notifyPagurePR("pagure", "Tests running ", "BUILDING", "STARTED") + } - stage('Run Test Suite') { - timeout(time: 6, unit: 'HOURS') { - onmyduffynode 'cd pagure && sh ./run_ci_tests_containers.sh' + stage('Clone Test Suite') { + onmyduffynode "GIT_TRACE=1 GIT_CURL_VERBOSE=1 git clone --single-branch --depth 1 https://pagure.io/pagure.git" } - } - } catch (e) { - currentBuild.result = "FAILURE" - throw e - } finally { + stage('Run Test Suite') { + timeout(time: 6, unit: 'HOURS') { + onmyduffynode 'cd pagure && sh ./run_ci_tests_containers.sh' + } + } - stage('Deallocate Node'){ - sh 'cico node done ${SSID}' - } + } catch (e) { + currentBuild.result = "FAILURE" + throw e + } finally { - stage('Notify PR'){ - res = currentBuild.currentResult - notifyPagurePR("pagure", "Build " + res + "! ", res, "FINALIZED") - } + stage('Deallocate Node'){ + sh 'cico node done ${SSID}' + } + stage('Notify PR'){ + res = currentBuild.currentResult + notifyPagurePR("pagure", "Build " + res + "! ", res, "FINALIZED") + } + + } } }