From: Frank Brehm Date: Wed, 18 Apr 2018 13:05:11 +0000 (+0200) Subject: Extending create-vmware-template.groovy X-Git-Tag: 0.1.1~26 X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=ee30b6b0525cb8180f22a57d3ba37694e6cd0f79;p=pixelpark%2Fcreate-vmware-tpl.git Extending create-vmware-template.groovy --- diff --git a/create-vmware-template.groovy b/create-vmware-template.groovy index daeb677..6dbc7ea 100644 --- a/create-vmware-template.groovy +++ b/create-vmware-template.groovy @@ -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