[maven-jenkins-lib] branch master updated: Try to shorten path for Windows by using tempDir

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[maven-jenkins-lib] branch master updated: Try to shorten path for Windows by using tempDir

rfscholte
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-jenkins-lib.git


The following commit(s) were added to refs/heads/master by this push:
     new 069e60f  Try to shorten path for Windows by using tempDir
069e60f is described below

commit 069e60f224e0c3d31d2313e4e840eca21c19ae81
Author: rfscholte <[hidden email]>
AuthorDate: Fri Oct 5 14:40:48 2018 +0200

    Try to shorten path for Windows by using tempDir
---
 vars/asfMavenTlpPlgnBuild.groovy | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/vars/asfMavenTlpPlgnBuild.groovy b/vars/asfMavenTlpPlgnBuild.groovy
index cf0bde1..f7ec1d0 100644
--- a/vars/asfMavenTlpPlgnBuild.groovy
+++ b/vars/asfMavenTlpPlgnBuild.groovy
@@ -41,8 +41,11 @@ def call(Map params = [:]) {
     def failFast = false;
     def siteJdk = params.containsKey('siteJdk') ? params.siteJdk : '8'
     def siteMvn = params.containsKey('siteMvn') ? params.siteJdk : '3.5.x'
+    def tmpWs = params.containsKey('tmpWs') ? params.tmpWs : false
     
     taskContext['failFast'] = failFast;
+    taskContext['tmpWs'] = tmpWs;
+
     Map tasks = [failFast: failFast]
     boolean first = true
     for (String os in oses) {
@@ -141,8 +144,12 @@ def doCreateTask( os, jdk, maven, tasks, first, plan, taskContext )
  String stageId = "${os}-jdk${jdk}-m${maven}_${plan}"
  tasks[stageId] = {
   node(jenkinsEnv.nodeSelection(label)) {
+  
+  if (os == 'windows' && taskContext.tmpWs) {
+    ws(pwd(true))
+  }
+  
       stage("Checkout ${stageId}") {
-    echo "PATH: ${env.PATH}"
         try {
           dir(stageId) {
             checkout scm