From 3fe86d83dbb6ac7938709a2d1177f0c65a15c38f Mon Sep 17 00:00:00 2001 From: Michal Konečný Date: Aug 16 2022 14:37:26 +0000 Subject: Fix the issues with the duffy client Read the JSON correctly and add credentials to request/retire session in duffy. Signed-off-by: Michal Konečný --- diff --git a/.cico.pipeline b/.cico.pipeline index 15d1bf5..3f27f3e 100644 --- a/.cico.pipeline +++ b/.cico.pipeline @@ -36,12 +36,12 @@ node('cico-workspace') { stage('Allocate Node'){ duffy_rtn=sh( - script: 'duffy client request-session pool=virt-ec2-t2-centos-9s-x86_64,quantity=1', + script: 'duffy client --url https://duffy.ci.centos.org/api/v1 --auth-name pagure --auth-key $CICO_API_KEY request-session pool=virt-ec2-t2-centos-8s-x86_64,quantity=1', returnStdout: true - ).trim().tokenize(' ') + ) def jsonObj = readJSON text: duffy_rtn - env.DUFFY_NODE=jsonObj[`nodes`][`hostname'] - env.SSID=jsonObj['session']['id'] + env.DUFFY_NODE=jsonObj.session.nodes[0].hostname + env.SSID=jsonObj.session.id env.BRANCH=params.BRANCH env.REPO=params.REPO } @@ -72,7 +72,7 @@ node('cico-workspace') { } finally { stage('Deallocate Node'){ - sh 'duffy client retire-session ${SSID}' + sh 'duffy client --url https://duffy.ci.centos.org/api/v1 --auth-name pagure --auth-key $CICO_API_KEY retire-session ${SSID}' } stage('Notify PR'){