Since 0.12, pod templates got inherited even if not nested

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

XMLWordPrintable

      Hello there !

      Since I updated Kubernetes plugin from 0.11 to 0.12 I've a weird behavior: My podTemplates got inherited with no reasons. Here is a Jenkinsfile:

       

      stage("A") {
          podTemplate(label: "a") {
              node("a") {
                  sh "echo a"
              }
          }
      }
      
      stage("B") {
          podTemplate(label: "b") {
              node("b") {
                  sh "echo b"
                  sh "sleep 100"
              }
          }
      }
      
      stage("C") {
          podTemplate(label: "c") {
              node("c") {
                  sh "echo c"
                  sh "sleep 100"
              }
          }
      }
      

      This result in B inherited from A and C inherited from B and A:

       

      Even if I set "inheritFrom" in the podTemplate annotation it got inherited.

      This is a blocker for me because I use annotations on my pods (init containers) and as https://issues.jenkins-ci.org/browse/JENKINS-46433 describe they don't get inherited.

      I'll revert to 0.11 in the meantime.

       

      By the way, thanks a lot for your work on this plugin guys, you rock.

            Assignee:
            Carlos Sanchez
            Reporter:
            Clement Gautier
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: