Merge "fixing tosca-e2e shell script"
diff --git a/jjb/defaults.yaml b/jjb/defaults.yaml
index 9a8c1ea..f32f1a3 100644
--- a/jjb/defaults.yaml
+++ b/jjb/defaults.yaml
@@ -72,7 +72,7 @@
# matching repos that should be version tagged by the version-tag job
# (basically the same as imagebuilder projects + helm charts + tools
- version-tag-projects-regexp: '^(xos.*|helm-charts|automation-tools|cord-tester|chameleon|rcord|mcord|ecord|acordion|addressmanager|epc-service|exampleservice|fabric|fabric-crossconnect|globalxos|hippie-oss|hss_db|hypercache|internetemulator|kubernetes-service|monitoring|olt-service|onos-service|openstack|progran|sdn-controller|simpleexampleservice|templateservice|vEE|vEG|vBBU|venb|vHSS|vMME|vnaas|vPGWC|vPGWU|vrouter|vsg|vsg-hw|vSGW|vSM|vspgwc|vspgwu|vtn-service|vtr|att-workflow-driver|ves-agent|voltha-bbsim)$'
+ version-tag-projects-regexp: '^(xos.*|helm-charts|automation-tools|cord-tester|chameleon|rcord|mcord|ecord|acordion|addressmanager|epc-service|exampleservice|fabric|fabric-crossconnect|globalxos|hippie-oss|hss_db|hypercache|internetemulator|kubernetes-service|monitoring|olt-service|onos-service|openstack|progran|sdn-controller|simpleexampleservice|templateservice|vEE|vEG|vBBU|venb|vHSS|vMME|vnaas|vPGWC|vPGWU|vrouter|vsg|vsg-hw|vSGW|vSM|vspgwc|vspgwu|vtn-service|vtr|att-workflow-driver|ves-agent|voltha-bbsim|openolt)$'
# for matching files with file-include-regexp
all-files-regexp: '.*'
diff --git a/jjb/python-unit.yaml b/jjb/python-unit.yaml
new file mode 100644
index 0000000..4cdad78
--- /dev/null
+++ b/jjb/python-unit.yaml
@@ -0,0 +1,68 @@
+---
+# python module unit test
+
+- job-template:
+ id: 'python-unit-test'
+ name: 'verify_{project}_unit-test'
+
+ description: |
+ Created by {id} job-template from ci-management/jjb/xos-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: 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: '{build-node}'
+ project-type: freestyle
+ concurrent: true
+
+ builders:
+ - shell: |
+ #!/usr/bin/env bash
+ set -eux -o pipefail
+
+ if [ -f requirements.txt ]; then
+ echo "requirements.txt found, installing locally with pip"
+ pip install -r requirements.txt
+ fi
+
+ echo "Performing nose2 tests"
+ nose2 --verbose --coverage-report xml --coverage-report term --junit-xml
+
+ publishers:
+ - junit:
+ results: "**/nose2-junit.xml"
+ - cobertura:
+ report-file: "**/coverage.xml"
+ targets:
+ - files:
+ healthy: 80
+ unhealthy: 0
+ failing: 0
+ - method:
+ healthy: 50
+ unhealthy: 0
+ failing: 0
diff --git a/jjb/shell/licensecheck.sh b/jjb/shell/licensecheck.sh
index 3d64307..2cf2655 100755
--- a/jjb/shell/licensecheck.sh
+++ b/jjb/shell/licensecheck.sh
@@ -43,6 +43,7 @@
! -name "*.iml" \
! -name "*.in" \
! -name "*.inc" \
+ ! -name "*.install" \
! -name "*.j2" \
! -name "*.jar" \
! -name "*.jks" \
diff --git a/jjb/verify/kafkaloghandler.yaml b/jjb/verify/kafkaloghandler.yaml
new file mode 100644
index 0000000..4294afd
--- /dev/null
+++ b/jjb/verify/kafkaloghandler.yaml
@@ -0,0 +1,21 @@
+---
+# verification jobs for 'kafkaloghandler' repo
+
+- project:
+ name: kafkaloghandler
+ project: '{name}'
+
+ jobs:
+ - 'verify-kafkaloghandler-jobs':
+ branch-regexp: '{supported-branches-regexp}'
+
+- job-group:
+ name: 'verify-kafkaloghandler-jobs'
+ jobs:
+ - 'verify-licensed'
+ - 'tag-collision-reject':
+ dependency-jobs: 'verify_kafkaloghandler_licensed'
+ - 'verify-sonarqube':
+ dependency-jobs: 'verify_kafkaloghandler_tag-collision'
+ - 'python-unit-test':
+ dependency-jobs: 'verify_kafkaloghandler_sonarqube'
diff --git a/jjb/verify/openolt.yaml b/jjb/verify/openolt.yaml
new file mode 100644
index 0000000..0ae1b3c
--- /dev/null
+++ b/jjb/verify/openolt.yaml
@@ -0,0 +1,63 @@
+---
+# verification jobs for 'openolt' repo
+
+- project:
+ name: openolt
+ project: '{name}'
+
+ jobs:
+ - 'verify-openolt-jobs':
+ branch-regexp: '{supported-branches-regexp}'
+
+- job-group:
+ name: 'verify-openolt-jobs'
+ jobs:
+ - 'verify-licensed'
+ - 'tag-collision-reject':
+ dependency-jobs: 'verify_openolt_licensed'
+ - 'verify-sonarqube':
+ dependency-jobs: 'verify_openolt_tag-collision'
+# - 'openolt-tests':
+# dependency-jobs: 'verify_openolt_sonarqube'
+
+- job-template:
+ id: 'openolt-tests'
+ name: 'verify_{project}_tests'
+
+ description: |
+ Created by {id} job-template from ci-management/jjb/verify/openolt.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}'
+
+ parameters:
+ - string:
+ name: notificationEmail
+ default: '$GERRIT_EVENT_ACCOUNT_EMAIL'
+ description: 'Verification failure of patch $GERRIT_CHANGE_NUMBER to {project} repo'
+
+ node: 'openolt_deb_onf_agent'
+ project-type: pipeline
+ concurrent: true
+
+ pipeline-scm:
+ script-path: 'Jenkinsfile.test'
+ scm:
+ - cord-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}'
+ basedir: ''
diff --git a/packer/provision/basebuild.sh b/packer/provision/basebuild.sh
index dfe66a7..e18dfee 100644
--- a/packer/provision/basebuild.sh
+++ b/packer/provision/basebuild.sh
@@ -124,6 +124,7 @@
Jinja2 \
ansible-lint \
astroid==1.* \
+ coverage \
docker-compose==1.20.1 \
docker==3.2.1 \
gitpython \
@@ -131,6 +132,8 @@
grpcio-tools \
isort \
linkchecker \
+ mock \
+ nose2 \
pexpect \
pylint==1.* \
pyyaml \