Merge "Add sonarqube coverage and verification tests"
diff --git a/jjb/cord/cord-xos-gui-unit.sh b/jjb/cord/cord-xos-gui-unit.sh
deleted file mode 100644
index 034b8da..0000000
--- a/jjb/cord/cord-xos-gui-unit.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash -ex
-
-# Install npm deps
-npm install
-
-# Install typings deps
-# typings install
-
-# Check code style
-npm run lint
-
-# Execute tests
-npm test
\ No newline at end of file
diff --git a/jjb/cord/cord-xos-gui-unit.yaml b/jjb/cord/cord-xos-gui-unit.yaml
deleted file mode 100644
index f51e863..0000000
--- a/jjb/cord/cord-xos-gui-unit.yaml
+++ /dev/null
@@ -1,104 +0,0 @@
----
-
-- job_boiler_plate: &job_boiler_plate
-    name: job-boiler-plate
-
-    project-type: freestyle
-    node: '{build-node}'
-
-    ######################
-    # Default parameters #
-    ######################
-
-    branch: master
-    submodule-recursive: false
-    git-url: '$GIT_URL/$GERRIT_PROJECT'
-
-    #####################
-    # Job Configuration #
-    #####################
-
-    properties:
-      - lf-infra-properties:
-          project: '{project}'
-          build-days-to-keep: '{build-days-to-keep}'
-
-    parameters:
-      - lf-infra-parameters:
-          project: '{project}'
-          branch: '{stream}'
-          stream: '{stream}'
-          lftools-version: '{lftools-version}'
-
-    wrappers:
-      - lf-infra-wrappers:
-          build-timeout: '{build-timeout}'
-          jenkins-ssh-credential: '{jenkins-ssh-credential}'
-
-- verify_boiler_plate: &verify_boiler_plate
-    name: verify_boiler_plate
-
-    concurrent: true
-
-    scm:
-      - lf-infra-gerrit-scm:
-          git-url: '{git-url}'
-          refspec: '$GERRIT_REFSPEC'
-          branch: '$GERRIT_BRANCH'
-          submodule-recursive: '{submodule-recursive}'
-          choosing-strategy: gerrit
-          jenkins-ssh-credential: '{jenkins-ssh-credential}'
-
-    triggers:
-      - gerrit:
-         #server-name: '{gerrit-server-name}'
-         server-name: 'CORD Project Gerrit'
-         #trigger-on: '{obj:gerrit_verify_triggers}'
-         trigger-on:
-           - patchset-created-event:
-               exclude-drafts: true
-               exclude-trivial-rebase: false
-               exclude-no-code-change: true
-           - draft-published-event
-           - comment-added-contains-event:
-               comment-contains-value: '(?i)^.*recheck$'
-         projects:
-           - project-compare-type: PLAIN
-             project-pattern: '{project}'
-             branches:
-               - branch-compare-type: ANT
-                 branch-pattern: '**/{stream}'
-             #file-paths: '{obj:gerrit_trigger_file_paths}'
-
-# workaround for lack of parameter expansion support in shell: (see above)
-- job-template:
-    #default name is global
-    name: 'cord-xos-gui-unit-{stream}'
-
-    <<: *job_boiler_plate
-    # yamllint disable-line rule:key-duplicates
-    <<: *verify_boiler_plate
-
-    builders:
-    #put shell scripts in file then make sure shell check is installed on verify vms
-      - shell: !include-raw-escape: cord-xos-gui-unit.sh
-
-- project:
-    name: cord-xos-gui-unit
-    project-name: cord-xos-gui-unit
-    project: xos-gui
-
-    build-timeout: '10'
-    build-node: '{build-node}'
-
-    # ideally this would be in defaults.yaml, but that doesn't work
-    supported_versions: &supported_versions
-      - 'master'
-      - 'cord-5.0'
-      - 'cord-4.1'
-      - 'cord-4.0'
-
-    stream: *supported_versions
-
-    jobs:
-      - 'cord-xos-gui-unit-{stream}'
diff --git a/jjb/gui-unit.yaml b/jjb/gui-unit.yaml
new file mode 100644
index 0000000..1cfd3c0
--- /dev/null
+++ b/jjb/gui-unit.yaml
@@ -0,0 +1,46 @@
+---
+# xos-gui unit test
+
+- job-template:
+    id: 'gui-unit-test'
+    name: 'verify_{project}_gui-unit-test'
+
+    description: |
+      Created by gui-unit-tests job-template from ci-management/jjb/gui-unit.yaml
+
+    triggers:
+      - cord-infra-gerrit-trigger-patchset:
+          gerrit-server-name: '{gerrit-server-name}'
+          project-regexp: '^{project}$'
+          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}'
+          artifact-num-to-keep: '{artifact-num-to-keep}'
+
+    wrappers:
+      - lf-infra-wrappers:
+          build-timeout: '{build-timeout}'
+          jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+    scm:
+      - lf-infra-gerrit-scm:
+          git-url: '$GIT_URL/$GERRIT_PROJECT'
+          refspec: '$GERRIT_REFSPEC'
+          branch: '$GERRIT_BRANCH'
+          submodule-recursive: 'false'
+          choosing-strategy: gerrit
+          jenkins-ssh-credential: '{jenkins-ssh-credential}'
+
+    node: '{build-node}'
+    project-type: freestyle
+    concurrent: true
+
+    shell: |
+      npm install
+      npm run lint
+      npm test
+
diff --git a/jjb/verify/xos-gui.yaml b/jjb/verify/xos-gui.yaml
new file mode 100644
index 0000000..e7cd509
--- /dev/null
+++ b/jjb/verify/xos-gui.yaml
@@ -0,0 +1,17 @@
+---
+# verification jobs for 'xos-gui' repo
+
+- project:
+    name: xos-gui
+    project: '{name}'
+
+    jobs:
+      - 'verify-xos-gui-jobs':
+          branch-regexp: '{supported-branches-regexp}'
+
+- job-group:
+    name: 'verify-xos-gui-jobs'
+    jobs:
+      - 'verify-licensed'
+      - 'gui-unit-test':
+          dependency-jobs: 'verify_xos-gui_licensed'