From 50ca17b63ab7f79ec2b8326d3d1e5f3448091214 Mon Sep 17 00:00:00 2001 From: Sawyer Bergeron Date: Fri, 3 Nov 2017 14:36:19 -0400 Subject: Abstract Hard-Coded URLs to Config File JIRA: PHAROS-317 The Jenkins URL configuration now works the same as the Jira URL configuration, with a base URL in the config.env file, with settings.py calculating the final URLs to be used in adapter.py. Change-Id: I79b4784ab39afdb789a24e4c0f1e8a3ae3566421 Signed-off-by: Sawyer Bergeron --- src/pharos_dashboard/settings.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/pharos_dashboard') diff --git a/src/pharos_dashboard/settings.py b/src/pharos_dashboard/settings.py index 546b174..83ad172 100644 --- a/src/pharos_dashboard/settings.py +++ b/src/pharos_dashboard/settings.py @@ -182,3 +182,9 @@ CELERYBEAT_SCHEDULE = { 'schedule': timedelta(hours=24) }, } +# Jenkins Settings +ALL_SLAVES_URL = os.environ['JENKINS_URL'] + '/computer/api/json?tree=computer[displayName,offline,idle]' +CI_SLAVES_URL = os.environ['JENKINS_URL'] + '/label/ci-pod/api/json?tree=nodes[nodeName,offline,idle]' +ALL_JOBS_URL = os.environ['JENKINS_URL'] + '/api/json?tree=jobs[displayName,url,lastBuild[fullDisplayName,building,builtOn,timestamp,result]' +GET_SLAVE_URL = os.environ['JENKINS_URL'] + '/computer/' + -- cgit 1.2.3-korg