fixing bugs in xos-rest-gw job

Change-Id: I16943dc388546973dc07ae66394acaf35bc4dc89
diff --git a/jjb/xos-rest-gw.yaml b/jjb/xos-rest-gw.yaml
index 5e50489..ad3cadc 100644
--- a/jjb/xos-rest-gw.yaml
+++ b/jjb/xos-rest-gw.yaml
@@ -9,7 +9,8 @@
     jobs:
       - 'xos-rest-gw'
 
-- job:
+- job-template:
+    id: 'xos-rest-gw'
     name: 'xos-rest-gw'
 
     description: |
@@ -17,14 +18,6 @@
       Created by {id} job-template from ci-management/jjb/xos-rest-gw.yaml  <br /><br />
       Test for the XOS Rest Gateway that combine REST APIs and WebSocket
 
-    triggers:
-      - cord-infra-gerrit-trigger-patchset:
-          gerrit-server-name: '{gerrit-server-name}'
-          project-regexp: '^xos-rest-gw'
-          branch-regexp: '{branch-regexp}'
-          dependency-jobs: '{dependency-jobs}'
-          file-include-regexp: '{all-files-regexp}'
-
     properties:
       - cord-infra-properties:
           build-days-to-keep: '{build-days-to-keep}'
@@ -40,6 +33,14 @@
     project-type: freestyle
     concurrent: true
 
+    triggers:
+      - cord-infra-gerrit-trigger-patchset:
+          gerrit-server-name: '{gerrit-server-name}'
+          project-regexp: '^xos-rest-gw'
+          branch-regexp: '{supported-branches-regexp}'
+          dependency-jobs: '{dependency-jobs}'
+          file-include-regexp: '{all-files-regexp}'
+
     builders:
       - shell: |
           #/usr/bin/env bash