Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[JENKINS-47823] Add warning for docker-pipeline incompatibility + exp…
…ort MAVEN_CONFIG + export MVN_CMD
  • Loading branch information
Cyrille Le Clerc committed Nov 5, 2017
1 parent bfe173b commit 5fc03e7
Showing 1 changed file with 8 additions and 5 deletions.
Expand Up @@ -174,11 +174,14 @@ public boolean start() throws Exception {
withContainer = detectWithContainer();

if (withContainer) {
listener.getLogger().print("WARNING: \"withMaven(){...}\" step running within \"docker.image('image').inside {...}\"." +
" Since the Docker Pipeline Plugin version 1.14, you MUST prepend the 'PATH' environment variable" +
" by the 'MVN_CMD' environment variable in every 'sh' step that invokes 'mvn'. See ");
listener.hyperlink("https://wiki.jenkins.io/display/JENKINS/Pipeline+Maven+Plugin?", "Pipeline Maven Plugin FAQ");
listener.getLogger().println();
listener.getLogger().print("[withMaven] WARNING: \"withMaven(){...}\" step running within \"docker.image('image').inside {...}\"." +
" Since the Docker Pipeline Plugin version 1.14, you MUST prepend the 'MVN_CMD' environment variable" +
" to the 'PATH' environment variable in every 'sh' step that invokes 'mvn'. ");
listener.getLogger().print("See ");
listener.hyperlink("https://wiki.jenkins.io/display/JENKINS/Pipeline+Maven+Plugin#PipelineMavenPlugin-HowtousethePipelineMavenPluginwithDocker", "Pipeline Maven Plugin FAQ");
listener.getLogger().println(".");
listener.getLogger().println("[withMaven] Sample:");
listener.getLogger().println("[withMaven] sh \"export PATH=$MVN_CMD:$PATH && mvn ...\"");
}

setupJDK();
Expand Down

0 comments on commit 5fc03e7

Please sign in to comment.