Hi All,
The Jenkinsfile in the Glassfish repo dynamically sets the label for a job:
// the label is unique and identifies the pod descriptor and its resulting pods
// without this, the agent could be using a pod created from a different descriptor
env.label = "glassfish-ci-pod-${UUID.randomUUID().toString()}"
Normally labels are static, and Jenkins will only find agents with this exact label.
I'm trying to run the Jenkinsfile on my local Kubernetes cluster, however I'm somewhat stuck on this dynamic label:
----
Obtained Jenkinsfile from b1ab2f11a1a236eb9d6063c488757e2afabdddea
Running in Durability level: MAX_SURVIVABILITY
[Pipeline] Start of Pipeline
[Pipeline] podTemplate (hide)
[Pipeline] {
[Pipeline] node
Still waiting to schedule task
‘Jenkins’ doesn’t have label ‘glassfish-ci-pod-076a168e-46e6-499c-bcf6-10ad71e5853a’
----
And example from what that Jenkins logs is:
Push event to branch master
Connecting to https://api.github.com using glassfish-bot/****** (GitHub bot)
Obtained Jenkinsfile from b1ab2f11a1a236eb9d6063c488757e2afabdddea
Running in Durability level: PERFORMANCE_OPTIMIZED
[Pipeline] Start of Pipeline
[Pipeline] podTemplate
[Pipeline] {
[Pipeline] node
Still waiting to schedule task
‘glassfish-ci-pod-e33d1b42-21bd-48be-928e-4225e0e099e7-wtr-jbmm8’ is offline
Agent glassfish-ci-pod-e33d1b42-21bd-48be-928e-4225e0e099e7-wtr-jbmm8 is provisioned from template Kubernetes Pod Template
---
apiVersion: "v1"
kind: "Pod"
metadata:
annotations:
buildUrl: "http://jenkins-ui.glassfish.svc.cluster.local/glassfish/job/glassfish/job/master/104/"
labels:
jenkins: "slave"
jenkins/label: "glassfish-ci-pod-e33d1b42-21bd-48be-928e-4225e0e099e7"
name: "glassfish-ci-pod-e33d1b42-21bd-48be-928e-4225e0e099e7-wtr-jbmm8"
spec:
containers:
- args:
- "cat"
env:
- name: "MAVEN_OPTS"
value: "-Duser.home=/home/jenkins"
- name: "MVN_EXTRA"
value: "--batch-mode -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
image: "ee4jglassfish/ci:tini-jdk-8.181"
imagePullPolicy: "Always"
name: "glassfish-ci"
resources:
Kind regards,
Arjan Tijms