From d4efc6803c184ccb8e53e6ef826611021853960f Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Tue, 27 Feb 2018 14:56:37 +0100 Subject: Add xtesting project job MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It mainly inherits from functest project jobs. xtesting is used everywhere except for project name which has to be functest-xtesting from the time being. Change-Id: I2c00c01b567b3c65b7acdec5c29b8c839d068366 Signed-off-by: Cédric Ollivier --- jjb/functest/xtesting-project-jobs.yml | 257 +++++++++++++++++++++++++++++++++ 1 file changed, 257 insertions(+) create mode 100644 jjb/functest/xtesting-project-jobs.yml diff --git a/jjb/functest/xtesting-project-jobs.yml b/jjb/functest/xtesting-project-jobs.yml new file mode 100644 index 000000000..bf08775b6 --- /dev/null +++ b/jjb/functest/xtesting-project-jobs.yml @@ -0,0 +1,257 @@ +--- +################################################### +# All the jobs except verify have been removed! +# They will only be enabled on request by projects! +################################################### +- project: + name: xtesting-project-jobs + + project: 'functest-xtesting' + + jobs: + - 'xtesting-verify-{stream}' + - 'xtesting-verify-{phase}-{stream}' + - 'xtesting-docs-upload-{stream}' + + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false + + phase: + - 'unit-tests-and-docs': + slave-label: 'opnfv-build-ubuntu' + - 'build-x86_64': + slave-label: 'opnfv-build-ubuntu' + - 'build-aarch64': + slave-label: 'opnfv-build-ubuntu-arm' + +- job-template: + name: 'xtesting-verify-{stream}' + + disabled: '{obj:disabled}' + + project-type: 'multijob' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + + scm: + - git-scm-gerrit + + triggers: + - 'xtesting-verify-triggers-macro': + project: '{project}' + branch: '{branch}' + + builders: + - shell: | + #!/bin/bash + # we do nothing here as the main stuff will be done + # in phase jobs + echo "Triggering phase jobs!" + - multijob: + name: 'xtesting-build-and-unittest' + execution-type: PARALLEL + projects: + - name: 'xtesting-verify-unit-tests-and-docs-{stream}' + current-parameters: false + predefined-parameters: | + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + git-revision: true + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: false + - name: 'xtesting-verify-build-x86_64-{stream}' + current-parameters: false + predefined-parameters: | + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + ARCH=x86_64 + git-revision: true + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: false + - name: 'xtesting-verify-build-aarch64-{stream}' + current-parameters: false + predefined-parameters: | + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + ARCH=aarch64 + git-revision: true + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: false + +- job-template: + name: 'xtesting-verify-{phase}-{stream}' + + disabled: '{obj:disabled}' + + wrappers: + - ssh-agent-wrapper + - build-timeout: + timeout: 30 + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{slave-label}-defaults' + + scm: + - git-scm-gerrit + + builders: + - 'xtesting-verify-{phase}-builders-macro' + + publishers: + - 'xtesting-verify-{phase}-publishers-macro' + +- job-template: + name: 'xtesting-docs-upload-{stream}' + + disabled: '{obj:disabled}' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + + scm: + - git-scm + + triggers: + - 'xtesting-docs-upload-triggers-macro': + project: '{project}' + branch: '{branch}' + + builders: + - xtesting-upload-doc-artifact + +################################ +# job triggers +################################ +- trigger: + name: 'xtesting-verify-triggers-macro' + 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}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' + +- trigger: + name: 'xtesting-docs-upload-triggers-macro' + triggers: + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - change-merged-event + - comment-added-contains-event: + comment-contains-value: 'remerge' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' +################################ +# job builders +################################ + +- builder: + name: 'xtesting-verify-unit-tests-and-docs-builders-macro' + builders: + - shell: | + cd $WORKSPACE && tox + +- builder: + name: 'xtesting-verify-build-x86_64-builders-macro' + builders: + - shell: | + echo "Not activated!" + +- builder: + name: 'xtesting-verify-build-aarch64-builders-macro' + builders: + - shell: | + echo "Not activated!" + +- builder: + name: 'xtesting-upload-doc-artifact' + builders: + - shell: | + cd $WORKSPACE && tox -edocs + wget -O - https://git.opnfv.org/releng/plain/utils/upload-artifact.sh | bash -s "api/_build" "docs" +################################ +# job publishers +################################ +- publisher: + name: 'xtesting-verify-unit-tests-and-docs-publishers-macro' + publishers: + - junit: + results: nosetests.xml + - cobertura: + report-file: "coverage.xml" + only-stable: "true" + health-auto-update: "true" + stability-auto-update: "true" + zoom-coverage-chart: "true" + targets: + - files: + healthy: 10 + unhealthy: 20 + failing: 30 + - method: + healthy: 50 + unhealthy: 40 + failing: 30 + - email-jenkins-admins-on-failure + +- publisher: + name: 'xtesting-verify-build-x86_64-publishers-macro' + publishers: + - email-jenkins-admins-on-failure + +- publisher: + name: 'xtesting-verify-build-aarch64-publishers-macro' + publishers: + - email-jenkins-admins-on-failure -- cgit 1.2.3-korg