X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Freleng%2Ftestapi-automate.yml;h=53e074baafbc4dc55b962ce33eb6accff91afe64;hb=061fe62c5eed47f14b5d2c782346be3c66f41ce6;hp=5102083bd13be9c1285ab63320d5cb5d0583aac0;hpb=db63c1b76140a583b43870094dbc2de323662933;p=releng.git diff --git a/jjb/releng/testapi-automate.yml b/jjb/releng/testapi-automate.yml index 5102083bd..53e074baa 100644 --- a/jjb/releng/testapi-automate.yml +++ b/jjb/releng/testapi-automate.yml @@ -4,8 +4,16 @@ - master: branch: '{stream}' gs-pathname: '' + + phase: + - 'docker-update' + - 'docker-deploy': + slave-label: 'testresults' + - 'generate-doc' + jobs: - 'testapi-automate-{stream}' + - 'testapi-automate-{phase}-{stream}' - 'testapi-verify-{stream}' project: 'releng' @@ -15,6 +23,11 @@ slave-label: 'testresults' + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + scm: - git-scm @@ -30,7 +43,6 @@ parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - 'opnfv-build-ubuntu-defaults' @@ -58,7 +70,7 @@ branch-pattern: '**/{branch}' file-paths: - compare-type: 'ANT' - pattern: 'utils/**' + pattern: 'utils/test/testapi/**' builders: - run-unit-tests @@ -69,8 +81,8 @@ - cobertura: report-file: "coverage.xml" only-stable: "true" - health-auto-update: "true" - stability-auto-update: "true" + health-auto-update: "false" + stability-auto-update: "false" zoom-coverage-chart: "true" targets: - files: @@ -81,14 +93,23 @@ healthy: 50 unhealthy: 40 failing: 30 + - 'email-publisher' - job-template: name: 'testapi-automate-{stream}' + project-type: multijob + + properties: + - throttle: + enabled: true + max-total: 1 + max-per-node: 1 + option: 'project' + parameters: - project-parameter: project: '{project}' - - gerrit-parameter: branch: '{branch}' - string: name: DOCKER_TAG @@ -99,6 +120,12 @@ scm: - git-scm + wrappers: + - ssh-agent-wrapper + - timeout: + timeout: 360 + fail: true + triggers: - gerrit: server-name: 'gerrit.opnfv.org' @@ -114,12 +141,74 @@ branch-pattern: '**/{branch}' file-paths: - compare-type: 'ANT' - pattern: 'utils/**' + pattern: 'utils/test/testapi/**' builders: - - docker-update - - testapi-doc-build - - upload-doc-artifact + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: docker-update + condition: SUCCESSFUL + projects: + - name: 'testapi-automate-docker-update-{stream}' + current-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: docker-deploy + condition: SUCCESSFUL + projects: + - name: 'testapi-automate-docker-deploy-{stream}' + current-parameters: false + predefined-parameters: | + GIT_BASE=$GIT_BASE + node-label-name: SLAVE_LABEL + node-label: testresults + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: generate-doc + condition: SUCCESSFUL + projects: + - name: 'testapi-automate-generate-doc-{stream}' + current-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + + publishers: + - 'email-publisher' + +- job-template: + name: 'testapi-automate-{phase}-{stream}' + + properties: + - throttle: + enabled: true + max-per-node: 1 + option: 'project' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - string: + name: DOCKER_TAG + default: "latest" + description: "Tag name for testapi docker image" + + wrappers: + - ssh-agent-wrapper + - timeout: + timeout: 120 + fail: true + + scm: + - git-scm + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - 'testapi-automate-{phase}-macro' ################################ # job builders @@ -131,25 +220,49 @@ bash ./jjb/releng/testapi-backup-mongodb.sh - builder: - name: run-unit-tests + name: 'run-unit-tests' builders: - shell: | bash ./utils/test/testapi/run_test.sh - builder: - name: docker-update + name: 'testapi-automate-docker-update-macro' builders: - shell: | bash ./jjb/releng/testapi-docker-update.sh - builder: - name: testapi-doc-build + name: 'testapi-automate-generate-doc-macro' + builders: + - 'testapi-doc-build' + - 'upload-doc-artifact' + +- builder: + name: 'testapi-doc-build' builders: - shell: | bash ./utils/test/testapi/htmlize/doc-build.sh - builder: - name: upload-doc-artifact + name: 'upload-doc-artifact' builders: - shell: | bash ./utils/test/testapi/htmlize/push-doc-artifact.sh + +- builder: + name: 'testapi-automate-docker-deploy-macro' + builders: + - shell: | + bash ./jjb/releng/testapi-docker-deploy.sh + +################################ +# job publishers +################################ + +- publisher: + name: 'email-publisher' + publishers: + - email: + recipients: rohitsakala@gmail.com feng.xiaowei@zte.com.cn + notify-every-unstable-build: false + send-to-individuals: true