We’re standing up an instance of Jenkins using Helm and ran across a technique for loading multiple containers we’d like to use. It is a simple matter of adding a YAML file that defines a pod instance with multiple containers:
apiVersion: v1
kind: Pod
spec:
containers:
- name: maven
image: maven:3.8.1-jdk-8
command:
- sleep
args:
- 99d
- name: python
image: python:latest
command:
- sleep
args:
- 99d
- name: node10jdk8
image: ourartifacts.jfrog.io/docker-local/jenkins_remote_agent_node10_jdk8:v4
command:
- sleep
args:
- 99d
- name: node10jdk11
image: ourartifacts.jfrog.io/docker-local/jra_node10_jdk11:v1
command:
- sleep
args:
- 99d
This works – to a degree. The containers for Maven, Python, and Node10 (JDK8) are available but the pipeline fails because the Node 10 JDK11 seems to be improperly named. Here is the error:
ERROR: Unable to pull Docker image “ourartifacts.jfrog.io/docker-local/jra_node10_jdk11:v1”. Check if image tag name is spelled correctly.
15:47:01
I eliminated the other container images in this YAML file and left only the jra_node10_jdk11:v1
image and got the same error. Here is the pipeline stripped to its basics:
node {
podTemplate(yaml: readFile('containers.yaml')) {
node(POD_LABEL) {
stage('Node 10 JDK 11') {
container('node10jdk11') {
stage('Check Node') {
sh '''
node -v
npm -v
java -version
cat /etc/*release
'''
}
}
}
}
}
}
I also tested this with several other images on Artifactory and received the same error for those. This doesn’t make sense because the one image (node10jdk8
) loads and works fine.
I have been hammering away at this since yesterday and have read many posts that don’t really provide any guidance.
Am I doing something wrong or missing something obvious?