tauth handled with scorsh, no need for buildgroups - devuan-releasebot - devuan's releasebot reimplemented (scorsh version)
HTML git clone git://parazyd.org/devuan-releasebot.git
DIR Log
DIR Files
DIR Refs
DIR LICENSE
---
DIR commit 23d7f6a348769ea53f98a05384082eb8235ea0cd
DIR parent eed3cc9dd7b75a0eb7addaf3a0a066ce70f8edd7
HTML Author: parazyd <parazyd@dyne.org>
Date: Mon, 24 Jul 2017 18:18:58 +0200
auth handled with scorsh, no need for buildgroups
Diffstat:
M build.py | 9 ++-------
M buildadd.py | 7 ++-----
M builddel.py | 4 ++--
M config.def.py | 5 -----
4 files changed, 6 insertions(+), 19 deletions(-)
---
DIR diff --git a/build.py b/build.py
t@@ -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():
t@@ -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]
DIR diff --git a/buildadd.py b/buildadd.py
t@@ -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,
t@@ -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':
DIR diff --git a/builddel.py b/builddel.py
t@@ -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,
t@@ -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])
DIR diff --git a/config.def.py b/config.def.py
t@@ -15,11 +15,6 @@ vcs_credentials = ''
jobtypes = ['source', 'binaries', 'repos']
-buildgroups = [
- 'devuan-packages',
- 'maemo',
-]
-
suites = [
'jessie',
'ascii',