diff options
author | rohitsakala <rohitsakala@gmail.com> | 2017-01-07 22:25:17 +0530 |
---|---|---|
committer | rohitsakala <rohitsakala@gmail.com> | 2017-01-19 13:24:32 +0530 |
commit | 90da02faa39d663df4ed21cf569f9e038f3832ac (patch) | |
tree | 4ebc193b150730fa8633e54341aafb67afa92601 | |
parent | d48d8be23dd95b4ceaf12561d5eef08fd7907806 (diff) |
Add new jenkins job for unittests
JIRA: FUNCTEST-687
Change-Id: I1fd616c32e3185bc6ec452af2c1bd88f46812ec2
Signed-off-by: rohitsakala <rohitsakala@gmail.com>
-rw-r--r-- | jjb/releng/testapi-automate.yml | 58 | ||||
-rw-r--r-- | jjb/releng/testapi-run-tests.sh | 17 |
2 files changed, 69 insertions, 6 deletions
diff --git a/jjb/releng/testapi-automate.yml b/jjb/releng/testapi-automate.yml index 376288505..552c25fe4 100644 --- a/jjb/releng/testapi-automate.yml +++ b/jjb/releng/testapi-automate.yml @@ -6,9 +6,49 @@ gs-pathname: '' jobs: - 'testapi-automate-{stream}' + - 'testapi-verify-{stream}' + project: 'releng' - job-template: + name: 'testapi-verify-{stream}' + + parameters: + - project-parameter: + project: '{project}' + - gerrit-parameter: + branch: '{branch}' + + scm: + - git-scm + + triggers: + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - patchset-created-event: + exclude-drafts: 'false' + exclude-trivial-rebase: 'false' + exclude-no-code-change: 'false' + - draft-published-event + - comment-added-contains-event: + comment-contains-value: 'recheck' + - comment-added-contains-event: + comment-contains-value: 'reverify' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: 'ANT' + pattern: 'utils/**' + + builders: + - run-unit-tests + +- job-template: name: 'testapi-automate-{stream}' parameters: @@ -54,16 +94,16 @@ ################################ - builder: - name: docker-update + name: run-unit-tests builders: - shell: | - bash ./jjb/releng/testapi-docker-update.sh + bash ./jjb/releng/testapi-run-tests.sh - builder: - name: testapi-doc-build + name: docker-update builders: - shell: | - bash ./utils/test/testapi/htmlize/doc-build.sh + bash ./jjb/releng/testapi-docker-update.sh - builder: name: start-testapi-server @@ -72,13 +112,19 @@ bash ./utils/test/testapi/htmlize/prepare.sh - builder: - name: clean-testapi-server + name: testapi-doc-build builders: - shell: | - bash ./utils/test/testapi/htmlize/finish.sh + bash ./utils/test/testapi/htmlize/doc-build.sh - builder: name: upload-doc-artifact builders: - shell: | bash ./utils/test/testapi/htmlize/push-doc-artifact.sh + +- builder: + name: clean-testapi-server + builders: + - shell: | + bash ./utils/test/testapi/htmlize/finish.sh diff --git a/jjb/releng/testapi-run-tests.sh b/jjb/releng/testapi-run-tests.sh new file mode 100644 index 000000000..47691ed04 --- /dev/null +++ b/jjb/releng/testapi-run-tests.sh @@ -0,0 +1,17 @@ +#!/bin/bash +set -o errexit + +echo "Running unit tests..." + +# Creating virtual environment +virtualenv $WORKSPACE/testapi_test_venv +source $WORKSPACE/testapi_test_venv/bin/activate + +cd $WORKSPACE/utils/test/testapi/ + +# Install requirements +pip install -r requirements.txt +pip install -r test-requirements.txt + +# Run unit tests +bash run_test.sh |