From 6a1e0474d4b9f47eb2bcf586036fa0c5e29b108a Mon Sep 17 00:00:00 2001 From: George Adams Date: Wed, 16 Oct 2024 15:59:41 +0100 Subject: [PATCH] improve label detection --- buildenv/jenkins/openjdk_tests | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/buildenv/jenkins/openjdk_tests b/buildenv/jenkins/openjdk_tests index e76cf487e1..3ae6bdf513 100644 --- a/buildenv/jenkins/openjdk_tests +++ b/buildenv/jenkins/openjdk_tests @@ -458,8 +458,12 @@ def runTest() { } } jenkinsfile = load "${WORKSPACE}/aqa-tests/buildenv/jenkins/JenkinsfileBase" - if (LABEL.contains('ci.agent.dynamic') && CLOUD_PROVIDER.equals('azure')) { - //Set dockerimage for azure agent. Fyre has stencil to setup the right environment + // Check the node for full set of labels + def JobHelper = library(identifier: 'openjdk-jenkins-helper@master').JobHelper + def labels = JobHelper.getLabels(NODE_NAME) + + if (LABEL.contains('ci.agent.dynamic') && labels.contains('dynamicAzure')) { + // Set dockerimage for azure agent. Fyre has stencil to setup the right environment docker.image('ghcr.io/adoptium/test-containers:ubuntu2204').pull() docker.image('ghcr.io/adoptium/test-containers:ubuntu2204').inside { jenkinsfile.testBuild()