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

kubernetes-plugin should support multiple containers in declarative templates

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      e.g. something like this

      pipeline {
        agent {
          kubernetes {
            label 'mypod'
            podTemplate {
              containerTemplate {
                name 'maven'
                image 'maven:3.3.9-jdk-8-alpine'
                ttyEnabled true
                command 'cat'
              }
              containerTemplate {
                name 'node'
                image 'node:9.2'
                ttyEnabled true
                command 'cat'
              }
            }
          }
        }
        environment {
          CONTAINER_ENV_VAR = 'container-env-var-value'
        }
        stages {
          stage('Run maven') {
            steps {
              container('maven') {
                sh 'echo INSIDE_CONTAINER_ENV_VAR = ${CONTAINER_ENV_VAR}'
                sh 'mvn -version'
              }
            }
          }
          stage('Run npm') {
            steps {
              container('node') {
                sh 'echo INSIDE_CONTAINER_ENV_VAR = ${CONTAINER_ENV_VAR}'
                sh 'npm -version'
              }
            }
          }
        }
      }
      

        Attachments

          Issue Links

            Activity

            jstrachan James Strachan created issue -
            jstrachan James Strachan made changes -
            Field Original Value New Value
            Link This issue is blocking JENKINS-46658 [ JENKINS-46658 ]
            csanchez Carlos Sanchez made changes -
            Link This issue is blocked by JENKINS-48050 [ JENKINS-48050 ]
            csanchez Carlos Sanchez made changes -
            Link This issue depends on JENKINS-46336 [ JENKINS-46336 ]
            csanchez Carlos Sanchez made changes -
            Assignee Carlos Sanchez [ csanchez ] James Strachan [ jstrachan ]
            csanchez Carlos Sanchez made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            zougi Frederic Rousseau made changes -
            Assignee James Strachan [ jstrachan ] Andrew Bayer [ abayer ]
            csanchez Carlos Sanchez made changes -
            Status In Progress [ 3 ] Open [ 1 ]
            csanchez Carlos Sanchez made changes -
            Assignee Andrew Bayer [ abayer ] Carlos Sanchez [ csanchez ]
            csanchez Carlos Sanchez made changes -
            Summary kubernetes-plugin should support podTemplate in declarative templates kubernetes-plugin should support multiple containers in declarative templates
            csanchez Carlos Sanchez made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            csanchez Carlos Sanchez made changes -
            Status In Progress [ 3 ] In Review [ 10005 ]
            csanchez Carlos Sanchez made changes -
            Link This issue is duplicated by JENKINS-46658 [ JENKINS-46658 ]
            csanchez Carlos Sanchez made changes -
            Link This issue is blocking JENKINS-46658 [ JENKINS-46658 ]
            csanchez Carlos Sanchez made changes -
            Link This issue is blocked by JENKINS-48050 [ JENKINS-48050 ]
            csanchez Carlos Sanchez made changes -
            Link This issue is related to JENKINS-48050 [ JENKINS-48050 ]
            csanchez Carlos Sanchez made changes -
            Link This issue depends on JENKINS-46336 [ JENKINS-46336 ]
            csanchez Carlos Sanchez made changes -
            Link This issue is related to JENKINS-46336 [ JENKINS-46336 ]
            csanchez Carlos Sanchez made changes -
            Resolution Fixed [ 1 ]
            Status In Review [ 10005 ] Resolved [ 5 ]

              People

              Assignee:
              csanchez Carlos Sanchez
              Reporter:
              jstrachan James Strachan
              Votes:
              6 Vote for this issue
              Watchers:
              12 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: