]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Rewritten create_vmware_template.groovy
authorFrank Brehm <frank.brehm@pixelpark.com>
Thu, 19 Apr 2018 12:07:51 +0000 (14:07 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Thu, 19 Apr 2018 12:07:51 +0000 (14:07 +0200)
create_vmware_template.groovy

index b7deac515660235665676e3ed78f66d1ce25f757..cd8194bc5c2689e97f8dc4999cafbb089494553d 100644 (file)
@@ -1,5 +1,5 @@
 def group = "ppadmin"
-def projectName = "create-vmeare-tpl"
+def projectName = "create-vmware-tpl"
 def gitServerUrl = "git.pixelpark.com"
 def gitCloneUrl = "git@${gitServerUrl}:${group}/${projectName}.git"
 def normalizedName = "${group}-${projectName}".replaceAll('/','-')
@@ -10,7 +10,7 @@ def emailReceivers = 'frank.brehm@pixelpark.com'
 STEPS = '''#!/bin/bash
 
 if [[ ! -f venv/bin/activate ]] ; then
-  virtualenv-3 venv
+    virtualenv-3 venv
 fi
 
 . venv/bin/activate
@@ -23,71 +23,88 @@ bin/create-vmware-template --help
 '''
 
 listView("create-vmware-template") {
-  jobs {
-    regex("create-vmware-template.*")
-  }
-  columns {
-    status()
-    weather()
-    name()
-    lastSuccess()
-    lastFailure()
-    lastDuration()
-    buildButton()
-  }
+    jobs {
+        regex("create-vmware-template.*")
+    }
+    columns {
+        status()
+        weather()
+        name()
+        lastSuccess()
+        lastFailure()
+        lastDuration()
+        buildButton()
+    }
 }
 
 job("create-vmware-template") {
 
-  parameters {
-    gitParam('GIT_BRANCH') {
-      description('Bitte zu bauenden Branch waehlen')
-      type('BRANCH')
-      branch('*/master')
-      tagFilter('*')
-      sortMode('ASCENDING')
-      defaultValue('origin/master')
+    displayName('Creating VMWare Template')
+
+    parameters {
+        gitParam('GIT_BRANCH') {
+        description('Bitte zu bauenden Branch waehlen')
+        type('BRANCH')
+        branch('*/master')
+        tagFilter('*')
+        sortMode('ASCENDING')
+        defaultValue('origin/master')
+        }
     }
-  }
+
+    logRotator(
+        daysToKeep(30)
+    )
 
 /*
-  triggers {
-    cron(‘25 3 * * *’)
-  }
+    triggers {
+        cron(‘25 3 * * *’)
+    }
 */
 
-  scm {
-    git {
-      remote {
-        url("git@git.pixelpark.com:${group}/${projectName}.git")
-        credentials('d1d6ad59-8d5a-45b4-acfb-64a36d7fd8cd')
-      }
-      branch('${GIT_BRANCH}')
-      extensions {
-        pruneBranches()
-      }
-      browser {
-        stash("https://${gitServerUrl}/${group}/${projectName}")
-      }
+    scm {
+        git {
+            remote {
+                url("git@git.pixelpark.com:${group}/${projectName}.git")
+                name('origin')
+                credentials('d1d6ad59-8d5a-45b4-acfb-64a36d7fd8cd')
+            }
+            branch('${GIT_BRANCH}')
+            extensions {
+                pruneBranches()
+            }
+            browser {
+                //stash("https://${gitServerUrl}/${group}/${projectName}")
+                gitLab {
+                    url("https://${gitServerUrl}/${group}/${projectName}")
+                    version('10.3')
+                }
+            }
+        }
     }
-  }
 
-  steps {
-    shell(STEPS)
-  }
+    steps {
+        //shell(STEPS)
+        virtualenv {
+            name('venv')
+            command('bin/create-vmware-template --help')
+            ignoreExitCode(false)
+            pythonName('System-CPython-3')
+        }
+    }
 
-  wrappers {
-    colorizeOutput()
-  }
+    wrappers {
+        colorizeOutput()
+    }
 
-  publishers {}
+    publishers {}
 
-  authorization {
-      jenkinsJobAdmins.each { name ->
-          permissionAll(name)
-      }
-  }
+    authorization {
+        jenkinsJobAdmins.each { name ->
+            permissionAll(name)
+        }
+    }
 
 }
 
-// vim: ts=2 et
+// vim: ts=4 et