Show "Run build steps in a container" from Kubernetes plugin

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

XMLWordPrintable

      Show "Run build steps in a container" from Kubernetes plugin

      stage('Run maven') {
        steps {
          sh 'set'
          sh 'test -f /usr/bin/mvn' // checking backwards compatibility
          sh "echo OUTSIDE_CONTAINER_ENV_VAR = ${CONTAINER_ENV_VAR}"
          container('maven') {
            sh 'echo INSIDE_CONTAINER_ENV_VAR = ${CONTAINER_ENV_VAR}'
            sh 'mvn -version'
          }
         }
      }

      Example: https://github.com/jenkinsci/kubernetes-plugin/blob/master/src/test/resources/org/csanchez/jenkins/plugins/kubernetes/pipeline/declarative.groovy

            Assignee:
            Unassigned
            Reporter:
            Edimar Cardoso
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: