From 927a427b182dd084388e9a22b2a7050e27c5c804 Mon Sep 17 00:00:00 2001 From: Ondřej Nosek Date: May 13 2025 01:59:09 +0000 Subject: Jenkinsfile: use local declaration instead the global Signed-off-by: Ondřej Nosek --- diff --git a/Jenkinsfile b/Jenkinsfile index 253e7d9..51833be 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,3 @@ -def DUFFY_SESSION_ID - pipeline { agent { label 'cico-workspace' @@ -21,11 +19,12 @@ pipeline { if (params.REPO == "" || params.BRANCH == "") { error "Please supply both params (REPO and BRANCH)" } + def DUFFY_SESSION_ID = null try { echo "Requesting duffy node ..." def session_str = sh returnStdout: true, script: "set +x; duffy client --url https://duffy.ci.centos.org/api/v1 --auth-name fedora-infra --auth-key $CICO_API_KEY request-session pool=virt-ec2-t2-centos-9s-x86_64,quantity=1" def session = readJSON text: session_str - DUFFY_SESSION_ID= session.session.id + DUFFY_SESSION_ID = session.session.id def hostname = session.session.nodes[0].hostname echo "duffy session id: $DUFFY_SESSION_ID hostname: $hostname" def remote_dir = "/tmp/$JENKINS_AGENT_NAME"