Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-65415

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

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      1.29.3

      Description

      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'
                  }
              }
          }
      }
      

        Attachments

          Issue Links

            Activity

            There are no comments yet on this issue.

              People

              Assignee:
              vlatombe Vincent Latombe
              Reporter:
              vlatombe Vincent Latombe
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: