]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Extending create-vmware-template.groovy
authorFrank Brehm <frank.brehm@pixelpark.com>
Wed, 18 Apr 2018 13:05:11 +0000 (15:05 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Wed, 18 Apr 2018 13:05:11 +0000 (15:05 +0200)
create-vmware-template.groovy

index daeb6774bf4d3316ebcef8d8cb85abbb83e77329..6dbc7ea2027d0364711ab2f61b57ed2c98495aed 100644 (file)
@@ -4,7 +4,8 @@ def gitServerUrl = "git.pixelpark.com"
 def gitCloneUrl = "git@${gitServerUrl}:${group}/${projectName}.git"
 def normalizedName = "${group}-${projectName}".replaceAll('/','-')
 def jenkinsJobAdmins = ['frabrehm', 'mickraus', 'grenaeck', 'andschme']
-def emailReceivers = 'frank.brehm@pixelpark.com, michael.krause@pixelpark.com, andre.schmelzer@pixelpark.com, gregor.naeckel@pixelpark.com'
+//def emailReceivers = 'frank.brehm@pixelpark.com, michael.krause@pixelpark.com, andre.schmelzer@pixelpark.com, gregor.naeckel@pixelpark.com'
+def emailReceivers = 'frank.brehm@pixelpark.com'
 
 STEPS = '''#!/bin/bash
 
@@ -14,7 +15,8 @@ fi
 
 . venv/bin/activate
 
-pip --upgrade --requirement requirements.txt
+pip install --upgrade --requirement requirements.txt
+pip list --format columns
 
 bin/create-vmware-template --help
 
@@ -37,17 +39,34 @@ listView("create-vmware-template") {
 
 job("create-vmware-template") {
 
+  parameters {
+    gitParam('GIT_BRANCH') {
+      description('Bitte zu bauenden Branch waehlen')
+      type('BRANCH')
+      branch('*/master')
+      tagFilter('*')
+      sortMode('ASCENDING')
+      defaultValue('origin/master')
+    }
+  }
+
   scm {
     git {
       remote {
         url("git@git.pixelpark.com:${group}/${projectName}.git")
         credentials('d1d6ad59-8d5a-45b4-acfb-64a36d7fd8cd')
       }
-      branch('*/master')
+      branch('${GIT_BRANCH}')
+      extensions {
+        pruneBranches()
+      }
+      browser {
+        stash("https://${gitServerUrl}/${group}/${projectName}")
+      }
     }
   }
 
-  steps {
+  step {
     shell(STEPS)
   }
 
@@ -55,6 +74,14 @@ job("create-vmware-template") {
     colorizeOutput()
   }
 
+  publishers {}
+
+  authorization {
+      jenkinsJobAdmins.each { name ->
+          permissionAll(name)
+      }
+  }
+
 }
 
 // vim: ts=2 et