here is my sample pipeline script pipeline {
agent { docker { image "comp/xxxx:yyyy" } } tools { jdk 'JAVA8' } stages { stage("hello") { agent { label 'vjd05' } steps { withMaven( maven: 'M3', globalMavenSettingsConfig: 'maven-global', mavenSettingsConfig: 'maven-user', mavenLocalRepo: '.repository' ) { sh "mvn -v" } } } } } On Friday, October 20, 2017 at 3:43:17 PM UTC-7, Dan Tran wrote: > > > Hi > > I have a multi-stage pipeline using a global docker agent, except at one > stage where I need to use none docker agent ( ie a just a pure linux host) > > and run to this error and look like my stage still inside docker from the > previous stage. is it a bug? > > [Bitbucket] Notifying commit build result[Pipeline] withEnv[Pipeline] > {[Pipeline] script[Pipeline] {[Pipeline] withMaven[withMaven] Options: [] > [withMaven] Available options: > [withMaven] use JDK installation provided by the build agent > WARNING: Specified Maven 'M3' cannot be installed, will be ignored.Step > running within docker.image() tool installations are not available see > https://issues.jenkins-ci.org/browse/JENKINS-36159. > $ docker exec > ff8d1de358d03e06f316c42208c6dd49fb02d41214f59e18a744e21e911e9353 env printenv > MAVEN_HOME > $ docker exec > ff8d1de358d03e06f316c42208c6dd49fb02d41214f59e18a744e21e911e9353 env printenv > M2_HOME > $ docker exec > ff8d1de358d03e06f316c42208c6dd49fb02d41214f59e18a744e21e911e9353 env /bin/sh > -c "which mvn" > [withMaven] with executable null > > > Thanks > > > -Dan > > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/fa399175-9206-4355-93e2-3d569fb2a311%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.