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

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


The following commit(s) were added to refs/heads/master by this push:
     new c4886e9  Initial jenkinsEnv
c4886e9 is described below

commit c4886e98f2d7899b0906a86bb4fe09a67b7e25d0
Author: Stephen Connolly <stephen.alan.conno...@gmail.com>
AuthorDate: Sun Nov 26 22:32:31 2017 +0000

    Initial jenkinsEnv
---
 vars/jenkinsEnv.groovy | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 82 insertions(+)

diff --git a/vars/jenkinsEnv.groovy b/vars/jenkinsEnv.groovy
new file mode 100644
index 0000000..8be79e3
--- /dev/null
+++ b/vars/jenkinsEnv.groovy
@@ -0,0 +1,82 @@
+#!/usr/bin/env groovy
+
+class jenkinsEnv implements Serializable {
+    def labelForOS(String os) {
+        switch (os) {
+            case 'linux':
+                return 'ubuntu'
+            case 'windows':
+                return 'Windows'
+            default:
+                return null
+        }
+    }
+    def jdkFromVersion(String os, String version) {
+        switch (os) {
+            case 'linux':
+                switch (version) {
+                    case '7':
+                        return 'JDK 1.7 (latest)'
+                    case '8':
+                        return 'JDK 1.8 (latest)'
+                    case '9':
+                        return 'JDK 1.9 (latest)'
+                    default:
+                        return null
+                }
+            case 'windows':
+                switch(version) {
+                    case '7':
+                        return 'JDK 1.7 (latest)'
+                    case '8':
+                        return 'JDK 1.8 (latest)'
+                    case '9':
+                        return 'JDK 1.9 (latest)'
+                    default:
+                        return null
+                }
+            default:
+                return null
+        }
+    }
+    def mvnFromVersion(String os, String version) {
+        switch (os) {
+            case 'linux':
+                switch(version) {
+                    case '3.0.x':
+                    case '3.0.5':
+                        return 'Maven 3.0.5'
+                    case '3.2.x':
+                    case '3.2.5':
+                        return 'Maven 3.2.5'
+                    case '3.3.x':
+                    case '3.3.9':
+                        return 'Maven 3.3.9'
+                    case '3.x.x':
+                    case '3.5.x':
+                    case '3.5.2':
+                    default:
+                        return 'Maven 3.5.2'
+                }
+            case 'windows':
+                switch(version) {
+                    case '3.0.x':
+                    case '3.0.5':
+                        return 'Maven 3.0.5 (Windows)'
+                    case '3.2.x':
+                    case '3.2.5':
+                        return 'Maven 3.2.5 (Windows)'
+                    case '3.3.x':
+                    case '3.3.9':
+                        return 'Maven 3.3.9 (Windows)'
+                    case '3.x.x':
+                    case '3.5.x':
+                    case '3.5.2':
+                    default:
+                        return 'Maven 3.5.2'
+                }
+            default:
+                return null
+        }
+    }
+}
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
['"commits@maven.apache.org" <commits@maven.apache.org>'].

Reply via email to