diff options
Diffstat (limited to 'lorry-controller-webapp')
-rwxr-xr-x | lorry-controller-webapp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/lorry-controller-webapp b/lorry-controller-webapp index ee573a2..7d4479c 100755 --- a/lorry-controller-webapp +++ b/lorry-controller-webapp @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright (C) 2014 Codethink Limited +# Copyright (C) 2014-2016 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -131,9 +131,13 @@ class WEBAPP(cliapp.Application): self.settings.choice( ['git-server-type'], - ['gitano', 'gerrit'], + ['gitano', 'gerrit', 'gitlab'], 'what API the local Git server speaks') + self.settings.string( + ['gitlab-private-token'], + 'private token for GitLab API access') + def find_routes(self): '''Return all classes that are API routes. @@ -158,6 +162,11 @@ class WEBAPP(cliapp.Application): def process_args(self, args): self.settings.require('statedb') + if (self.settings['git-server-type'] == 'gitlab' and + not self.settings['gitlab-private-token']): + logging.error('A private token must be provided to create ' + 'repositories on a GitLab instance.') + self.settings.require('gitlab-private-token') self.setup_proxy() |