Browse Source

Support Jenkins to Zuul rename

Jenkins went away, and Zuul soon would stop pretending to be Jenkins
[1]. Support new user name along with the old one.

[1] http://lists.openstack.org/pipermail/openstack-dev/2016-June/097595.html

Change-Id: I81ce306af044c3a2e76ff8a7685bcfe964292f0b
changes/47/331347/1
Mikhail S Medvedev 3 years ago
parent
commit
8fbb338d6e
3 changed files with 5 additions and 5 deletions
  1. 2
    2
      ciwatch/events.py
  2. 1
    1
      ciwatch/models.py
  3. 2
    2
      ciwatch/templates/project.html.jinja

+ 2
- 2
ciwatch/events.py View File

@@ -27,7 +27,7 @@ pipeline_pattern = re.compile("\((.*)\spipeline\)")
27 27
 possible_results = "FAILURE|SUCCESS|NOT_REGISTERED|UNSTABLE"
28 28
 comment_pattern = re.compile("[-*]\s+([^\s*]+)\s+(http[^\s*]+) : (%s)" %
29 29
                              possible_results)
30
-trusted_author_names = ["Jenkins check"]
30
+trusted_author_names = ["Jenkins check", "Zuul check"]
31 31
 
32 32
 
33 33
 def _process_project_name(project_name):
@@ -60,7 +60,7 @@ def _process_event(event):
60 60
 
61 61
 
62 62
 def _is_ci_user(name):
63
-    ci_keywords = ['CI', 'Jenkins', 'Bot']
63
+    ci_keywords = ['CI', 'Jenkins', 'Bot', 'Zuul']
64 64
     return any(word in name for word in ci_keywords)
65 65
 
66 66
 

+ 1
- 1
ciwatch/models.py View File

@@ -77,7 +77,7 @@ class CiServer(Base):
77 77
     id = Column(Integer, primary_key=True)
78 78
     name = Column(String(128))
79 79
 
80
-    # Official OpenStack CIs are trusted (e.g., Jenkins)
80
+    # Official OpenStack CIs are trusted
81 81
     trusted = Column(Boolean, default=False)
82 82
 
83 83
     ci_owner_id = Column(Integer, ForeignKey('ci_owners.id'))

+ 2
- 2
ciwatch/templates/project.html.jinja View File

@@ -38,8 +38,8 @@
38 38
         </ul>
39 39
       </div>
40 40
 
41
-      <button id="verified-1-button" class="btn btn-default" type="button" data-toggle="button">Highlight Jenkins -1 votes</button>
42
-      <button id="verified1-button" class="btn btn-default" type="button" data-toggle="button">Highlight Jenkins +1 votes</button>
41
+      <button id="verified-1-button" class="btn btn-default" type="button" data-toggle="button">Highlight Trusted -1 votes</button>
42
+      <button id="verified1-button" class="btn btn-default" type="button" data-toggle="button">Highlight Trusted +1 votes</button>
43 43
       <button id="select-button" class="btn btn-default" type="button" data-toggle="button">Select</button>
44 44
     </div>
45 45
 

Loading…
Cancel
Save