-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Minor
-
Component/s: kubernetes-plugin
-
1.29.3
Reproduction Steps
- Define the Pod Template in the Kubernetes cloud named "standard"
- Create Pipeline with the below script
- Run the pipeline
Expected: Both stages stream the kubernetes events
Actual: Only first stage where there is no "inheritFrom" is streaming the kubernetes events
Â
pipeline {
agent none
stages {
stage('Pod 1') {
agent {
kubernetes {
yaml '''\
apiVersion: v1
kind: Pod
spec:
containers:
- name: shell
image: ubuntu
command:
- sleep
args:
- infinity
'''
defaultContainer 'shell'
}
}
steps \{
sh 'uname -a && hostname'
}
}
stage('Pod 2') \{
agent {
kubernetes {
yaml '''\
apiVersion: v1
kind: Pod
spec:
containers:
- name: shell
image: ubuntu
command:
- sleep
args:
- infinity
'''
inheritFrom 'standard'
defaultContainer 'shell'
}
}
steps \{
sh 'uname -a && hostname'
}
}
}
}
- links to