devuan-releasebot

devuan's releasebot reimplemented (scorsh version)
git clone git://parazyd.org/devuan-releasebot.git
Log | Files | Refs | LICENSE

commit 23d7f6a348769ea53f98a05384082eb8235ea0cd
parent eed3cc9dd7b75a0eb7addaf3a0a066ce70f8edd7
Author: parazyd <parazyd@dyne.org>
Date:   Mon, 24 Jul 2017 18:18:58 +0200

auth handled with scorsh, no need for buildgroups

Diffstat:
Mbuild.py | 9++-------
Mbuildadd.py | 7++-----
Mbuilddel.py | 4++--
Mconfig.def.py | 5-----
4 files changed, 6 insertions(+), 19 deletions(-)

diff --git a/build.py b/build.py @@ -10,8 +10,8 @@ from os import environ as env from os.path import basename import jenkins -from config import (dryrun, buildgroups, jobtypes, suites, - jenkins_host, jenkins_user, jenkins_pass) +from config import (dryrun, jobtypes, suites, jenkins_host, jenkins_user, + jenkins_pass) def main(): @@ -29,11 +29,6 @@ def main(): print('Error in request. Possible authentication fail.') sys.exit(1) - # XXX: is this check necessary? - if env['SCORSH_GROUP'] not in buildgroups: - print('Unauthorized for a jenkins build. Quitting.') - sys.exit(1) - # the -4 cuts off '.git' from the path pkgname = basename(env['SCORSH_REPO'])[:-4] diff --git a/buildadd.py b/buildadd.py @@ -7,7 +7,7 @@ Module to add or modify Jenkins build jobs import sys from os import environ as env -from os.path import basename +from os.path import basename, dirname import jenkins from config import (jenkins_user, jenkins_pass, jenkins_host, jobtypes, @@ -35,14 +35,11 @@ def main(): # the -4 cuts off '.git' from the path pkgname = basename(env['SCORSH_REPO'])[:-4] - group = env['SCORSH_GROUP'] + group = basename(dirname(env['SCORSH_REPO'])) for jobt in jobtypes: jobname = '-'.join([pkgname, jobt]) - # TODO: here maybe correlate to config.buildgroups - # i.e.: if not group in buildgroups: exit - print('* Trying to create %s job for %s/%s' % (jobt, group, pkgname)) if jenk.job_exists(jobname) and progname == 'buildadd.py': diff --git a/builddel.py b/builddel.py @@ -7,7 +7,7 @@ Module to delete Jenkins build jobs import sys from os import environ as env -from os.path import basename +from os.path import basename, dirname import jenkins from config import (jenkins_user, jenkins_pass, jenkins_host, jobtypes, @@ -31,7 +31,7 @@ def main(): # the -4 cuts off '.git' from the path pkgname = basename(env['SCORSH_REPO'])[:-4] - group = env['SCORSH_GROUP'] + group = basename(dirname(env['SCORSH_REPO'])) for jobt in jobtypes: jobname = '-'.join([pkgname, jobt]) diff --git a/config.def.py b/config.def.py @@ -15,11 +15,6 @@ vcs_credentials = '' jobtypes = ['source', 'binaries', 'repos'] -buildgroups = [ - 'devuan-packages', - 'maemo', -] - suites = [ 'jessie', 'ascii',