脚本是按照教程的脚本部署 去创建pod
pipeline {
agent {
kubernetes {
//inheritFrom 'mypod'
yaml '''
apiVersion: v1
kind: Pod
spec:
containers:
- name: maven
image: maven:alpine
command:
- cat
tty: true
- name: golang
image: golang:1.16.5
command:
- sleep
args:
- 99d
'''
retries 2
}
}
stages {
stage('') {
steps {
container('maven') {
sh 'touch a.txt'
}
}
}
stage('Run golang') {
steps {
container('golang') {
sh 'ls;pwd'
}
}
}
}
}但是出现 jnlp 的错误
