Kubernetes events logs are not displayed when inheriting from a pod template defined in the kubernetes cloud

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • 1.29.3

      Reproduction Steps

      1. Define the Pod Template in the Kubernetes cloud named "standard"
      1. Create Pipeline with the below script
      1. 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'
                  }
              }
          }
      }
      

            Assignee:
            Vincent Latombe
            Reporter:
            Vincent Latombe
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: