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

showRawYaml parameter doesn't work for nested podTemplates

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • kubernetes-plugin
    • None

      kubernetes plugin version:  1.17.2

      With a normal podTemplate I can set showRawYaml to false to don't show the YAML, but if I nest it, the second podTemplate show the YAML whether I set showRawYaml to false or not

      I have tested it in a pipeline job with this code:

      podTemplate(showRawYaml: false, label: "alpine1", cloud: "Build farm", containers: [
        containerTemplate(name: 'alpine', image: 'alpine', ttyEnabled: true, command: "cat")]) {
          node ("alpine1") {
              container('alpine') {
                  sh 'whoami'
                  podTemplate(showRawYaml: false, label: "alpine2", cloud: "Build farm", containers: [
                    containerTemplate(name: 'alpine', image: 'alpine', ttyEnabled: true, command: "cat")]) {
                    node ("alpine2") {
                      container('alpine') {
                        sh 'whoami'
                      }
                    }
                  }
              }
          }
      }

       

       

       

            vlatombe Vincent Latombe
            sermelo Sergio Merino
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: