diff options
Diffstat (limited to 'jjb/xci/xci-merge-jobs.yaml')
-rw-r--r-- | jjb/xci/xci-merge-jobs.yaml | 470 |
1 files changed, 470 insertions, 0 deletions
diff --git a/jjb/xci/xci-merge-jobs.yaml b/jjb/xci/xci-merge-jobs.yaml new file mode 100644 index 000000000..2d112c7e5 --- /dev/null +++ b/jjb/xci/xci-merge-jobs.yaml @@ -0,0 +1,470 @@ +--- +- project: + name: 'opnfv-xci-merge' + + project: releng-xci + # ------------------------------- + # branches + # ------------------------------- + stream: + - master: + branch: '{stream}' + disabled: false + # ------------------------------- + # distros + # ------------------------------- + distro: + - ubuntu: + disabled: false + kill-phase-on: FAILURE + abort-all-job: true + - centos: + disabled: true + kill-phase-on: NEVER + abort-all-job: false + - opensuse: + disabled: false + kill-phase-on: FAILURE + abort-all-job: true + # ------------------------------- + # postmerge promotion phases + # ------------------------------- + phase: + - 'deploy' + - 'healthcheck' + # ------------------------------- + # jobs + # ------------------------------- + jobs: + - 'xci-merge-virtual-{stream}' + - 'xci-merge-promote-virtual-{stream}' + - 'xci-merge-{distro}-virtual-{stream}' + - 'xci-merge-{distro}-{phase}-virtual-{stream}' +# ------------------------------- +# job templates +# ------------------------------- +- job-template: + name: 'xci-merge-virtual-{stream}' + + project-type: multijob + + disabled: '{obj:disabled}' + + concurrent: false + + properties: + - logrotate-default + + wrappers: + - ssh-agent-wrapper + - build-timeout: + timeout: 240 + - fix-workspace-permissions + + scm: + - git-scm-gerrit + + 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: 'releng-xci' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + disable-strict-forbidden-file-verification: 'false' + forbidden-file-paths: + - compare-type: ANT + pattern: 'xci/scripts/vm/**' + - compare-type: ANT + pattern: 'docs/**' + - compare-type: ANT + pattern: 'prototypes/**' + - compare-type: ANT + pattern: 'upstream/**' + - compare-type: ANT + pattern: 'INFO.yaml' + - project-compare-type: 'REG_EXP' + project-pattern: 'sfc|sdnvpn|releng-xci-scenarios' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + disable-strict-forbidden-file-verification: 'true' + file-paths: + - compare-type: ANT + pattern: 'scenarios/**' + readable-message: true + custom-url: '* $JOB_NAME $BUILD_URL' + + parameters: + - project-parameter: + project: $GERRIT_PROJECT + branch: '{branch}' + - label: + name: SLAVE_LABEL + default: 'xci-virtual' + - string: + name: CI_LOOP + default: 'merge' + - string: + name: FUNCTEST_MODE + default: 'tier' + - string: + name: FUNCTEST_SUITE_NAME + default: 'healthcheck' + - string: + name: DISTRO + default: 'all' + - string: + name: CLEAN_DIB_IMAGES + default: 'true' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + + builders: + - 'xci-merge-set-scenario-macro' + - inject: + properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties" + - description-setter: + description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME" + - multijob: + name: deploy and test + condition: SUCCESSFUL + projects: + - name: 'xci-merge-opensuse-virtual-{stream}' + current-parameters: false + predefined-parameters: | + DISTRO=opensuse + CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES + GERRIT_PROJECT=$GERRIT_PROJECT + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + CI_LOOP=$CI_LOOP + FUNCTEST_MODE=$FUNCTEST_MODE + FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: true + - name: 'xci-merge-ubuntu-virtual-{stream}' + current-parameters: false + predefined-parameters: | + DISTRO=ubuntu + CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES + GERRIT_PROJECT=$GERRIT_PROJECT + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + CI_LOOP=$CI_LOOP + FUNCTEST_MODE=$FUNCTEST_MODE + FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: true + - name: 'xci-merge-centos-virtual-{stream}' + current-parameters: false + predefined-parameters: | + DISTRO=centos + CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES + GERRIT_PROJECT=$GERRIT_PROJECT + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + CI_LOOP=$CI_LOOP + FUNCTEST_MODE=$FUNCTEST_MODE + FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME + node-parameters: false + kill-phase-on: NEVER + abort-all-job: false + - inject: + properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties" + - multijob: + name: promote + condition: SUCCESSFUL + projects: + - name: 'xci-merge-promote-virtual-{stream}' + current-parameters: true + predefined-parameters: | + GERRIT_PROJECT=$GERRIT_PROJECT + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + CI_LOOP=$CI_LOOP + FUNCTEST_MODE=$FUNCTEST_MODE + FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME + node-parameters: true + kill-phase-on: NEVER + abort-all-job: true + +- job-template: + name: 'xci-merge-{distro}-virtual-{stream}' + + project-type: multijob + + disabled: '{obj:disabled}' + + concurrent: false + + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'xci-verify-{distro}-.*' + - 'xci-merge-{distro}-.*' + - 'openstack-bifrost-verify-{distro}-.*' + - 'xci-osa-verify-{distro}-.*' + - 'xci-osa-periodic-{distro}-.*' + block-level: 'NODE' + - throttle: + max-per-node: 1 + max-total: 3 + categories: + - xci-verify-virtual + option: category + + wrappers: + - ssh-agent-wrapper + - build-timeout: + timeout: 240 + - fix-workspace-permissions + + scm: + - git-scm-gerrit + + parameters: + - project-parameter: + project: $GERRIT_PROJECT + branch: '{branch}' + - label: + name: SLAVE_LABEL + default: 'xci-virtual' + - string: + name: CI_LOOP + default: 'merge' + - string: + name: FUNCTEST_MODE + default: 'tier' + - string: + name: FUNCTEST_SUITE_NAME + default: 'healthcheck' + - string: + name: DISTRO + default: '{distro}' + - string: + name: CLEAN_DIB_IMAGES + default: 'true' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + + builders: + - 'xci-merge-set-scenario-macro' + - inject: + properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties" + - description-setter: + description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME" + - multijob: + name: deploy + condition: SUCCESSFUL + projects: + - name: 'xci-merge-{distro}-deploy-virtual-{stream}' + current-parameters: true + predefined-parameters: | + DISTRO={distro} + CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES + GERRIT_PROJECT=$GERRIT_PROJECT + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: true + kill-phase-on: '{kill-phase-on}' + abort-all-job: '{abort-all-job}' + - multijob: + name: healthcheck + condition: SUCCESSFUL + projects: + - name: 'xci-merge-{distro}-healthcheck-virtual-{stream}' + current-parameters: true + predefined-parameters: | + DISTRO={distro} + CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES + GERRIT_PROJECT=$GERRIT_PROJECT + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + CI_LOOP=$CI_LOOP + FUNCTEST_MODE=$FUNCTEST_MODE + FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME + node-parameters: true + kill-phase-on: '{kill-phase-on}' + abort-all-job: '{abort-all-job}' + + publishers: + - postbuildscript: + script-only-if-succeeded: false + script-only-if-failed: false + builders: + - shell: + !include-raw: ./xci-cleanup.sh + +- job-template: + name: 'xci-merge-{distro}-{phase}-virtual-{stream}' + + disabled: false + + concurrent: false + + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + blocking-jobs: + - '.*-bifrost-verify-.*' + - '.*-bifrost-periodic-.*' + - 'osa-verify-.*' + - 'osa-periodic-.*' + block-level: 'NODE' + + parameters: + - string: + name: PROJECT + default: $GERRIT_PROJECT + - string: + name: DISTRO + default: 'ubuntu' + - string: + name: CI_LOOP + default: 'merge' + - string: + name: FUNCTEST_MODE + default: 'tier' + - string: + name: FUNCTEST_SUITE_NAME + default: 'healthcheck' + - string: + name: XCI_FLAVOR + default: 'mini' + - string: + name: CLEAN_DIB_IMAGES + default: 'true' + - string: + name: OPNFV_RELENG_DEV_PATH + default: $WORKSPACE/ + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + + wrappers: + - inject: + properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties" + - ssh-agent-wrapper + - build-timeout: + timeout: 240 + - fix-workspace-permissions + + scm: + - git-scm-gerrit + + builders: + - description-setter: + description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME" + - 'xci-merge-{phase}-macro' + +- job-template: + name: 'xci-merge-promote-virtual-{stream}' + + disabled: false + + concurrent: false + + properties: + - logrotate-default + + parameters: + - string: + name: PROJECT + default: $GERRIT_PROJECT + - string: + name: CI_LOOP + default: 'merge' + - string: + name: FUNCTEST_MODE + default: 'tier' + - string: + name: FUNCTEST_SUITE_NAME + default: 'healthcheck' + - string: + name: DISTRO + default: 'all' + - string: + name: OPNFV_RELENG_DEV_PATH + default: $WORKSPACE/ + - string: + name: LOCAL_PROMOTION_METADATA_FILE + default: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties" + - string: + name: REMOTE_PROMOTION_METADATA_FILE + default: "gs://artifacts.opnfv.org/xci/pipeline/merge/$DEPLOY_SCENARIO.properties" + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + + wrappers: + - inject: + properties-file: "/tmp/$GERRIT_CHANGE_NUMBER/$DISTRO/scenario.properties" + - ssh-agent-wrapper + - build-timeout: + timeout: 240 + - fix-workspace-permissions + + builders: + - description-setter: + description: "Scenario: $DEPLOY_SCENARIO | Node: $NODE_NAME" + - 'xci-merge-promote-macro' + +# ------------------------------- +# builder macros +# ------------------------------- +- builder: + name: 'xci-merge-set-scenario-macro' + builders: + - shell: + !include-raw: ./xci-set-scenario.sh + +- builder: + name: 'xci-merge-deploy-macro' + builders: + - shell: + !include-raw: ./xci-start-new-vm.sh + + - shell: + !include-raw: ./xci-start-deployment.sh + +- builder: + name: 'xci-merge-healthcheck-macro' + builders: + - shell: + !include-raw: ./xci-run-functest.sh + +- builder: + name: 'xci-merge-promote-macro' + builders: + - shell: + !include-raw: ./xci-promote.sh |