For voltha, fix triggers and conform to standard job template
Change-Id: I0293e5ac29a4b3ffae924b8fb05e1cabdb3407a9
diff --git a/jjb/verify/voltha.yaml b/jjb/verify/voltha.yaml
new file mode 100644
index 0000000..ad6d589
--- /dev/null
+++ b/jjb/verify/voltha.yaml
@@ -0,0 +1,20 @@
+---
+# verification jobs for 'xos' repo
+
+- project:
+ name: voltha
+ project: '{name}'
+
+ jobs:
+ - 'verify-voltha-jobs':
+ branch-regexp: '^(master|voltha-.*)$'
+
+- job-group:
+ name: 'verify-voltha-jobs'
+ jobs:
+ - 'verify-licensed'
+ - 'verify-sonarqube':
+ dependency-jobs: 'verify_voltha_licensed'
+ - 'voltha-unit-test':
+ dependency-jobs: 'verify_voltha_sonarqube'
+
diff --git a/jjb/voltha-gerrit.yaml b/jjb/voltha-gerrit.yaml
deleted file mode 100644
index d80021a..0000000
--- a/jjb/voltha-gerrit.yaml
+++ /dev/null
@@ -1,55 +0,0 @@
----
-# voltha-gerrit
-
-- project:
- name: voltha-gerrit
-
- project-name: '{name}'
-
- jobs:
- - 'voltha-gerrit'
-
-
-- job-template:
- id: 'voltha-gerrit'
- name: 'voltha-gerrit'
-
- description: |
- Created by {id} job-template from ci-management/jjb/voltha-gerrit.yaml
-
- triggers:
- - cord-infra-gerrit-trigger-patchset:
- gerrit-server-name: '{gerrit-server-name}'
- project-regexp: 'voltha'
- branch-regexp: '{supported-branches-regexp}'
- dependency-jobs: ''
- file-include-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: 20
- jenkins-ssh-credential: '{jenkins-ssh-credential}'
-
- scm:
- - cord-infra-gerrit-repo-scm:
- manifest-url: '{gerrit-server-url}/{cord-repo-manifest}'
- branch: '$GERRIT_BRANCH'
- destination-dir: 'cord'
-
-
- node: 'ubuntu16.04-basebuild-1c-2g'
- project-type: freestyle
- concurrent: true
-
- builders:
- - shell: |
- #/usr/bin/env bash
- cd cord/incubator/voltha
- rm -rf venv-linux
- . ./env.sh
- make utest-with-coverage
diff --git a/jjb/voltha-unit-test.yaml b/jjb/voltha-unit-test.yaml
new file mode 100644
index 0000000..3d01448
--- /dev/null
+++ b/jjb/voltha-unit-test.yaml
@@ -0,0 +1,51 @@
+---
+# verification jobe for voltha
+
+- job-template:
+ id: 'voltha-unit-test'
+ name: '{project}_unit-test'
+
+ description: |
+ Created by {id} job-template from ci-management/jjb/voltha-unit-test.yaml
+
+ triggers:
+ - cord-infra-gerrit-trigger-patchset:
+ gerrit-server-name: '{gerrit-server-name}'
+ project-regexp: '^{project}$'
+ branch-regexp: '{branch-regexp}'
+ file-include-regexp: '{all-files-regexp}'
+ dependency-jobs: '{dependency-jobs}'
+
+ 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: 20
+ 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: 'ubuntu16.04-basebuild-1c-2g'
+ project-type: freestyle
+ concurrent: true
+
+ builders:
+ - shell: |
+ #!/usr/bin/env bash
+ set -eu -o pipefail
+
+ rm -rf venv-linux
+ source ./env.sh
+
+ make utest-with-coverage
+