diff options
Diffstat (limited to 'jjb')
85 files changed, 3201 insertions, 3059 deletions
diff --git a/jjb/apex/apex-project-jobs.yml b/jjb/apex/apex-project-jobs.yml index 58072865d..b12b1015c 100644 --- a/jjb/apex/apex-project-jobs.yml +++ b/jjb/apex/apex-project-jobs.yml @@ -46,6 +46,10 @@ branch: '{branch}' - apex-parameter: gs-pathname: '{gs-pathname}' + - string: + name: GERRIT_REFSPEC + default: 'refs/heads/{branch}' + description: "JJB configured GERRIT_REFSPEC parameter" scm: - git-scm-gerrit diff --git a/jjb/apex/apex-verify-jobs.yml b/jjb/apex/apex-verify-jobs.yml new file mode 100644 index 000000000..88c1b1765 --- /dev/null +++ b/jjb/apex/apex-verify-jobs.yml @@ -0,0 +1,366 @@ +--- +- project: + name: 'apex-verify-jobs' + project: 'apex' + jobs: + - 'apex-verify-{stream}' + - 'apex-verify-gate-{stream}' + - 'apex-verify-unit-tests-{stream}' + stream: + - master: &master + branch: '{stream}' + gs-pathname: '' + verify-scenario: 'os-odl-nofeature-ha' + disabled: false + - danube: &danube + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + verify-scenario: 'os-odl_l3-nofeature-ha' + disabled: true + - euphrates: &euphrates + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + verify-scenario: 'os-odl-nofeature-ha' + disabled: false + +# Unit Test +- job-template: + name: 'apex-verify-unit-tests-{stream}' + + node: 'apex-build-{stream}' + + concurrent: true + + disabled: '{obj:disabled}' + + parameters: + - apex-parameter: + gs-pathname: '{gs-pathname}' + - project-parameter: + project: '{project}' + branch: '{branch}' + + scm: + - git-scm-gerrit + + triggers: + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - patchset-created-event: + exclude-drafts: 'false' + exclude-trivial-rebase: 'false' + exclude-no-code-change: 'true' + - 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: 'apex' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + disable-strict-forbidden-file-verification: 'false' + file-paths: + - compare-type: ANT + pattern: 'apex/tests/**' + forbidden-file-paths: + - compare-type: ANT + pattern: '*' + - compare-type: ANT + pattern: 'apex/*' + - compare-type: ANT + pattern: 'build/**' + - compare-type: ANT + pattern: 'lib/**' + - compare-type: ANT + pattern: 'config/**' + - compare-type: ANT + pattern: 'apex/build/**' + - compare-type: ANT + pattern: 'apex/common/**' + - compare-type: ANT + pattern: 'apex/inventory/**' + - compare-type: ANT + pattern: 'apex/network/**' + - compare-type: ANT + pattern: 'apex/overcloud/**' + - compare-type: ANT + pattern: 'apex/settings/**' + - compare-type: ANT + pattern: 'apex/undercloud/**' + - compare-type: ANT + pattern: 'apex/virtual/**' + + properties: + - logrotate-default + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' + + builders: + - apex-unit-test + +# Verify +- job-template: + name: 'apex-verify-{stream}' + + node: 'apex-virtual-master' + + concurrent: true + + disabled: '{obj:disabled}' + + project-type: 'multijob' + + parameters: + - apex-parameter: + gs-pathname: '{gs-pathname}/dev' + - project-parameter: + project: '{project}' + branch: '{branch}' + - string: + name: ARTIFACT_VERSION + default: dev + description: "Used for overriding the ARTIFACT_VERSION" + scm: + - git-scm-gerrit + + triggers: + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - patchset-created-event: + exclude-drafts: 'false' + exclude-trivial-rebase: 'false' + exclude-no-code-change: 'true' + - 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: 'apex' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + disable-strict-forbidden-file-verification: 'true' + file-paths: + - compare-type: ANT + pattern: '*' + - compare-type: ANT + pattern: 'apex/*' + - compare-type: ANT + pattern: 'build/**' + - compare-type: ANT + pattern: 'ci/**' + - compare-type: ANT + pattern: 'lib/**' + - compare-type: ANT + pattern: 'config/**' + - compare-type: ANT + pattern: 'apex/build/**' + - compare-type: ANT + pattern: 'apex/common/**' + - compare-type: ANT + pattern: 'apex/inventory/**' + - compare-type: ANT + pattern: 'apex/network/**' + - compare-type: ANT + pattern: 'apex/overcloud/**' + - compare-type: ANT + pattern: 'apex/settings/**' + - compare-type: ANT + pattern: 'apex/undercloud/**' + - compare-type: ANT + pattern: 'apex/virtual/**' + forbidden-file-paths: + - compare-type: ANT + pattern: 'apex/tests/**' + - compare-type: ANT + pattern: 'docs/**' + + properties: + - logrotate-default + - throttle: + max-per-node: 3 + max-total: 10 + option: 'project' + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: basic + condition: SUCCESSFUL + projects: + - name: 'apex-verify-unit-tests-{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 + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true + - multijob: + name: build + condition: SUCCESSFUL + projects: + - name: 'apex-build-{stream}' + current-parameters: false + predefined-parameters: | + ARTIFACT_VERSION=$ARTIFACT_VERSION + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true + - multijob: + name: deploy-virtual + condition: SUCCESSFUL + projects: + - name: 'apex-virtual-{stream}' + current-parameters: false + predefined-parameters: | + ARTIFACT_VERSION=$ARTIFACT_VERSION + DEPLOY_SCENARIO={verify-scenario} + OPNFV_CLEAN=yes + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true + +# Verify Scenario Gate +- job-template: + name: 'apex-verify-gate-{stream}' + + node: 'apex-build-{stream}' + + concurrent: true + + disabled: '{obj:disabled}' + + project-type: 'multijob' + + parameters: + - apex-parameter: + gs-pathname: '{gs-pathname}/dev' + - project-parameter: + project: '{project}' + branch: '{branch}' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: "Used for overriding the GIT URL coming from parameters macro." + - string: + name: ARTIFACT_VERSION + default: dev + description: "Used for overriding the ARTIFACT_VERSION" + + scm: + - git-scm-gerrit + + triggers: + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - comment-added-contains-event: + comment-contains-value: '^Patch Set [0-9]+: Code-Review\+2.*start-gate-scenario:.*' + projects: + - project-compare-type: 'ANT' + project-pattern: 'apex' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: 'ci/**' + - compare-type: ANT + pattern: 'build/**' + - compare-type: ANT + pattern: 'lib/**' + - compare-type: ANT + pattern: 'config/**' + - compare-type: ANT + pattern: 'apex/**' + + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + block-level: 'NODE' + blocking-jobs: + - 'apex-verify.*' + - 'apex-virtual.*' + - throttle: + max-per-node: 1 + max-total: 10 + option: 'project' + + builders: + - multijob: + name: deploy-virtual + condition: SUCCESSFUL + projects: + - name: 'apex-deploy-virtual-{stream}' + current-parameters: false + predefined-parameters: | + ARTIFACT_VERSION=$ARTIFACT_VERSION + DEPLOY_SCENARIO=gate + OPNFV_CLEAN=yes + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + GERRIT_EVENT_COMMENT_TEXT=$GERRIT_EVENT_COMMENT_TEXT + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + git-revision: true + # yamllint disable rule:line-length + - shell: | + echo DEPLOY_SCENARIO=$(echo $GERRIT_EVENT_COMMENT_TEXT | grep start-gate-scenario | grep -Eo 'os-.*') > detected_scenario + # yamllint enable rule:line-length + - inject: + properties-file: detected_scenario + - multijob: + name: functest-smoke + condition: SUCCESSFUL + projects: + - name: 'functest-apex-virtual-suite-{stream}' + current-parameters: false + predefined-parameters: | + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + FUNCTEST_MODE=tier + FUNCTEST_TIER=healthcheck + 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: NEVER + abort-all-job: true + git-revision: false + +######################## +# builder macros +######################## +- builder: + name: apex-unit-test + builders: + - shell: + !include-raw: ./apex-unit-test.sh diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index 4ec6efbd4..6714d6a66 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -3,9 +3,6 @@ name: 'apex' project: 'apex' jobs: - - 'apex-verify-{stream}' - - 'apex-verify-gate-{stream}' - - 'apex-verify-unit-tests-{stream}' - 'apex-runner-cperf-{stream}' - 'apex-virtual-{stream}' - 'apex-deploy-{platform}-{stream}' @@ -29,7 +26,7 @@ baremetal-slave: 'apex-baremetal-master' verify-scenario: 'os-odl-nofeature-ha' scenario_stream: 'master' - disable_daily: true + disable_daily: false - euphrates: &euphrates branch: 'stable/euphrates' gs-pathname: '/euphrates' @@ -38,7 +35,7 @@ baremetal-slave: 'apex-baremetal-master' verify-scenario: 'os-odl-nofeature-ha' scenario_stream: 'euphrates' - disable_daily: false + disable_daily: true - danube: &danube branch: 'stable/danube' gs-pathname: '/danube' @@ -113,6 +110,8 @@ <<: *master - 'os-odl-bgpvpn-ha': <<: *master + - 'os-odl-bgpvpn-noha': + <<: *master - 'os-ovn-nofeature-noha': <<: *master - 'os-nosdn-fdio-noha': @@ -161,10 +160,6 @@ <<: *euphrates - 'os-nosdn-fdio-ha': <<: *euphrates - - 'os-odl-fdio-noha': - <<: *euphrates - - 'os-odl-fdio-ha': - <<: *euphrates - 'os-nosdn-bar-ha': <<: *euphrates - 'os-nosdn-bar-noha': @@ -183,10 +178,6 @@ <<: *euphrates - 'os-odl-sfc-ha': <<: *euphrates - - 'os-odl-fdio_dvr-noha': - <<: *euphrates - - 'os-odl-fdio_dvr-ha': - <<: *euphrates - 'os-nosdn-calipso-noha': <<: *euphrates @@ -194,332 +185,6 @@ - 'baremetal' - 'virtual' -# Unit Test -- job-template: - name: 'apex-verify-unit-tests-{stream}' - - node: '{build-slave}' - - concurrent: true - - parameters: - - apex-parameter: - gs-pathname: '{gs-pathname}' - - project-parameter: - project: '{project}' - branch: '{branch}' - - scm: - - git-scm-gerrit - - triggers: - - gerrit: - server-name: 'gerrit.opnfv.org' - trigger-on: - - patchset-created-event: - exclude-drafts: 'false' - exclude-trivial-rebase: 'false' - exclude-no-code-change: 'true' - - 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: 'apex' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - disable-strict-forbidden-file-verification: 'false' - file-paths: - - compare-type: ANT - pattern: 'apex/tests/**' - forbidden-file-paths: - - compare-type: ANT - pattern: '*' - - compare-type: ANT - pattern: 'apex/*' - - compare-type: ANT - pattern: 'build/**' - - compare-type: ANT - pattern: 'lib/**' - - compare-type: ANT - pattern: 'config/**' - - compare-type: ANT - pattern: 'apex/build/**' - - compare-type: ANT - pattern: 'apex/common/**' - - compare-type: ANT - pattern: 'apex/inventory/**' - - compare-type: ANT - pattern: 'apex/network/**' - - compare-type: ANT - pattern: 'apex/overcloud/**' - - compare-type: ANT - pattern: 'apex/settings/**' - - compare-type: ANT - pattern: 'apex/undercloud/**' - - compare-type: ANT - pattern: 'apex/virtual/**' - - properties: - - logrotate-default - - throttle: - max-per-node: 1 - max-total: 10 - option: 'project' - - builders: - - shell: - !include-raw-escape: ./apex-unit-test.sh - -# Verify -- job-template: - name: 'apex-verify-{stream}' - - node: '{virtual-slave}' - - concurrent: true - - project-type: 'multijob' - - parameters: - - apex-parameter: - gs-pathname: '{gs-pathname}/dev' - - project-parameter: - project: '{project}' - branch: '{branch}' - - string: - name: ARTIFACT_VERSION - default: dev - description: "Used for overriding the ARTIFACT_VERSION" - scm: - - git-scm-gerrit - - triggers: - - gerrit: - server-name: 'gerrit.opnfv.org' - trigger-on: - - patchset-created-event: - exclude-drafts: 'false' - exclude-trivial-rebase: 'false' - exclude-no-code-change: 'true' - - 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: 'apex' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - disable-strict-forbidden-file-verification: 'true' - file-paths: - - compare-type: ANT - pattern: '*' - - compare-type: ANT - pattern: 'apex/*' - - compare-type: ANT - pattern: 'build/**' - - compare-type: ANT - pattern: 'lib/**' - - compare-type: ANT - pattern: 'config/**' - - compare-type: ANT - pattern: 'apex/build/**' - - compare-type: ANT - pattern: 'apex/common/**' - - compare-type: ANT - pattern: 'apex/inventory/**' - - compare-type: ANT - pattern: 'apex/network/**' - - compare-type: ANT - pattern: 'apex/overcloud/**' - - compare-type: ANT - pattern: 'apex/settings/**' - - compare-type: ANT - pattern: 'apex/undercloud/**' - - compare-type: ANT - pattern: 'apex/virtual/**' - forbidden-file-paths: - - compare-type: ANT - pattern: 'apex/tests/**' - - compare-type: ANT - pattern: 'docs/**' - - properties: - - logrotate-default - - throttle: - max-per-node: 3 - max-total: 10 - option: 'project' - - builders: - - description-setter: - description: "Built on $NODE_NAME" - - multijob: - name: basic - condition: SUCCESSFUL - projects: - - name: 'apex-verify-unit-tests-{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 - node-parameters: false - kill-phase-on: FAILURE - abort-all-job: true - git-revision: true - - multijob: - name: build - condition: SUCCESSFUL - projects: - - name: 'apex-build-{stream}' - current-parameters: false - predefined-parameters: | - ARTIFACT_VERSION=$ARTIFACT_VERSION - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: false - kill-phase-on: FAILURE - abort-all-job: true - git-revision: true - - multijob: - name: deploy-virtual - condition: SUCCESSFUL - projects: - - name: 'apex-virtual-{stream}' - current-parameters: false - predefined-parameters: | - ARTIFACT_VERSION=$ARTIFACT_VERSION - DEPLOY_SCENARIO={verify-scenario} - OPNFV_CLEAN=yes - 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: FAILURE - abort-all-job: true - git-revision: true - -# Verify Scenario Gate -- job-template: - name: 'apex-verify-gate-{stream}' - - node: '{virtual-slave}' - - concurrent: true - - project-type: 'multijob' - - parameters: - - apex-parameter: - gs-pathname: '{gs-pathname}/dev' - - project-parameter: - project: '{project}' - branch: '{branch}' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: "Used for overriding the GIT URL coming from parameters macro." - - string: - name: ARTIFACT_VERSION - default: dev - description: "Used for overriding the ARTIFACT_VERSION" - - scm: - - git-scm-gerrit - - triggers: - - gerrit: - server-name: 'gerrit.opnfv.org' - trigger-on: - - comment-added-contains-event: - comment-contains-value: '^Patch Set [0-9]+: Code-Review\+2.*start-gate-scenario:.*' - projects: - - project-compare-type: 'ANT' - project-pattern: 'apex' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - file-paths: - - compare-type: ANT - pattern: 'ci/**' - - compare-type: ANT - pattern: 'build/**' - - compare-type: ANT - pattern: 'lib/**' - - compare-type: ANT - pattern: 'config/**' - - compare-type: ANT - pattern: 'apex/**' - - properties: - - logrotate-default - - build-blocker: - use-build-blocker: true - block-level: 'NODE' - blocking-jobs: - - 'apex-verify.*' - - 'apex-virtual.*' - - throttle: - max-per-node: 1 - max-total: 10 - option: 'project' - - builders: - - multijob: - name: deploy-virtual - condition: SUCCESSFUL - projects: - - name: 'apex-deploy-virtual-{stream}' - current-parameters: false - predefined-parameters: | - ARTIFACT_VERSION=$ARTIFACT_VERSION - DEPLOY_SCENARIO=gate - OPNFV_CLEAN=yes - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - GERRIT_EVENT_COMMENT_TEXT=$GERRIT_EVENT_COMMENT_TEXT - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: true - # yamllint disable rule:line-length - - shell: | - echo DEPLOY_SCENARIO=$(echo $GERRIT_EVENT_COMMENT_TEXT | grep start-gate-scenario | grep -Eo 'os-.*') > detected_scenario - # yamllint enable rule:line-length - - inject: - properties-file: detected_scenario - - multijob: - name: functest-smoke - condition: SUCCESSFUL - projects: - - name: 'functest-apex-virtual-suite-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO=$DEPLOY_SCENARIO - FUNCTEST_MODE=tier - FUNCTEST_TIER=healthcheck - 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: NEVER - abort-all-job: true - git-revision: false - - job-template: name: 'apex-runner-cperf-{stream}' @@ -650,6 +315,8 @@ - job-template: name: 'apex-virtual-{stream}' + node: 'apex-virtual-master' + project-type: 'multijob' disabled: false @@ -878,7 +545,7 @@ predefined-parameters: DEPLOY_SCENARIO=$DEPLOY_SCENARIO kill-phase-on: NEVER - enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|nosdn-kvm|odl_l3-fdio)-ha/" + enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/" abort-all-job: false git-revision: false - multijob: @@ -1670,6 +1337,14 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false + - name: 'apex-os-odl-bgpvpn-noha-baremetal-master' + node-parameters: false + current-parameters: false + predefined-parameters: | + OPNFV_CLEAN=yes + kill-phase-on: NEVER + abort-all-job: true + git-revision: false - name: 'apex-os-ovn-nofeature-noha-baremetal-master' node-parameters: false current-parameters: false @@ -1871,22 +1546,6 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-odl-fdio-noha-baremetal-euphrates' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - name: 'apex-os-odl-fdio-ha-baremetal-euphrates' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - name: 'apex-os-nosdn-bar-ha-baremetal-euphrates' node-parameters: false current-parameters: false @@ -1959,22 +1618,6 @@ kill-phase-on: NEVER abort-all-job: true git-revision: false - - name: 'apex-os-odl-fdio_dvr-noha-baremetal-euphrates' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - - name: 'apex-os-odl-fdio_dvr-ha-baremetal-euphrates' - node-parameters: false - current-parameters: false - predefined-parameters: | - OPNFV_CLEAN=yes - kill-phase-on: NEVER - abort-all-job: true - git-revision: false - name: 'apex-os-nosdn-calipso-noha-baremetal-euphrates' node-parameters: false current-parameters: false @@ -1984,12 +1627,6 @@ abort-all-job: true git-revision: false - builder: - name: 'apex-unit-test' - builders: - - shell: - !include-raw: ./apex-unit-test.sh - -- builder: name: 'apex-upload-artifact' builders: - shell: @@ -2013,12 +1650,12 @@ - trigger: name: 'apex-master' triggers: - - timed: '0 3 1 1 7' + - timed: '0 0 1-31/2 * *' - trigger: name: 'apex-euphrates' triggers: - - timed: '0 12 * * *' + - timed: '0 0 2-30/2 * *' - trigger: name: 'apex-danube' diff --git a/jjb/apex/apex.yml.j2 b/jjb/apex/apex.yml.j2 index 31415499c..27a854dd7 100644 --- a/jjb/apex/apex.yml.j2 +++ b/jjb/apex/apex.yml.j2 @@ -3,9 +3,6 @@ name: 'apex' project: 'apex' jobs: - - 'apex-verify-{stream}' - - 'apex-verify-gate-{stream}' - - 'apex-verify-unit-tests-{stream}' - 'apex-runner-cperf-{stream}' - 'apex-virtual-{stream}' - 'apex-deploy-{platform}-{stream}' @@ -29,7 +26,7 @@ baremetal-slave: 'apex-baremetal-master' verify-scenario: 'os-odl-nofeature-ha' scenario_stream: 'master' - disable_daily: true + disable_daily: false - euphrates: &euphrates branch: 'stable/euphrates' gs-pathname: '/euphrates' @@ -38,7 +35,7 @@ baremetal-slave: 'apex-baremetal-master' verify-scenario: 'os-odl-nofeature-ha' scenario_stream: 'euphrates' - disable_daily: false + disable_daily: true - danube: &danube branch: 'stable/danube' gs-pathname: '/danube' @@ -62,332 +59,6 @@ - 'baremetal' - 'virtual' -# Unit Test -- job-template: - name: 'apex-verify-unit-tests-{stream}' - - node: '{build-slave}' - - concurrent: true - - parameters: - - apex-parameter: - gs-pathname: '{gs-pathname}' - - project-parameter: - project: '{project}' - branch: '{branch}' - - scm: - - git-scm-gerrit - - triggers: - - gerrit: - server-name: 'gerrit.opnfv.org' - trigger-on: - - patchset-created-event: - exclude-drafts: 'false' - exclude-trivial-rebase: 'false' - exclude-no-code-change: 'true' - - 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: 'apex' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - disable-strict-forbidden-file-verification: 'false' - file-paths: - - compare-type: ANT - pattern: 'apex/tests/**' - forbidden-file-paths: - - compare-type: ANT - pattern: '*' - - compare-type: ANT - pattern: 'apex/*' - - compare-type: ANT - pattern: 'build/**' - - compare-type: ANT - pattern: 'lib/**' - - compare-type: ANT - pattern: 'config/**' - - compare-type: ANT - pattern: 'apex/build/**' - - compare-type: ANT - pattern: 'apex/common/**' - - compare-type: ANT - pattern: 'apex/inventory/**' - - compare-type: ANT - pattern: 'apex/network/**' - - compare-type: ANT - pattern: 'apex/overcloud/**' - - compare-type: ANT - pattern: 'apex/settings/**' - - compare-type: ANT - pattern: 'apex/undercloud/**' - - compare-type: ANT - pattern: 'apex/virtual/**' - - properties: - - logrotate-default - - throttle: - max-per-node: 1 - max-total: 10 - option: 'project' - - builders: - - shell: - !include-raw-escape: ./apex-unit-test.sh - -# Verify -- job-template: - name: 'apex-verify-{stream}' - - node: '{virtual-slave}' - - concurrent: true - - project-type: 'multijob' - - parameters: - - apex-parameter: - gs-pathname: '{gs-pathname}/dev' - - project-parameter: - project: '{project}' - branch: '{branch}' - - string: - name: ARTIFACT_VERSION - default: dev - description: "Used for overriding the ARTIFACT_VERSION" - scm: - - git-scm-gerrit - - triggers: - - gerrit: - server-name: 'gerrit.opnfv.org' - trigger-on: - - patchset-created-event: - exclude-drafts: 'false' - exclude-trivial-rebase: 'false' - exclude-no-code-change: 'true' - - 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: 'apex' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - disable-strict-forbidden-file-verification: 'true' - file-paths: - - compare-type: ANT - pattern: '*' - - compare-type: ANT - pattern: 'apex/*' - - compare-type: ANT - pattern: 'build/**' - - compare-type: ANT - pattern: 'lib/**' - - compare-type: ANT - pattern: 'config/**' - - compare-type: ANT - pattern: 'apex/build/**' - - compare-type: ANT - pattern: 'apex/common/**' - - compare-type: ANT - pattern: 'apex/inventory/**' - - compare-type: ANT - pattern: 'apex/network/**' - - compare-type: ANT - pattern: 'apex/overcloud/**' - - compare-type: ANT - pattern: 'apex/settings/**' - - compare-type: ANT - pattern: 'apex/undercloud/**' - - compare-type: ANT - pattern: 'apex/virtual/**' - forbidden-file-paths: - - compare-type: ANT - pattern: 'apex/tests/**' - - compare-type: ANT - pattern: 'docs/**' - - properties: - - logrotate-default - - throttle: - max-per-node: 3 - max-total: 10 - option: 'project' - - builders: - - description-setter: - description: "Built on $NODE_NAME" - - multijob: - name: basic - condition: SUCCESSFUL - projects: - - name: 'apex-verify-unit-tests-{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 - node-parameters: false - kill-phase-on: FAILURE - abort-all-job: true - git-revision: true - - multijob: - name: build - condition: SUCCESSFUL - projects: - - name: 'apex-build-{stream}' - current-parameters: false - predefined-parameters: | - ARTIFACT_VERSION=$ARTIFACT_VERSION - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - node-parameters: false - kill-phase-on: FAILURE - abort-all-job: true - git-revision: true - - multijob: - name: deploy-virtual - condition: SUCCESSFUL - projects: - - name: 'apex-virtual-{stream}' - current-parameters: false - predefined-parameters: | - ARTIFACT_VERSION=$ARTIFACT_VERSION - DEPLOY_SCENARIO={verify-scenario} - OPNFV_CLEAN=yes - 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: FAILURE - abort-all-job: true - git-revision: true - -# Verify Scenario Gate -- job-template: - name: 'apex-verify-gate-{stream}' - - node: '{virtual-slave}' - - concurrent: true - - project-type: 'multijob' - - parameters: - - apex-parameter: - gs-pathname: '{gs-pathname}/dev' - - project-parameter: - project: '{project}' - branch: '{branch}' - - string: - name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - description: "Used for overriding the GIT URL coming from parameters macro." - - string: - name: ARTIFACT_VERSION - default: dev - description: "Used for overriding the ARTIFACT_VERSION" - - scm: - - git-scm-gerrit - - triggers: - - gerrit: - server-name: 'gerrit.opnfv.org' - trigger-on: - - comment-added-contains-event: - comment-contains-value: '^Patch Set [0-9]+: Code-Review\+2.*start-gate-scenario:.*' - projects: - - project-compare-type: 'ANT' - project-pattern: 'apex' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - file-paths: - - compare-type: ANT - pattern: 'ci/**' - - compare-type: ANT - pattern: 'build/**' - - compare-type: ANT - pattern: 'lib/**' - - compare-type: ANT - pattern: 'config/**' - - compare-type: ANT - pattern: 'apex/**' - - properties: - - logrotate-default - - build-blocker: - use-build-blocker: true - block-level: 'NODE' - blocking-jobs: - - 'apex-verify.*' - - 'apex-virtual.*' - - throttle: - max-per-node: 1 - max-total: 10 - option: 'project' - - builders: - - multijob: - name: deploy-virtual - condition: SUCCESSFUL - projects: - - name: 'apex-deploy-virtual-{stream}' - current-parameters: false - predefined-parameters: | - ARTIFACT_VERSION=$ARTIFACT_VERSION - DEPLOY_SCENARIO=gate - OPNFV_CLEAN=yes - GERRIT_BRANCH=$GERRIT_BRANCH - GERRIT_REFSPEC=$GERRIT_REFSPEC - GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER - GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE - GERRIT_EVENT_COMMENT_TEXT=$GERRIT_EVENT_COMMENT_TEXT - node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true - git-revision: true - # yamllint disable rule:line-length - - shell: | - echo DEPLOY_SCENARIO=$(echo $GERRIT_EVENT_COMMENT_TEXT | grep start-gate-scenario | grep -Eo 'os-.*') > detected_scenario - # yamllint enable rule:line-length - - inject: - properties-file: detected_scenario - - multijob: - name: functest-smoke - condition: SUCCESSFUL - projects: - - name: 'functest-apex-virtual-suite-{stream}' - current-parameters: false - predefined-parameters: | - DEPLOY_SCENARIO=$DEPLOY_SCENARIO - FUNCTEST_MODE=tier - FUNCTEST_TIER=healthcheck - 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: NEVER - abort-all-job: true - git-revision: false - - job-template: name: 'apex-runner-cperf-{stream}' @@ -518,6 +189,8 @@ - job-template: name: 'apex-virtual-{stream}' + node: 'apex-virtual-master' + project-type: 'multijob' disabled: false @@ -746,7 +419,7 @@ predefined-parameters: DEPLOY_SCENARIO=$DEPLOY_SCENARIO kill-phase-on: NEVER - enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|nosdn-kvm|odl_l3-fdio)-ha/" + enable-condition: "def m = '$DEPLOY_SCENARIO' ==~ /os-(nosdn-nofeature|odl-bgpvpn)-ha/" abort-all-job: false git-revision: false - multijob: @@ -1294,12 +967,6 @@ {% endfor -%} - builder: - name: 'apex-unit-test' - builders: - - shell: - !include-raw: ./apex-unit-test.sh - -- builder: name: 'apex-upload-artifact' builders: - shell: @@ -1323,12 +990,12 @@ - trigger: name: 'apex-master' triggers: - - timed: '0 3 1 1 7' + - timed: '0 0 1-31/2 * *' - trigger: name: 'apex-euphrates' triggers: - - timed: '0 12 * * *' + - timed: '0 0 2-30/2 * *' - trigger: name: 'apex-danube' diff --git a/jjb/apex/scenarios.yaml.hidden b/jjb/apex/scenarios.yaml.hidden index 3b6b48502..789ca7f7e 100644 --- a/jjb/apex/scenarios.yaml.hidden +++ b/jjb/apex/scenarios.yaml.hidden @@ -4,6 +4,7 @@ master: - 'os-odl-nofeature-ha' - 'os-odl-nofeature-noha' - 'os-odl-bgpvpn-ha' + - 'os-odl-bgpvpn-noha' - 'os-ovn-nofeature-noha' - 'os-nosdn-fdio-noha' - 'os-nosdn-fdio-ha' @@ -29,8 +30,6 @@ euphrates: - 'os-ovn-nofeature-noha' - 'os-nosdn-fdio-noha' - 'os-nosdn-fdio-ha' - - 'os-odl-fdio-noha' - - 'os-odl-fdio-ha' - 'os-nosdn-bar-ha' - 'os-nosdn-bar-noha' - 'os-nosdn-nofeature-ha-ipv6' @@ -40,8 +39,6 @@ euphrates: - 'os-nosdn-kvm_ovs_dpdk-ha' - 'os-odl-sfc-noha' - 'os-odl-sfc-ha' - - 'os-odl-fdio_dvr-noha' - - 'os-odl-fdio_dvr-ha' - 'os-nosdn-calipso-noha' danube: - 'os-nosdn-nofeature-noha' diff --git a/jjb/armband/armband-ci-jobs.yml b/jjb/armband/armband-ci-jobs.yml index 0202ef0e7..da3992ea8 100644 --- a/jjb/armband/armband-ci-jobs.yml +++ b/jjb/armband/armband-ci-jobs.yml @@ -158,34 +158,21 @@ build-step-failure-threshold: 'never' failure-threshold: 'never' unstable-threshold: 'FAILURE' - # 1.dovetail only master, based on D release - # 2.here the stream means the SUT stream, - # dovetail stream is defined in its own job - # 3.only proposed_tests testsuite here(refstack, ha, ipv6, bgpvpn) - # 4.not used for release criteria or compliance, + # 1.here the stream means the SUT stream, dovetail stream is defined in its own job + # 2.only debug testsuite here(refstack, ha, vping, ipv6, tempest, bgpvpn) + # 3.not used for release criteria or compliance, # only to debug the dovetail tool bugs with arm pods - # 5.only run against scenario os-(nosdn|odl)-(nofeature-bgpvpn)-ha - - conditional-step: - condition-kind: and - condition-operands: - - condition-kind: regex-match - regex: os-(nosdn|odl)-(nofeature|bgpvpn)-ha - label: '{scenario}' - - condition-kind: regex-match - regex: 'danube' - label: '{stream}' - steps: - - trigger-builds: - - project: 'dovetail-{installer}-{pod}-proposed_tests-master' - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO={scenario} - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' + - trigger-builds: + - project: 'dovetail-{installer}-{pod}-proposed_tests-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' # Armband uses Fuel's log collection project job, no need to duplicate - conditional-step: condition-kind: not @@ -263,7 +250,7 @@ - trigger: name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-master-trigger' triggers: - - timed: '0 16 * * 2,4,6' + - timed: '0 1 * * 2,4,6' - trigger: name: 'fuel-os-nosdn-nofeature-noha-armband-baremetal-master-trigger' triggers: @@ -271,14 +258,14 @@ - trigger: name: 'fuel-os-odl-nofeature-ha-armband-baremetal-master-trigger' triggers: - - timed: '0 16 * * 1,3,5,7' + - timed: '0 1 * * 1,3,5,7' # --------------------------------------------------------------------- # Enea Armband CI Baremetal Triggers running against euphrates branch # --------------------------------------------------------------------- - trigger: name: 'fuel-os-nosdn-nofeature-ha-armband-baremetal-euphrates-trigger' triggers: - - timed: '0 1 * * 2,4,6' + - timed: '' - trigger: name: 'fuel-os-nosdn-nofeature-noha-armband-baremetal-euphrates-trigger' triggers: @@ -286,7 +273,7 @@ - trigger: name: 'fuel-os-odl-nofeature-ha-armband-baremetal-euphrates-trigger' triggers: - - timed: '0 1 * * 1,3,5,7' + - timed: '' # -------------------------------------------------------------- # Enea Armband CI Virtual Triggers running against master branch # -------------------------------------------------------------- diff --git a/jjb/auto/auto.yml b/jjb/auto/auto.yml index fefa37626..c28dc5618 100644 --- a/jjb/auto/auto.yml +++ b/jjb/auto/auto.yml @@ -4,53 +4,5 @@ project: '{name}' - stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - jobs: - - 'auto-verify-{stream}' - -- job-template: - name: 'auto-verify-{stream}' - - disabled: '{obj:disabled}' - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-defaults' - - scm: - - git-scm-gerrit - - 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' - - builders: - - shell: | - echo "Nothing to verify!" + - '{project}-verify-basic' diff --git a/jjb/availability/availability.yml b/jjb/availability/availability.yml index a8f629734..2d3473499 100644 --- a/jjb/availability/availability.yml +++ b/jjb/availability/availability.yml @@ -1,64 +1,8 @@ --- -################################################### -# All the jobs except verify have been removed! -# They will only be enabled on request by projects! -################################################### - project: name: availability project: '{name}' jobs: - - 'availability-verify-{stream}' - - stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: 'false' - - euphrates: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: 'false' - -- job-template: - name: 'availability-verify-{stream}' - - disabled: '{obj:disabled}' - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' - - scm: - - git-scm-gerrit - - 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' - - builders: - - shell: | - echo "Nothing to verify!" + - '{project}-verify-basic' diff --git a/jjb/barometer/barometer-build.sh b/jjb/barometer/barometer-build.sh index e40841bc2..5f78aae7a 100644 --- a/jjb/barometer/barometer-build.sh +++ b/jjb/barometer/barometer-build.sh @@ -11,6 +11,7 @@ echo cd ci ./install_dependencies.sh ./build_rpm.sh +cp utility/rpms_list $WORKSPACE cd $WORKSPACE # save information regarding artifact into file diff --git a/jjb/barometer/barometer-upload-artifact.sh b/jjb/barometer/barometer-upload-artifact.sh index 0f639b5d9..f05dc2af8 100644 --- a/jjb/barometer/barometer-upload-artifact.sh +++ b/jjb/barometer/barometer-upload-artifact.sh @@ -2,7 +2,7 @@ set -o nounset set -o pipefail -RPM_LIST=$WORKSPACE/ci/utilities/rpms_list +RPM_LIST=$WORKSPACE/rpms_list RPM_WORKDIR=$WORKSPACE/rpmbuild RPM_DIR=$RPM_WORKDIR/RPMS/x86_64/ cd $WORKSPACE/ diff --git a/jjb/ci_gate_security/anteater-clone-all-repos.sh b/jjb/ci_gate_security/anteater-clone-all-repos.sh deleted file mode 100755 index 8a9e73d85..000000000 --- a/jjb/ci_gate_security/anteater-clone-all-repos.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# SPDX-license-identifier: Apache-2.0 -set -o errexit -set -o pipefail -set -o nounset -export PATH=$PATH:/usr/local/bin/ - - -#WORKSPACE="$(pwd)" - -cd $WORKSPACE -if [ ! -d "$WORKSPACE/allrepos" ]; then - mkdir $WORKSPACE/allrepos -fi - -cd $WORKSPACE/allrepos - -declare -a PROJECT_LIST -EXCLUDE_PROJECTS="All-Projects|All-Users|securedlab" - -PROJECT_LIST=($(ssh gerrit.opnfv.org -p 29418 gerrit ls-projects | egrep -v $EXCLUDE_PROJECTS)) -echo "PROJECT_LIST=(${PROJECT_LIST[*]})" > $WORKSPACE/opnfv-projects.sh - -for PROJECT in ${PROJECT_LIST[@]}; do - echo "> Cloning $PROJECT" - if [ ! -d "$PROJECT" ]; then - git clone "https://gerrit.opnfv.org/gerrit/$PROJECT.git" - else - pushd "$PROJECT" > /dev/null - git pull -f - popd > /dev/null - fi -done diff --git a/jjb/ci_gate_security/anteater-security-audit-weekly.sh b/jjb/ci_gate_security/anteater-security-audit-weekly.sh index 11909636a..6caa13117 100644 --- a/jjb/ci_gate_security/anteater-security-audit-weekly.sh +++ b/jjb/ci_gate_security/anteater-security-audit-weekly.sh @@ -1,37 +1,50 @@ #!/bin/bash # SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017 The Linux Foundation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +ANTEATER_SCAN_PATCHSET="${ANTEATER_SCAN_PATCHSET:-true}" + +cd $WORKSPACE +REPORTDIR='.reports' +mkdir -p $REPORTDIR +# Ensure any user can read the reports directory +chmod 777 $REPORTDIR + +ANTEATER_FILES="--patchset /home/opnfv/anteater/$PROJECT/patchset" + +if [[ "$ANTEATER_SCAN_PATCHSET" == "true" ]]; then + echo "Generating patchset file to list changed files" + git diff HEAD^1 --name-only | sed "s#^#/home/opnfv/anteater/$PROJECT/#" > $WORKSPACE/patchset + echo "Changed files are" + echo "--------------------------------------------------------" + cat $WORKSPACE/patchset + echo "--------------------------------------------------------" +else + echo "Checking full project $PROJECT" + ANTEATER_FILES="--path /home/opnfv/anteater/$PROJECT" +fi + +vols="-v $WORKSPACE:/home/opnfv/anteater/$PROJECT -v $WORKSPACE/$REPORTDIR:/home/opnfv/anteater/$REPORTDIR" +envs="-e PROJECT=$PROJECT" -echo "--------------------------------------------------------" -vols="-v $WORKSPACE/allrepos/:/home/opnfv/anteater/allrepos/" echo "Pulling releng-anteater docker image" echo "--------------------------------------------------------" docker pull opnfv/releng-anteater echo "--------------------------------------------------------" -cmd="docker run -id $vols opnfv/releng-anteater /bin/bash" -echo "Running docker command $cmd" -container_id=$($cmd) -echo "Container ID is $container_id" -source $WORKSPACE/opnfv-projects.sh -for project in "${PROJECT_LIST[@]}" - -do - cmd="/home/opnfv/venv/bin/anteater --project testproj --path /home/opnfv/anteater/allrepos/$project" - echo "Executing command inside container" - echo "$cmd" - echo "--------------------------------------------------------" - docker exec $container_id $cmd > $WORKSPACE/"$project".securityaudit.log 2>&1 -done +cmd="docker run -i $envs $vols --rm opnfv/releng-anteater \ +/home/opnfv/venv/bin/anteater --project $PROJECT $ANTEATER_FILES" +echo "Running docker container" +echo "$cmd" +$cmd > $WORKSPACE/securityaudit.log 2>&1 exit_code=$? echo "--------------------------------------------------------" -echo "Stopping docker container with ID $container_id" -docker stop $container_id - - -#gsutil cp $WORKSPACE/securityaudit.log \ -# gs://$GS_URL/$PROJECT-securityaudit-weekly.log 2>&1 -# -#gsutil -m setmeta \ -# -h "Content-Type:text/html" \ -# -h "Cache-Control:private, max-age=0, no-transform" \ -# gs://$GS_URL/$PROJECT-securityaudit-weekly.log > /dev/null 2>&1 +echo "Docker container exited with code: $exit_code" +echo "--------------------------------------------------------" +exit 0 diff --git a/jjb/ci_gate_security/opnfv-ci-gate-security.yml b/jjb/ci_gate_security/opnfv-ci-gate-security.yml index e09339a4b..d54aebea4 100644 --- a/jjb/ci_gate_security/opnfv-ci-gate-security.yml +++ b/jjb/ci_gate_security/opnfv-ci-gate-security.yml @@ -9,9 +9,76 @@ project: anteaterfw + repo: + - apex + - apex-os-net-config + - apex-puppet-tripleo + - apex-tripleo-heat-templates + - armband + - auto + - availability + - bamboo + - barometer + - bottlenecks + - calipso + - clover + - compass-containers + - compass4nfv + - conductor + - container4nfv + - copper + - cperf + - daisy + - doctor + - domino + - dovetail + - dpacc + - enfv + - fastpathmetrics + - fds + - fuel + - functest + - ipv6 + - joid + - kvmfornfv + - models + - moon + - multisite + - netready + - nfvbench + - octopus + - onosfw + - openretriever + - opera + - opnfvdocs + - orchestra + - ovn4nfv + - ovno + - ovsnfv + - parser + - pharos + - pharos-tools + - promise + - qtip + - releng + - releng-anteater + - releng-testresults + - releng-utils + - releng-xci + - samplevnf + - sdnvpn + - securityscanning + - sfc + - snaps + - stor4nfv + - storperf + - ves + - vswitchperf + - yardstick + jobs: - 'opnfv-security-audit-verify-{stream}' - - 'opnfv-security-audit-weekly-{stream}' + - 'opnfv-security-audit-{repo}-weekly-{stream}' stream: - master: @@ -23,18 +90,26 @@ # job templates ######################## - job-template: - name: 'opnfv-security-audit-weekly-{stream}' + name: 'opnfv-security-audit-{repo}-weekly-{stream}' disabled: '{obj:disabled}' parameters: - - label: - name: SLAVE_LABEL - default: 'ericsson-build3' - description: 'Slave label on Jenkins' + - ericsson-build3-defaults + - string: + name: ANTEATER_SCAN_PATCHSET + default: "false" + description: "Have anteater scan patchsets (true) or full project (false)" - project-parameter: - project: releng + project: '{repo}' branch: '{branch}' + - string: + name: GERRIT_REFSPEC + default: 'refs/heads/{stream}' + description: "Default Gerrit ref git HEAD should point to" + + scm: + - git-scm-gerrit triggers: - timed: '@weekly' @@ -42,6 +117,13 @@ builders: - anteater-security-audit-weekly + publishers: + # defined in jjb/global/releng-macros.yml + - 'email-{repo}-ptl': + subject: 'OPNFV Security Scan Result: {repo}' + - workspace-cleanup: + fail-build: false + - job-template: name: 'opnfv-security-audit-verify-{stream}' @@ -81,7 +163,7 @@ comment-contains-value: 'reverify' projects: - project-compare-type: 'REG_EXP' - project-pattern: 'apex|armband|bamboo|barometer|bottlenecks|calipso|compass4nfv|conductor|cooper|cperf|daisy|doctor|dovetail|dpacc|enfv|escalator|fds|fuel|functest|octopus|pharos|releng|sandbox|yardstick' + project-pattern: 'apex|armband|bamboo|barometer|bottlenecks|calipso|compass4nfv|conductor|copper|cperf|daisy|doctor|dovetail|dpacc|enfv|escalator|fds|fuel|functest|octopus|pharos|releng|sandbox|yardstick|infra|ipv6|kvmfornfv|lsoapi|models|moon|multisite|netready' branches: - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' @@ -117,12 +199,8 @@ - shell: !include-raw: ./anteater-report-to-gerrit.sh -# yamllint disable rule:indentation - builder: name: anteater-security-audit-weekly builders: - shell: - !include-raw: - - ./anteater-clone-all-repos.sh - - ./anteater-security-audit-weekly.sh -# yamllint enable rule:indentation + !include-raw: ./anteater-security-audit-weekly.sh diff --git a/jjb/compass4nfv/compass-ci-jobs.yml b/jjb/compass4nfv/compass-ci-jobs.yml index 4adfc2a3f..0790b83ca 100644 --- a/jjb/compass4nfv/compass-ci-jobs.yml +++ b/jjb/compass4nfv/compass-ci-jobs.yml @@ -13,7 +13,7 @@ gs-pathname: '' ppa-pathname: '/{stream}' disabled: false - openstack-version: ocata + openstack-version: pike euphrates: &euphrates stream: euphrates branch: 'stable/{stream}' @@ -54,7 +54,7 @@ # master # ------------------------------- - baremetal-centos: - slave-label: 'intel-pod8' + slave-label: 'intel-pod17' os-version: 'centos7' <<: *master # ------------------------------- @@ -120,6 +120,9 @@ - 'os-nosdn-ovs_dpdk-noha': disabled: false auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger' + - 'os-nosdn-bar-ha': + disabled: false + auto-trigger-name: 'compass-{scenario}-{pod}-{stream}-trigger' jobs: - 'compass-{scenario}-{pod}-daily-{stream}' @@ -207,24 +210,21 @@ unstable-threshold: 'FAILURE' # dovetail only master by now, not sync with A/B/C branches # here the stream means the SUT stream, dovetail stream is defined in its own job - # only run on os-(nosdn|odl_l2|onos|odl_l3)-nofeature-ha scenario - # run against SUT master branch, dovetail docker image with latest tag - # run against SUT danube branch, dovetail docker image with latest tag(Monday and Sunday) - # run against SUT danube branch, dovetail docker image with cvp.X.X.X tag(Tuesday, Thursday, Friday and Saturday) + # only run on os-(nosdn|odl_l2|odl_l3)-nofeature-ha scenario + # run against SUT master/euphrates branch, dovetail docker image with latest tag(Monday, Tuesday) + # run against SUT master/euphrates branch, dovetail docker image with cvp.X.X.X tag(Thursday, Friday) + # run against SUT danube branch, dovetail docker image with cvp.X.X.X tag on huawei-pod7 - conditional-step: condition-kind: and condition-operands: - condition-kind: regex-match - regex: danube - label: '{stream}' - - condition-kind: regex-match - regex: os-(nosdn|odl_l2|odl_l3)-nofeature-ha + regex: os-(nosdn|odl_l3)-nofeature-ha label: '{scenario}' - condition-kind: day-of-week day-selector: select-days days: MON: true - SUN: true + TUES: true use-build-time: true steps: - trigger-builds: @@ -243,19 +243,13 @@ condition-kind: and condition-operands: - condition-kind: regex-match - regex: danube - label: '{stream}' - - condition-kind: regex-match - regex: os-(nosdn|odl_l2|odl_l3)-nofeature-ha + regex: os-(nosdn|odl_l3)-nofeature-ha label: '{scenario}' - condition-kind: day-of-week day-selector: select-days days: - TUES: true - WED: true THURS: true FRI: true - SAT: true use-build-time: true steps: - trigger-builds: @@ -273,27 +267,6 @@ condition-kind: and condition-operands: - condition-kind: regex-match - regex: os-(nosdn|odl_l2|odl_l3)-nofeature-ha - label: '{scenario}' - - condition-kind: regex-match - regex: master - label: '{stream}' - steps: - - trigger-builds: - - project: 'dovetail-compass-{pod}-proposed_tests-{stream}' - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO={scenario} - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' - - conditional-step: - condition-kind: and - condition-operands: - - condition-kind: regex-match regex: os-nosdn-nofeature-ha label: '{scenario}' steps: @@ -333,7 +306,7 @@ - build-name: name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO' - timeout: - timeout: 240 + timeout: 360 abort: true - fix-workspace-permissions @@ -453,6 +426,10 @@ name: 'compass-k8-nosdn-nofeature-ha-baremetal-centos-master-trigger' triggers: - timed: '' +- trigger: + name: 'compass-os-nosdn-bar-ha-baremetal-centos-master-trigger' + triggers: + - timed: '' # '0 19 * * *' # ---------------------------- # noha-baremetal-centos-master @@ -533,6 +510,10 @@ name: 'compass-k8-nosdn-nofeature-ha-huawei-pod7-danube-trigger' triggers: - timed: '' +- trigger: + name: 'compass-os-nosdn-bar-ha-huawei-pod7-danube-trigger' + triggers: + - timed: '' # '0 19 * * *' # ---------------------------- # noha-huawei-pod7-danube @@ -568,7 +549,7 @@ - trigger: name: 'compass-os-nosdn-nofeature-ha-baremetal-master-trigger' triggers: - - timed: '0 20 * * *' + - timed: '0 20 2-30/2 * *' - trigger: name: 'compass-os-nosdn-openo-ha-baremetal-master-trigger' triggers: @@ -580,7 +561,7 @@ - trigger: name: 'compass-os-odl_l3-nofeature-ha-baremetal-master-trigger' triggers: - - timed: '0 18 * * *' + - timed: '0 18 1-29/2 * *' - trigger: name: 'compass-os-onos-nofeature-ha-baremetal-master-trigger' triggers: @@ -596,15 +577,15 @@ - trigger: name: 'compass-os-odl_l2-moon-ha-baremetal-master-trigger' triggers: - - timed: '0 12 * * *' + - timed: '0 12 2-30/2 * *' - trigger: name: 'compass-os-nosdn-kvm-ha-baremetal-master-trigger' triggers: - - timed: '0 14 * * *' + - timed: '0 14 1-29/2 * *' - trigger: name: 'compass-os-nosdn-ovs_dpdk-ha-baremetal-master-trigger' triggers: - - timed: '0 16 * * *' + - timed: '0 16 2-30/2 * *' - trigger: name: 'compass-k8-nosdn-nofeature-ha-baremetal-master-trigger' triggers: @@ -612,7 +593,11 @@ - trigger: name: 'compass-os-odl-sfc-ha-baremetal-master-trigger' triggers: - - timed: '0 10 * * *' + - timed: '0 10 1-29/2 * *' +- trigger: + name: 'compass-os-nosdn-bar-ha-baremetal-master-trigger' + triggers: + - timed: '0 2 2-30/2 * *' # --------------------- # noha-baremetal-master @@ -648,7 +633,7 @@ - trigger: name: 'compass-os-nosdn-nofeature-ha-baremetal-euphrates-trigger' triggers: - - timed: '0 1 * * *' + - timed: '0 1 1-29/2 * *' - trigger: name: 'compass-os-nosdn-openo-ha-baremetal-euphrates-trigger' triggers: @@ -660,7 +645,7 @@ - trigger: name: 'compass-os-odl_l3-nofeature-ha-baremetal-euphrates-trigger' triggers: - - timed: '0 21 * * *' + - timed: '0 21 2-30/2 * *' - trigger: name: 'compass-os-onos-nofeature-ha-baremetal-euphrates-trigger' triggers: @@ -676,15 +661,15 @@ - trigger: name: 'compass-os-odl_l2-moon-ha-baremetal-euphrates-trigger' triggers: - - timed: '0 5 * * *' + - timed: '0 5 1-29/2 * *' - trigger: name: 'compass-os-nosdn-kvm-ha-baremetal-euphrates-trigger' triggers: - - timed: '0 13 * * *' + - timed: '0 13 2-30/2 * *' - trigger: name: 'compass-os-nosdn-ovs_dpdk-ha-baremetal-euphrates-trigger' triggers: - - timed: '0 9 * * *' + - timed: '0 9 1-29/2 * *' - trigger: name: 'compass-k8-nosdn-nofeature-ha-baremetal-euphrates-trigger' triggers: @@ -692,7 +677,11 @@ - trigger: name: 'compass-os-odl-sfc-ha-baremetal-euphrates-trigger' triggers: - - timed: '0 17 * * *' + - timed: '0 17 2-30/2 * *' +- trigger: + name: 'compass-os-nosdn-bar-ha-baremetal-euphrates-trigger' + triggers: + - timed: '0 21 1-29/2 * *' # --------------------- # noha-baremetal-euphrates @@ -740,7 +729,7 @@ - trigger: name: 'compass-os-odl_l3-nofeature-ha-virtual-master-trigger' triggers: - - timed: '0 19 * * *' + - timed: '0 19 2-30/2 * *' - trigger: name: 'compass-os-onos-nofeature-ha-virtual-master-trigger' triggers: @@ -756,15 +745,15 @@ - trigger: name: 'compass-os-odl_l2-moon-ha-virtual-master-trigger' triggers: - - timed: '30 12 * * *' + - timed: '30 12 1-29/2 * *' - trigger: name: 'compass-os-nosdn-kvm-ha-virtual-master-trigger' triggers: - - timed: '0 13 * * *' + - timed: '0 13 1-29/2 * *' - trigger: name: 'compass-os-nosdn-ovs_dpdk-ha-virtual-master-trigger' triggers: - - timed: '0 17 * * *' + - timed: '0 17 2-30/2 * *' - trigger: name: 'compass-k8-nosdn-nofeature-ha-virtual-master-trigger' triggers: @@ -772,7 +761,11 @@ - trigger: name: 'compass-os-odl-sfc-ha-virtual-master-trigger' triggers: - - timed: '0 16 * * *' + - timed: '0 16 2-30/2 * *' +- trigger: + name: 'compass-os-nosdn-bar-ha-virtual-master-trigger' + triggers: + - timed: '0 17 1-29/2 * *' # ------------------- # noha-virtual-master @@ -780,27 +773,27 @@ - trigger: name: 'compass-os-nosdn-kvm-noha-virtual-master-trigger' triggers: - - timed: '30 13 * * *' + - timed: '30 13 1-29/2 * *' - trigger: name: 'compass-os-nosdn-nofeature-noha-virtual-master-trigger' triggers: - - timed: '0 14 * * *' + - timed: '0 14 2-30/2 * *' - trigger: name: 'compass-os-odl_l3-nofeature-noha-virtual-master-trigger' triggers: - - timed: '0 15 * * *' + - timed: '0 15 1-29/2 * *' - trigger: name: 'compass-os-odl_l2-moon-noha-virtual-master-trigger' triggers: - - timed: '0 18 * * *' + - timed: '0 18 2-30/2 * *' - trigger: name: 'compass-os-odl-sfc-noha-virtual-master-trigger' triggers: - - timed: '0 20 * * *' + - timed: '0 20 1-29/2 * *' - trigger: name: 'compass-os-nosdn-ovs_dpdk-noha-virtual-master-trigger' triggers: - - timed: '0 11 * * *' + - timed: '0 11 2-30/2 * *' # ----------------- # ha-virtual-euphrates @@ -808,7 +801,7 @@ - trigger: name: 'compass-os-nosdn-nofeature-ha-virtual-euphrates-trigger' triggers: - - timed: '0 23 * * *' + - timed: '0 23 1-29/2 * *' - trigger: name: 'compass-os-nosdn-openo-ha-virtual-euphrates-trigger' triggers: @@ -820,7 +813,7 @@ - trigger: name: 'compass-os-odl_l3-nofeature-ha-virtual-euphrates-trigger' triggers: - - timed: '0 22 * * *' + - timed: '0 22 2-30/2 * *' - trigger: name: 'compass-os-onos-nofeature-ha-virtual-euphrates-trigger' triggers: @@ -836,23 +829,27 @@ - trigger: name: 'compass-os-odl_l2-moon-ha-virtual-euphrates-trigger' triggers: - - timed: '0 20 * * *' + - timed: '0 20 1-29/2 * *' - trigger: name: 'compass-os-nosdn-kvm-ha-virtual-euphrates-trigger' triggers: - - timed: '0 16 * * *' + - timed: '0 16 2-30/2 * *' - trigger: name: 'compass-os-nosdn-ovs_dpdk-ha-virtual-euphrates-trigger' triggers: - - timed: '0 14 * * *' + - timed: '0 14 1-29/2 * *' - trigger: name: 'compass-os-odl-sfc-ha-virtual-euphrates-trigger' triggers: - - timed: '0 18 * * *' + - timed: '0 18 2-30/2 * *' - trigger: name: 'compass-k8-nosdn-nofeature-ha-virtual-euphrates-trigger' triggers: - - timed: '5 1 * * *' + - timed: '5 1 2-30/2 * *' +- trigger: + name: 'compass-os-nosdn-bar-ha-virtual-euphrates-trigger' + triggers: + - timed: '0 19 1-29/2 * *' # ------------------- # noha-virtual-euphrates @@ -860,24 +857,24 @@ - trigger: name: 'compass-os-nosdn-kvm-noha-virtual-euphrates-trigger' triggers: - - timed: '0 15 * * *' + - timed: '0 15 1-29/2 * *' - trigger: name: 'compass-os-nosdn-nofeature-noha-virtual-euphrates-trigger' triggers: - - timed: '0 17 * * *' + - timed: '0 17 2-30/2 * *' - trigger: name: 'compass-os-odl_l3-nofeature-noha-virtual-euphrates-trigger' triggers: - - timed: '0 23 * * *' + - timed: '0 23 1-29/2 * *' - trigger: name: 'compass-os-odl_l2-moon-noha-virtual-euphrates-trigger' triggers: - - timed: '0 21 * * *' + - timed: '0 21 2-30/2 * *' - trigger: name: 'compass-os-odl-sfc-noha-virtual-euphrates-trigger' triggers: - - timed: '0 19 * * *' + - timed: '0 19 1-29/2 * *' - trigger: name: 'compass-os-nosdn-ovs_dpdk-noha-virtual-euphrates-trigger' triggers: - - timed: '0 12 * * *' + - timed: '0 12 2-30/2 * *' diff --git a/jjb/compass4nfv/compass-deploy.sh b/jjb/compass4nfv/compass-deploy.sh index ad069a57c..ac649b992 100644 --- a/jjb/compass4nfv/compass-deploy.sh +++ b/jjb/compass4nfv/compass-deploy.sh @@ -45,10 +45,6 @@ else export NETWORK_CONF_FILE=network.yml fi -if [[ "$NODE_NAME" =~ "intel-pod8" ]]; then - export OS_MGMT_NIC=em4 -fi - if [[ "$NODE_NAME" =~ "-virtual" ]]; then export NETWORK_CONF=$CONFDIR/vm_environment/$NODE_NAME/${NETWORK_CONF_FILE} export DHA_CONF=$CONFDIR/vm_environment/${DEPLOY_SCENARIO}.yml @@ -58,7 +54,11 @@ if [[ "$NODE_NAME" =~ "-virtual" ]]; then export VIRT_NUMBER=2 fi else - export INSTALL_NIC=eth1 + if [[ "$NODE_NAME" =~ "intel-pod17" ]]; then + export INSTALL_NIC=eno2 + else + export INSTALL_NIC=eth1 + fi export NETWORK_CONF=$CONFDIR/hardware_environment/$NODE_NAME/${NETWORK_CONF_FILE} export DHA_CONF=$CONFDIR/hardware_environment/$NODE_NAME/${DEPLOY_SCENARIO}.yml fi diff --git a/jjb/compass4nfv/compass-verify-jobs.yml b/jjb/compass4nfv/compass-verify-jobs.yml index 6927145c8..7024dad58 100644 --- a/jjb/compass4nfv/compass-verify-jobs.yml +++ b/jjb/compass4nfv/compass-verify-jobs.yml @@ -16,13 +16,13 @@ disabled: false openstack-version: 'ocata' branch-type: 'master' - - danube: + - euphrates: branch: 'stable/{stream}' gs-pathname: '/{stream}' ppa-pathname: '/{stream}' disabled: false - openstack-version: 'newton' - branch-type: 'branch' + openstack-version: 'ocata' + branch-type: 'master' distro: - 'xenial': @@ -75,7 +75,7 @@ wrappers: - ssh-agent-wrapper - timeout: - timeout: 240 + timeout: 360 fail: true - fix-workspace-permissions diff --git a/jjb/conductor/conductor.yml b/jjb/conductor/conductor.yml index 3e5e5dedb..8a128da37 100644 --- a/jjb/conductor/conductor.yml +++ b/jjb/conductor/conductor.yml @@ -1,64 +1,8 @@ --- -################################################### -# All the jobs except verify have been removed! -# They will only be enabled on request by projects! -################################################### - project: name: conductor project: '{name}' jobs: - - 'conductor-verify-{stream}' - - stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - euphrates: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - -- job-template: - name: 'conductor-verify-{stream}' - - disabled: '{obj:disabled}' - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' - - scm: - - git-scm-gerrit - - 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' - - builders: - - shell: | - echo "Nothing to verify!" + - '{project}-verify-basic' diff --git a/jjb/container4nfv/container4nfv-project.yml b/jjb/container4nfv/container4nfv-project.yml index 9e2d313c8..03bbb655e 100644 --- a/jjb/container4nfv/container4nfv-project.yml +++ b/jjb/container4nfv/container4nfv-project.yml @@ -10,7 +10,8 @@ jobs: - 'container4nfv-verify-{stream}' - - 'container4nfv-daily-{stream}' + - 'container4nfv-daily-upload-{stream}' + - 'container4nfv-daily-deploy-{stream}' stream: - master: @@ -71,9 +72,34 @@ cd $WORKSPACE/ci ./build.sh +- job-template: + name: 'container4nfv-daily-upload-{stream}' + + disabled: '{obj:disabled}' + + concurrent: false + + scm: + - git-scm + + wrappers: + - fix-workspace-permissions + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + - 'container4nfv-defaults': + gs-pathname: '{gs-pathname}' + + builders: + - shell: | + cd $WORKSPACE/ci + ./upload.sh - job-template: - name: 'container4nfv-daily-{stream}' + name: 'container4nfv-daily-deploy-{stream}' project-type: freestyle @@ -84,6 +110,9 @@ properties: - logrotate-default + wrappers: + - fix-workspace-permissions + parameters: - project-parameter: project: '{project}' @@ -112,3 +141,14 @@ - shell: | cd $WORKSPACE/ci ./deploy.sh + +################### +# parameter macros +################### +- parameter: + name: 'container4nfv-defaults' + parameters: + - string: + name: GS_URL + default: artifacts.opnfv.org/$PROJECT{gs-pathname} + description: "URL to Google Storage." diff --git a/jjb/copper/copper.yml b/jjb/copper/copper.yml index d9ac0b85a..620aefd9c 100644 --- a/jjb/copper/copper.yml +++ b/jjb/copper/copper.yml @@ -1,69 +1,8 @@ --- -################################################### -# All the jobs except verify have been removed! -# They will only be enabled on request by projects! -################################################### - project: name: copper project: '{name}' jobs: - - 'copper-verify-{stream}' - - stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - euphrates: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - -- job-template: - name: 'copper-verify-{stream}' - - disabled: '{obj:disabled}' - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' - - scm: - - git-scm-gerrit - - 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' - - builders: - - shell: | - #!/bin/bash - set -o errexit - set -o nounset - set -o pipefail - - # shellcheck -f tty tests/*.sh + - '{project}-verify-basic' diff --git a/jjb/daisy4nfv/daisy-daily-jobs.yml b/jjb/daisy4nfv/daisy-daily-jobs.yml index 090d2e1f2..6f4643ac8 100644 --- a/jjb/daisy4nfv/daisy-daily-jobs.yml +++ b/jjb/daisy4nfv/daisy-daily-jobs.yml @@ -50,7 +50,9 @@ - baremetal: slave-label: zte-pod3 <<: *master - + - zte-pod9: + slave-label: zte-pod9 + <<: *master # ------------------------------- # None-CI PODs # ------------------------------- @@ -68,6 +70,9 @@ # ODL_L3 scenarios - 'os-odl-nofeature-ha': auto-trigger-name: 'daisy-{scenario}-{pod}-daily-{stream}-trigger' + # ovs_dpdk scenarios + - 'os-nosdn-ovs_dpdk-noha': + auto-trigger-name: 'daisy-{scenario}-{pod}-daily-{stream}-trigger' jobs: - '{project}-{scenario}-{pod}-daily-{stream}' @@ -124,15 +129,21 @@ - trigger-builds: - project: 'daisy-deploy-{pod}-daily-{stream}' current-parameters: false - predefined-parameters: + predefined-parameters: | DEPLOY_SCENARIO={scenario} + INSTALLER_VERSION={stream} + UPSTREAM_JOB_NAME=$JOB_NAME + UPSTREAM_BUILD_ID=$BUILD_ID same-node: true block: true - trigger-builds: - project: 'functest-daisy-{pod}-daily-{stream}' current-parameters: false - predefined-parameters: + predefined-parameters: | DEPLOY_SCENARIO={scenario} + INSTALLER_VERSION={stream} + UPSTREAM_JOB_NAME=$JOB_NAME + UPSTREAM_BUILD_ID=$BUILD_ID same-node: true block: true block-thresholds: @@ -152,8 +163,11 @@ - trigger-builds: - project: 'yardstick-daisy-{pod}-daily-{stream}' current-parameters: false - predefined-parameters: + predefined-parameters: | DEPLOY_SCENARIO={scenario} + INSTALLER_VERSION={stream} + UPSTREAM_JOB_NAME=$JOB_NAME + UPSTREAM_BUILD_ID=$BUILD_ID block: true same-node: true block-thresholds: @@ -209,10 +223,13 @@ builders: - description-setter: description: "POD: $NODE_NAME" + - 'track-begin-timestamp' - shell: !include-raw-escape: ./daisy4nfv-download-artifact.sh - shell: !include-raw-escape: ./daisy-deploy.sh + publishers: + - 'report-provision-result' ######################## # trigger macros @@ -224,7 +241,7 @@ - trigger: name: 'daisy-os-nosdn-nofeature-ha-baremetal-daily-master-trigger' triggers: - - timed: '0 18 * * *' + - timed: '0 12 * * *' # Basic NOHA Scenarios - trigger: name: 'daisy-os-nosdn-nofeature-noha-baremetal-daily-master-trigger' @@ -234,7 +251,12 @@ - trigger: name: 'daisy-os-odl-nofeature-ha-baremetal-daily-master-trigger' triggers: - - timed: '0 12 * * *' + - timed: '0 18 * * *' +# ovs_dpdk Scenarios +- trigger: + name: 'daisy-os-nosdn-ovs_dpdk-noha-baremetal-daily-master-trigger' + triggers: + - timed: '' # ---------------------------------------------- # Triggers for job running on daisy-virtual against master branch @@ -254,6 +276,11 @@ name: 'daisy-os-odl-nofeature-ha-virtual-daily-master-trigger' triggers: - timed: '0 12 * * *' +# ovs_dpdk Scenarios +- trigger: + name: 'daisy-os-nosdn-ovs_dpdk-noha-virtual-daily-master-trigger' + triggers: + - timed: '' # ---------------------------------------------- # Triggers for job running on daisy-baremetal against euphrates branch @@ -273,6 +300,11 @@ name: 'daisy-os-odl-nofeature-ha-baremetal-daily-euphrates-trigger' triggers: - timed: '0 20 * * *' +# ovs_dpdk Scenarios +- trigger: + name: 'daisy-os-nosdn-ovs_dpdk-noha-baremetal-daily-euphrates-trigger' + triggers: + - timed: '' # ---------------------------------------------- # Triggers for job running on daisy-virtual against euphrates branch @@ -292,3 +324,32 @@ name: 'daisy-os-odl-nofeature-ha-virtual-daily-euphrates-trigger' triggers: - timed: '0 20 * * *' +# ovs_dpdk Scenarios +- trigger: + name: 'daisy-os-nosdn-ovs_dpdk-noha-virtual-daily-euphrates-trigger' + triggers: + - timed: '' + +# ---------------------------------------------- +# ZTE POD9 Triggers running against master branch +# ---------------------------------------------- +# ovs_dpdk Scenarios +- trigger: + name: 'daisy-os-nosdn-ovs_dpdk-noha-zte-pod9-daily-master-trigger' + triggers: + - timed: '0 10 * * *' +# Basic HA Scenarios +- trigger: + name: 'daisy-os-nosdn-nofeature-ha-zte-pod9-daily-master-trigger' + triggers: + - timed: '' +# Basic NOHA Scenarios +- trigger: + name: 'daisy-os-nosdn-nofeature-noha-zte-pod9-daily-master-trigger' + triggers: + - timed: '' +# ODL Scenarios +- trigger: + name: 'daisy-os-odl-nofeature-ha-zte-pod9-daily-master-trigger' + triggers: + - timed: '' diff --git a/jjb/daisy4nfv/daisy-deploy.sh b/jjb/daisy4nfv/daisy-deploy.sh index 803ff5b03..f729c380e 100755 --- a/jjb/daisy4nfv/daisy-deploy.sh +++ b/jjb/daisy4nfv/daisy-deploy.sh @@ -19,14 +19,22 @@ fi # clone the securedlab repo cd $WORKSPACE -SECURELAB_DIR=/var/tmp/opnfv-securedlab -echo "Cloning securedlab repo $BRANCH to $SECURELAB_DIR" -rm -rf $SECURELAB_DIR -git clone ssh://jenkins-zte@gerrit.opnfv.org:29418/securedlab --quiet \ - --branch $BRANCH $SECURELAB_DIR +# There are no PDFs in euphrates branch of pharos repo. +if [[ "$BRANCH" =~ "euphrates" ]]; then + CONFIG_REPO_NAME=securedlab +else + CONFIG_REPO_NAME=pharos +fi + +LABS_DIR=/var/tmp/opnfv-${CONFIG_REPO_NAME} + +echo "Cloning ${CONFIG_REPO_NAME} repo $BRANCH to $LABS_DIR" +sudo rm -rf $LABS_DIR +git clone ssh://jenkins-zte@gerrit.opnfv.org:29418/${CONFIG_REPO_NAME} \ + --quiet --branch $BRANCH $LABS_DIR -DEPLOY_COMMAND="sudo -E ./ci/deploy/deploy.sh -L $SECURELAB_DIR \ +DEPLOY_COMMAND="sudo -E ./ci/deploy/deploy.sh -L $LABS_DIR \ -l $LAB_NAME -p $POD_NAME -B $BRIDGE -s $DEPLOY_SCENARIO" # log info to console diff --git a/jjb/daisy4nfv/daisy4nfv-download-artifact.sh b/jjb/daisy4nfv/daisy4nfv-download-artifact.sh index a64c80e5c..ae5ca3813 100755 --- a/jjb/daisy4nfv/daisy4nfv-download-artifact.sh +++ b/jjb/daisy4nfv/daisy4nfv-download-artifact.sh @@ -68,7 +68,15 @@ else DOWNLOAD_CMD="curl -L -s -o $WORKSPACE/opnfv.bin" fi -$DOWNLOAD_CMD http://$OPNFV_ARTIFACT_URL > gsutil.bin.log 2>&1 +maxretries=3 +cnt=0 +rc=1 +while [ $cnt -lt $maxretries ] && [ $rc -ne 0 ] +do + cnt=$[cnt + 1] + $DOWNLOAD_CMD http://$OPNFV_ARTIFACT_URL > gsutil.bin.log 2>&1 + rc=$? +done # list the file ls -al $WORKSPACE/opnfv.bin diff --git a/jjb/doctor/doctor.yml b/jjb/doctor/doctor.yml index e28f74431..64194d136 100644 --- a/jjb/doctor/doctor.yml +++ b/jjb/doctor/doctor.yml @@ -27,9 +27,9 @@ phase: - 'build-x86_64': - slave-label: 'opnfv-build-ubuntu' + slave-label: 'doctor-{installer}-verify' - 'build-aarch64': - slave-label: 'opnfv-build-ubuntu-arm' + slave-label: 'doctor-{installer}-{phase}-verify' inspector: - 'sample' @@ -38,10 +38,6 @@ task: - verify: auto-trigger-name: 'doctor-verify' - is-python: false - - python-verify: - auto-trigger-name: 'doctor-verify' - is-python: true exclude: - installer: 'apex' @@ -50,7 +46,7 @@ jobs: - 'doctor-verify-{stream}' - 'doctor-verify-unit-test-{stream}' - - 'doctor-{task}-{installer}-{inspector}-{stream}' + - 'doctor-{task}-{inspector}-{stream}' - 'doctor-{task}-{installer}-{inspector}-{phase}-{stream}' - job-template: @@ -133,26 +129,108 @@ publishers: - 'doctor-verify-unit-test-publishers-macro' - - job-template: - name: 'doctor-{task}-{installer}-{inspector}-{stream}' + name: 'doctor-{task}-{inspector}-{stream}' disabled: '{obj:disabled}' project-type: 'multijob' - node: '{slave-label}' + scm: + - git-scm-gerrit + triggers: + - '{auto-trigger-name}': + project: '{project}' + branch: '{branch}' + files: 'doctor_tests/**' + + builders: + - shell: | + #!/bin/bash + # we do nothing here as the main stuff will be done + # in phase jobs + echo "Triggering phase jobs!" + - multijob: + name: 'doctor-verify-apex-inspector' + execution-type: PARALLEL + projects: + - name: 'doctor-{task}-apex-{inspector}-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 + git-revision: true + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: false + - multijob: + name: 'doctor-verify-fuel-inspector' + execution-type: PARALLEL + projects: + - name: 'doctor-{task}-fuel-{inspector}-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 + git-revision: true + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: false + - multijob: + name: 'doctor-verify-fuel-inspector' + execution-type: PARALLEL + projects: + - name: 'doctor-{task}-fuel-{inspector}-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 + git-revision: true + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: false + +- job-template: + name: 'doctor-{task}-{installer}-{inspector}-{phase}-{stream}' + disabled: '{obj:disabled}' + node: '{slave-label}' + wrappers: + - ssh-agent-wrapper + - build-timeout: + timeout: 30 parameters: - project-parameter: project: '{project}' branch: '{branch}' + - '{installer}-defaults' + - '{slave-label}-defaults' + - 'doctor-parameter' + - 'doctor-functest-parameter' + scm: + - git-scm-gerrit + builders: + - 'doctor-verify-installer-inspector-builders-macro' + publishers: + - 'doctor-verify-publishers-macro' + + +# ------------------------------- +# parameter macros +# ------------------------------- +- parameter: + name: 'doctor-parameter' + parameters: - string: name: OS_CREDS default: /home/jenkins/openstack.creds description: 'OpenStack credentials' - - '{slave-label}-defaults' - - '{installer}-defaults' - string: name: DOCKER_TAG default: '{docker-tag}' @@ -165,6 +243,10 @@ name: DEPLOY_SCENARIO default: 'os-nosdn-nofeature-ha' description: 'Scenario to deploy and test' + +- parameter: + name: 'doctor-functest-parameter' + parameters: # functest-suite-parameter - string: name: FUNCTEST_MODE @@ -175,7 +257,7 @@ - string: name: TESTCASE_OPTIONS # yamllint disable rule:line-length - default: '-e INSPECTOR_TYPE={inspector} -e PYTHON_ENABLE={is-python} -v $WORKSPACE:/home/opnfv/repos/doctor' + default: '-e INSPECTOR_TYPE={inspector} -v $WORKSPACE:/home/opnfv/repos/doctor' # yamllint enable rule:line-length description: 'Addtional parameters specific to test case(s)' # functest-parameter @@ -197,57 +279,6 @@ name: CI_DEBUG default: 'true' description: "Show debug output information" - - scm: - - git-scm-gerrit - - triggers: - - '{auto-trigger-name}': - project: '{project}' - branch: '{branch}' - files: 'doctor_tests/**' - - builders: - - shell: | - #!/bin/bash - # we do nothing here as the main stuff will be done - # in phase jobs - echo "Triggering phase jobs!" - - multijob: - name: 'doctor-verify-installer-inspector' - execution-type: PARALLEL - projects: - - name: 'doctor-{task}-{installer}-{inspector}-build-x86_64-{stream}' - current-parameters: false - git-revision: true - node-parameters: false - kill-phase-on: FAILURE - abort-all-job: false - - name: 'doctor-{task}-{installer}-{inspector}-build-aarch64-{stream}' - current-parameters: false - git-revision: true - node-parameters: false - kill-phase-on: FAILURE - abort-all-job: false - -- job-template: - name: 'doctor-{task}-{installer}-{inspector}-{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: - - 'doctor-verify-installer-inspector-builders-macro' - publishers: - - 'doctor-verify-publishers-macro' # ------------------------------- # builder macros # ------------------------------- @@ -255,7 +286,8 @@ - builder: name: 'doctor-verify-unit-test-builders-macro' builders: - - shell: "[ -e tests/run.sh ] && bash -n ./tests/run.sh" + - shell: "tox -e pep8" + - builder: name: 'doctor-verify-installer-inspector-builders-macro' builders: @@ -292,10 +324,14 @@ - archive: artifacts: 'functest_results/$FUNCTEST_SUITE_NAME.log' - email-jenkins-admins-on-failure + - publisher: name: 'doctor-verify-unit-test-publishers-macro' publishers: - email-jenkins-admins-on-failure + - archive: + artifacts: '.tox/' + ##################################### # trigger macros diff --git a/jjb/dovetail/dovetail-ci-jobs.yml b/jjb/dovetail/dovetail-ci-jobs.yml index 6efe12820..99867c327 100644 --- a/jjb/dovetail/dovetail-ci-jobs.yml +++ b/jjb/dovetail/dovetail-ci-jobs.yml @@ -25,7 +25,13 @@ branch: 'stable/{stream}' dovetail-branch: master gs-pathname: '/{stream}' - docker-tag: 'cvp.0.8.0' + docker-tag: 'cvp.0.9.0' + euphrates: &euphrates + stream: euphrates + branch: 'stable/{stream}' + dovetail-branch: master + gs-pathname: '/{stream}' + docker-tag: 'cvp.0.9.0' # ---------------------------------- # POD, PLATFORM, AND BRANCH MAPPING @@ -60,6 +66,16 @@ SUT: fuel auto-trigger-name: 'daily-trigger-disabled' <<: *danube + - baremetal: + slave-label: fuel-baremetal + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *euphrates + - virtual: + slave-label: fuel-virtual + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *euphrates # compass CI PODs - baremetal: slave-label: compass-baremetal @@ -81,6 +97,16 @@ SUT: compass auto-trigger-name: 'daily-trigger-disabled' <<: *danube + - baremetal: + slave-label: compass-baremetal + SUT: compass + auto-trigger-name: 'daily-trigger-disabled' + <<: *euphrates + - virtual: + slave-label: compass-virtual + SUT: compass + auto-trigger-name: 'daily-trigger-disabled' + <<: *euphrates # ------------------------------- # Installers not using labels # CI PODs @@ -108,6 +134,16 @@ SUT: apex auto-trigger-name: 'daily-trigger-disabled' <<: *danube + - virtual: + slave-label: apex-virtual-master + SUT: apex + auto-trigger-name: 'daily-trigger-disabled' + <<: *euphrates + - baremetal: + slave-label: apex-baremetal-master + SUT: apex + auto-trigger-name: 'daily-trigger-disabled' + <<: *euphrates # armband CI PODs - armband-baremetal: slave-label: armband-baremetal @@ -129,6 +165,16 @@ SUT: fuel auto-trigger-name: 'daily-trigger-disabled' <<: *danube + - armband-baremetal: + slave-label: armband-baremetal + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *euphrates + - armband-virtual: + slave-label: armband-virtual + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *euphrates # ------------------------------- # None-CI PODs # ------------------------------- @@ -172,10 +218,29 @@ SUT: compass auto-trigger-name: 'daily-trigger-disabled' <<: *danube + - zte-pod1: + slave-label: zte-pod1 + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *euphrates + - zte-pod3: + slave-label: zte-pod3 + SUT: fuel + auto-trigger-name: 'daily-trigger-disabled' + <<: *euphrates + - huawei-pod4: + slave-label: huawei-pod4 + SUT: apex + auto-trigger-name: 'daily-trigger-disabled' + <<: *euphrates + - huawei-pod7: + slave-label: huawei-pod7 + SUT: compass + auto-trigger-name: 'daily-trigger-disabled' + <<: *euphrates # ------------------------------- testsuite: - - 'compliance_set' - 'proposed_tests' jobs: diff --git a/jjb/dovetail/dovetail-project-jobs.yml b/jjb/dovetail/dovetail-project-jobs.yml index c38ec9637..1accffcdb 100644 --- a/jjb/dovetail/dovetail-project-jobs.yml +++ b/jjb/dovetail/dovetail-project-jobs.yml @@ -16,6 +16,10 @@ - master: branch: '{stream}' disabled: false + - danube: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false ################################ # job templates diff --git a/jjb/dovetail/dovetail-run.sh b/jjb/dovetail/dovetail-run.sh index 2cbb94766..e50242bd6 100755 --- a/jjb/dovetail/dovetail-run.sh +++ b/jjb/dovetail/dovetail-run.sh @@ -13,6 +13,9 @@ set -e [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" +DEPLOY_TYPE=baremetal +[[ $BUILD_TAG =~ "virtual" ]] && DEPLOY_TYPE=virt + DOVETAIL_HOME=${WORKSPACE}/cvp [ -d ${DOVETAIL_HOME} ] && sudo rm -rf ${DOVETAIL_HOME} @@ -21,9 +24,12 @@ mkdir -p ${DOVETAIL_HOME} DOVETAIL_CONFIG=${DOVETAIL_HOME}/pre_config mkdir -p ${DOVETAIL_CONFIG} +ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" + sshkey="" # The path of openrc.sh is defined in fetch_os_creds.sh OPENRC=${DOVETAIL_CONFIG}/env_config.sh +CACERT=${DOVETAIL_CONFIG}/os_cacert if [[ ${INSTALLER_TYPE} == 'apex' ]]; then instack_mac=$(sudo virsh domiflist undercloud | grep default | \ grep -Eo "[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+:[0-9a-f]+") @@ -56,50 +62,93 @@ if [[ ${INSTALLER_TYPE} != 'joid' ]]; then echo "dovetail branch is $BRANCH" BRANCH_BACKUP=$BRANCH export BRANCH=$SUT_BRANCH - ${releng_repo}/utils/fetch_os_creds.sh -d ${OPENRC} -i ${INSTALLER_TYPE} -a ${INSTALLER_IP} >${redirect} + ${releng_repo}/utils/fetch_os_creds.sh -d ${OPENRC} -i ${INSTALLER_TYPE} -a ${INSTALLER_IP} -o ${CACERT} >${redirect} export BRANCH=$BRANCH_BACKUP fi if [[ -f $OPENRC ]]; then echo "INFO: openstack credentials path is $OPENRC" - cat $OPENRC + if [[ ! "${SUT_BRANCH}" =~ "danube" && ${INSTALLER_TYPE} == "compass" ]]; then + if [[ -f ${CACERT} ]]; then + echo "INFO: ${INSTALLER_TYPE} openstack cacert file is ${CACERT}" + echo "export OS_CACERT=${CACERT}" >> ${OPENRC} + else + echo "ERROR: Can't find ${INSTALLER_TYPE} openstack cacert file. Please check if it is existing." + sudo ls -al ${DOVETAIL_CONFIG} + exit 1 + fi + fi else echo "ERROR: cannot find file $OPENRC. Please check if it is existing." sudo ls -al ${DOVETAIL_CONFIG} exit 1 fi -set +e +if [[ ! "${SUT_BRANCH}" =~ "danube" && ${INSTALLER_TYPE} == "fuel" ]]; then + sed -i "s#/etc/ssl/certs/mcp_os_cacert#${CACERT}#g" ${OPENRC} +fi +cat $OPENRC + +if [[ ! "${SUT_BRANCH}" =~ "danube" && ${INSTALLER_TYPE} == "compass" ]]; then + cat << EOF >${DOVETAIL_CONFIG}/pod.yaml +nodes: +- {ip: 10.1.0.52, name: node1, password: root, role: controller, user: root} +- {ip: 10.1.0.51, name: node2, password: root, role: controller, user: root} +- {ip: 10.1.0.50, name: node3, password: root, role: controller, user: root} +- {ip: 10.1.0.54, name: node4, password: root, role: compute, user: root} +- {ip: 10.1.0.53, name: node5, password: root, role: compute, user: root} -sudo pip install virtualenv +EOF +fi -cd ${releng_repo}/modules -sudo virtualenv venv -source venv/bin/activate -sudo pip install -e ./ >/dev/null -sudo pip install netaddr +if [[ ! "${SUT_BRANCH}" =~ "danube" && ${INSTALLER_TYPE} == 'fuel' && ${DEPLOY_TYPE} == 'baremetal' ]]; then + fuel_ctl_ssh_options="${ssh_options} -i ${SSH_KEY}" + ssh_user="ubuntu" + fuel_ctl_ip=$(ssh 2>/dev/null ${fuel_ctl_ssh_options} "${ssh_user}@${INSTALLER_IP}" \ + "sudo salt --out yaml 'ctl*' pillar.get _param:openstack_control_address | \ + awk '{print \$2; exit}'") &> /dev/null + cat << EOF >${DOVETAIL_CONFIG}/pod.yaml +nodes: +- {ip: ${fuel_ctl_ip}, name: node1, key_filename: /root/.ssh/id_rsa, role: controller, user: ${ssh_user}} -if [[ ${INSTALLER_TYPE} == compass ]]; then - options="-u root -p root" -elif [[ ${INSTALLER_TYPE} == fuel ]]; then - options="-u root -p r00tme" -elif [[ ${INSTALLER_TYPE} == apex ]]; then - options="-u stack -k /root/.ssh/id_rsa" -else - echo "Don't support to generate pod.yaml on ${INSTALLER_TYPE} currently." - echo "HA test cases may not run properly." +EOF fi -cmd="sudo python ${releng_repo}/utils/create_pod_file.py -t ${INSTALLER_TYPE} \ - -i ${INSTALLER_IP} ${options} -f ${DOVETAIL_CONFIG}/pod.yaml" -echo ${cmd} -${cmd} +if [[ ! -f ${DOVETAIL_CONFIG}/pod.yaml ]]; then + set +e + + sudo pip install virtualenv + + cd ${releng_repo}/modules + sudo virtualenv venv + source venv/bin/activate + sudo pip install -e ./ >/dev/null + sudo pip install netaddr + + if [[ ${INSTALLER_TYPE} == compass ]]; then + options="-u root -p root" + elif [[ ${INSTALLER_TYPE} == fuel ]]; then + options="-u root -p r00tme" + elif [[ ${INSTALLER_TYPE} == apex ]]; then + options="-u stack -k /root/.ssh/id_rsa" + elif [[ ${INSTALLER_TYPE} == daisy ]]; then + options="-u root -p r00tme" + else + echo "Don't support to generate pod.yaml on ${INSTALLER_TYPE} currently." + echo "HA test cases may not run properly." + fi -deactivate + cmd="sudo python ${releng_repo}/utils/create_pod_file.py -t ${INSTALLER_TYPE} \ + -i ${INSTALLER_IP} ${options} -f ${DOVETAIL_CONFIG}/pod.yaml" + echo ${cmd} + ${cmd} -set -e + deactivate -cd ${WORKSPACE} + set -e + + cd ${WORKSPACE} +fi if [ -f ${DOVETAIL_CONFIG}/pod.yaml ]; then echo "file ${DOVETAIL_CONFIG}/pod.yaml:" @@ -110,11 +159,13 @@ else echo "HA test cases may not run properly." fi -ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" - if [ "$INSTALLER_TYPE" == "fuel" ]; then - echo "Fetching id_rsa file from jump_server $INSTALLER_IP..." - sshpass -p r00tme sudo scp $ssh_options root@${INSTALLER_IP}:~/.ssh/id_rsa ${DOVETAIL_CONFIG}/id_rsa + if [[ "${SUT_BRANCH}" =~ "danube" ]]; then + echo "Fetching id_rsa file from jump_server $INSTALLER_IP..." + sshpass -p r00tme sudo scp $ssh_options root@${INSTALLER_IP}:~/.ssh/id_rsa ${DOVETAIL_CONFIG}/id_rsa + else + cp ${SSH_KEY} ${DOVETAIL_CONFIG}/id_rsa + fi fi if [ "$INSTALLER_TYPE" == "apex" ]; then @@ -122,6 +173,12 @@ if [ "$INSTALLER_TYPE" == "apex" ]; then sudo scp $ssh_options stack@${INSTALLER_IP}:~/.ssh/id_rsa ${DOVETAIL_CONFIG}/id_rsa fi +if [ "$INSTALLER_TYPE" == "daisy" ]; then + echo "Fetching id_dsa file from jump_server $INSTALLER_IP..." + sshpass -p r00tme sudo scp $ssh_options root@${INSTALLER_IP}:~/.ssh/id_dsa ${DOVETAIL_CONFIG}/id_rsa +fi + + image_path=${HOME}/opnfv/dovetail/images if [[ ! -d ${image_path} ]]; then mkdir -p ${image_path} @@ -149,20 +206,26 @@ docker_volume="-v /var/run/docker.sock:/var/run/docker.sock" dovetail_home_volume="-v ${DOVETAIL_HOME}:${DOVETAIL_HOME}" # Pull the image with correct tag -echo "Dovetail: Pulling image opnfv/dovetail:${DOCKER_TAG}" -docker pull opnfv/dovetail:$DOCKER_TAG >$redirect +DOCKER_REPO='opnfv/dovetail' +if [ "$(uname -m)" = 'aarch64' ]; then + DOCKER_REPO="${DOCKER_REPO}_$(uname -m)" + DOCKER_TAG="latest" +fi + +echo "Dovetail: Pulling image ${DOCKER_REPO}:${DOCKER_TAG}" +docker pull ${DOCKER_REPO}:$DOCKER_TAG >$redirect env4bgpvpn="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP}" cmd="docker run ${opts} -e DOVETAIL_HOME=${DOVETAIL_HOME} ${docker_volume} ${dovetail_home_volume} \ - ${sshkey} ${env4bgpvpn} opnfv/dovetail:${DOCKER_TAG} /bin/bash" + ${sshkey} ${env4bgpvpn} ${DOCKER_REPO}:${DOCKER_TAG} /bin/bash" echo "Dovetail: running docker run command: ${cmd}" ${cmd} >${redirect} sleep 5 -container_id=$(docker ps | grep "opnfv/dovetail:${DOCKER_TAG}" | awk '{print $1}' | head -1) +container_id=$(docker ps | grep "${DOCKER_REPO}:${DOCKER_TAG}" | awk '{print $1}' | head -1) echo "Container ID=${container_id}" if [ -z ${container_id} ]; then - echo "Cannot find opnfv/dovetail container ID ${container_id}. Please check if it is existing." + echo "Cannot find ${DOCKER_REPO} container ID ${container_id}. Please check if it is existing." docker ps -a exit 1 fi @@ -170,11 +233,25 @@ echo "Container Start: docker start ${container_id}" docker start ${container_id} sleep 5 docker ps >${redirect} -if [ $(docker ps | grep "opnfv/dovetail:${DOCKER_TAG}" | wc -l) == 0 ]; then - echo "The container opnfv/dovetail with ID=${container_id} has not been properly started. Exiting..." +if [ $(docker ps | grep "${DOCKER_REPO}:${DOCKER_TAG}" | wc -l) == 0 ]; then + echo "The container ${DOCKER_REPO} with ID=${container_id} has not been properly started. Exiting..." exit 1 fi +if [[ ! "${SUT_BRANCH}" =~ "danube" && ${INSTALLER_TYPE} == 'fuel' && ${DEPLOY_TYPE} == 'baremetal' ]]; then + source_cmd="source ${OPENRC}" + get_public_url_cmd="openstack --insecure endpoint list --service keystone --interface public | sed -n 4p | awk '{print \$14}'" + public_url=$(sudo docker exec "$container_id" /bin/bash -c "${source_cmd} && ${get_public_url_cmd}") + sed -i 's#OS_AUTH_URL=.*#OS_AUTH_URL='"${public_url}"'#g' ${OPENRC} + sed -i 's/internal/public/g' ${OPENRC} + if [[ ${public_url} =~ 'v2' ]]; then + sed -i "s/OS_IDENTITY_API_VERSION=3/OS_IDENTITY_API_VERSION=2.0/g" ${OPENRC} + sed -i '/OS_PROJECT_DOMAIN_NAME/d' ${OPENRC} + sed -i '/OS_USER_DOMAIN_NAME/d' ${OPENRC} + fi + cat ${OPENRC} +fi + # Modify tempest_conf.yaml file tempest_conf_file=${DOVETAIL_CONFIG}/tempest_conf.yaml if [[ ${INSTALLER_TYPE} == 'compass' || ${INSTALLER_TYPE} == 'apex' ]]; then diff --git a/jjb/dpacc/dpacc.yml b/jjb/dpacc/dpacc.yml index 3501d276d..a9a091413 100644 --- a/jjb/dpacc/dpacc.yml +++ b/jjb/dpacc/dpacc.yml @@ -1,64 +1,8 @@ --- -################################################### -# All the jobs except verify have been removed! -# They will only be enabled on request by projects! -################################################### - project: name: dpacc project: '{name}' jobs: - - 'dpacc-verify-{stream}' - - stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - euphrates: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - -- job-template: - name: 'dpacc-verify-{stream}' - - disabled: '{obj:disabled}' - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' - - scm: - - git-scm-gerrit - - 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' - - builders: - - shell: | - echo "Nothing to verify!" + - '{project}-verify-basic' diff --git a/jjb/fuel/fuel-daily-jobs.yml b/jjb/fuel/fuel-daily-jobs.yml index 5dc8a72c3..902e75499 100644 --- a/jjb/fuel/fuel-daily-jobs.yml +++ b/jjb/fuel/fuel-daily-jobs.yml @@ -50,18 +50,9 @@ - zte-pod1: slave-label: zte-pod1 <<: *master - - zte-pod3: - slave-label: zte-pod3 - <<: *master - zte-pod1: slave-label: zte-pod1 <<: *euphrates - - zte-pod3: - slave-label: zte-pod3 - <<: *euphrates - - zte-pod1: - slave-label: zte-pod1 - <<: *danube # ------------------------------- # scenarios # ------------------------------- @@ -94,6 +85,8 @@ auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - 'os-onos-nofeature-noha': auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' + - 'os-ovn-nofeature-noha': + auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - 'os-nosdn-kvm-noha': auto-trigger-name: 'fuel-{scenario}-{pod}-daily-{stream}-trigger' - 'os-nosdn-ovs-noha': @@ -207,34 +200,21 @@ build-step-failure-threshold: 'never' failure-threshold: 'never' unstable-threshold: 'FAILURE' - # 1.dovetail only has master, based on D release - # 2.here the stream means the SUT stream, dovetail stream is defined in its own job - # 3.only debug testsuite here(refstack, ha, ipv6, bgpvpn) - # 4.not used for release criteria or compliance, - # only to debug the dovetail tool bugs with bgpvpn and nosdn-nofeature - # 5.only run against scenario os-odl-bgpvpn-ha(regex used here, can extend to more scenarios future) - # 6.ZTE pod1, os-nosdn-nofeature-ha and os-odl-bgpvpn-ha, run against danube - - conditional-step: - condition-kind: and - condition-operands: - - condition-kind: regex-match - regex: os-(nosdn-nofeature|odl_l2-bgpvpn)-ha - label: '{scenario}' - - condition-kind: regex-match - regex: 'danube' - label: '{stream}' - steps: - - trigger-builds: - - project: 'dovetail-fuel-{pod}-proposed_tests-master' - current-parameters: false - predefined-parameters: - DEPLOY_SCENARIO={scenario} - block: true - same-node: true - block-thresholds: - build-step-failure-threshold: 'never' - failure-threshold: 'never' - unstable-threshold: 'FAILURE' + # 1.here the stream means the SUT stream, dovetail stream is defined in its own job + # 2.only debug testsuite here(refstack, ha, vping, ipv6, tempest, bgpvpn) + # 3.not used for release criteria or compliance, only to debug the dovetail tool bugs + # 4.ZTE pod1, os-nosdn-nofeature-ha and os-odl-bgpvpn-ha, run against danube + - trigger-builds: + - project: 'dovetail-fuel-{pod}-proposed_tests-{stream}' + current-parameters: false + predefined-parameters: + DEPLOY_SCENARIO={scenario} + block: true + same-node: true + block-thresholds: + build-step-failure-threshold: 'never' + failure-threshold: 'never' + unstable-threshold: 'FAILURE' - conditional-step: condition-kind: not condition-operand: @@ -409,6 +389,10 @@ triggers: - timed: '' - trigger: + name: 'fuel-os-ovn-nofeature-noha-baremetal-daily-master-trigger' + triggers: + - timed: '' +- trigger: name: 'fuel-os-nosdn-kvm-noha-baremetal-daily-master-trigger' triggers: - timed: '' @@ -478,6 +462,10 @@ triggers: - timed: '' - trigger: + name: 'fuel-os-ovn-nofeature-noha-baremetal-daily-euphrates-trigger' + triggers: + - timed: '' +- trigger: name: 'fuel-os-nosdn-kvm-noha-baremetal-daily-euphrates-trigger' triggers: - timed: '' @@ -546,6 +534,10 @@ triggers: - timed: '' # '5 23 * * *' - trigger: + name: 'fuel-os-ovn-nofeature-noha-virtual-daily-master-trigger' + triggers: + - timed: '5 23 * * *' +- trigger: name: 'fuel-os-nosdn-kvm-noha-virtual-daily-master-trigger' triggers: - timed: '' # '35 6 * * *' @@ -614,6 +606,10 @@ triggers: - timed: '' # '0 23 * * *' - trigger: + name: 'fuel-os-ovn-nofeature-noha-virtual-daily-euphrates-trigger' + triggers: + - timed: '' +- trigger: name: 'fuel-os-nosdn-kvm-noha-virtual-daily-euphrates-trigger' triggers: - timed: '' # '30 6 * * *' @@ -635,7 +631,7 @@ - trigger: name: 'fuel-os-nosdn-nofeature-ha-zte-pod1-daily-master-trigger' triggers: - - timed: '0 10 * * *' + - timed: '0 22 * * *' - trigger: name: 'fuel-os-odl-nofeature-ha-zte-pod1-daily-master-trigger' triggers: @@ -682,6 +678,10 @@ triggers: - timed: '' - trigger: + name: 'fuel-os-ovn-nofeature-noha-zte-pod1-daily-master-trigger' + triggers: + - timed: '' +- trigger: name: 'fuel-os-nosdn-kvm-noha-zte-pod1-daily-master-trigger' triggers: - timed: '' @@ -698,80 +698,12 @@ triggers: - timed: '' # ---------------------------------------------- -# ZTE POD3 Triggers running against master branch -# ---------------------------------------------- -- trigger: - name: 'fuel-os-nosdn-nofeature-ha-zte-pod3-daily-master-trigger' - triggers: - - timed: '' # '0 10 * * *' -- trigger: - name: 'fuel-os-odl-nofeature-ha-zte-pod3-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-onos-sfc-ha-zte-pod3-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-onos-nofeature-ha-zte-pod3-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm-ha-zte-pod3-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-ovs-ha-zte-pod3-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-zte-pod3-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-zte-pod3-daily-master-trigger' - triggers: - - timed: '' -# NOHA Scenarios -- trigger: - name: 'fuel-os-nosdn-nofeature-noha-zte-pod3-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl-nofeature-noha-zte-pod3-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-onos-sfc-noha-zte-pod3-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-onos-nofeature-noha-zte-pod3-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm-noha-zte-pod3-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-ovs-noha-zte-pod3-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-zte-pod3-daily-master-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-zte-pod3-daily-master-trigger' - triggers: - - timed: '' -# ---------------------------------------------- # ZTE POD1 Triggers running against euphrates branch # ---------------------------------------------- - trigger: name: 'fuel-os-nosdn-nofeature-ha-zte-pod1-daily-euphrates-trigger' triggers: - - timed: '' + - timed: '0 10 * * *' - trigger: name: 'fuel-os-odl-nofeature-ha-zte-pod1-daily-euphrates-trigger' triggers: @@ -818,6 +750,10 @@ triggers: - timed: '' - trigger: + name: 'fuel-os-ovn-nofeature-noha-zte-pod1-daily-euphrates-trigger' + triggers: + - timed: '' +- trigger: name: 'fuel-os-nosdn-kvm-noha-zte-pod1-daily-euphrates-trigger' triggers: - timed: '' @@ -833,143 +769,3 @@ name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-zte-pod1-daily-euphrates-trigger' triggers: - timed: '' -# ---------------------------------------------- -# ZTE POD3 Triggers running against euphrates branch -# ---------------------------------------------- -- trigger: - name: 'fuel-os-nosdn-nofeature-ha-zte-pod3-daily-euphrates-trigger' - triggers: - - timed: '' # '0 18 * * *' -- trigger: - name: 'fuel-os-odl-nofeature-ha-zte-pod3-daily-euphrates-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-onos-sfc-ha-zte-pod3-daily-euphrates-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-onos-nofeature-ha-zte-pod3-daily-euphrates-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm-ha-zte-pod3-daily-euphrates-trigger' - triggers: - - timed: '' # '0 2 * * *' -- trigger: - name: 'fuel-os-nosdn-ovs-ha-zte-pod3-daily-euphrates-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-zte-pod3-daily-euphrates-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-zte-pod3-daily-euphrates-trigger' - triggers: - - timed: '' -# NOHA Scenarios -- trigger: - name: 'fuel-os-nosdn-nofeature-noha-zte-pod3-daily-euphrates-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl-nofeature-noha-zte-pod3-daily-euphrates-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-onos-sfc-noha-zte-pod3-daily-euphrates-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-onos-nofeature-noha-zte-pod3-daily-euphrates-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm-noha-zte-pod3-daily-euphrates-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-ovs-noha-zte-pod3-daily-euphrates-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-zte-pod3-daily-euphrates-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-zte-pod3-daily-euphrates-trigger' - triggers: - - timed: '' -# ----------------------------------------------- -# ZTE POD1 Triggers running against danube branch -# ----------------------------------------------- -- trigger: - name: 'fuel-os-nosdn-nofeature-ha-zte-pod1-daily-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl_l2-bgpvpn-ha-zte-pod1-daily-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl-nofeature-ha-zte-pod1-daily-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-onos-sfc-ha-zte-pod1-daily-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-onos-nofeature-ha-zte-pod1-daily-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm-ha-zte-pod1-daily-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-ovs-ha-zte-pod1-daily-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-ha-zte-pod1-daily-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-ha-zte-pod1-daily-danube-trigger' - triggers: - - timed: '' -# NOHA Scenarios -- trigger: - name: 'fuel-os-nosdn-nofeature-noha-zte-pod1-daily-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-odl-nofeature-noha-zte-pod1-daily-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-onos-sfc-noha-zte-pod1-daily-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-onos-nofeature-noha-zte-pod1-daily-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm-noha-zte-pod1-daily-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-ovs-noha-zte-pod1-daily-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk-noha-zte-pod1-daily-danube-trigger' - triggers: - - timed: '' -- trigger: - name: 'fuel-os-nosdn-kvm_ovs_dpdk_bar-noha-zte-pod1-daily-danube-trigger' - triggers: - - timed: '' diff --git a/jjb/functest/functest-alpine.sh b/jjb/functest/functest-alpine.sh index bd2bdf4a8..735ca6f7f 100755 --- a/jjb/functest/functest-alpine.sh +++ b/jjb/functest/functest-alpine.sh @@ -4,10 +4,30 @@ set -e set +u set +o pipefail +check_os_deployment() { + FUNCTEST_IMAGE=opnfv/functest-healthcheck:${DOCKER_TAG} + cmd="docker run --rm --privileged=true ${volumes} ${FUNCTEST_IMAGE} check_deployment" + eval ${cmd} + ret_value=$? + if [ ${ret_value} != 0 ]; then + echo "ERROR: Problem while checking OpenStack deployment." + exit 1 + else + echo "OpenStack deployment OK." + fi + +} + + run_tiers() { tiers=$1 - cmd_opt="prepare_env start && run_tests -r -t all" - [[ $BUILD_TAG =~ "suite" ]] && cmd_opt="prepare_env start && run_tests -t all" + if [[ ${BRANCH##*/} == "master" ]]; then + cmd_opt="run_tests -r -t all" + [[ $BUILD_TAG =~ "suite" ]] && cmd_opt="run_tests -t all" + else + cmd_opt="prepare_env start && run_tests -r -t all" + [[ $BUILD_TAG =~ "suite" ]] && cmd_opt="prepare_env start && run_tests -t all" + fi ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" echo 0 > ${ret_val_file} @@ -15,7 +35,7 @@ run_tiers() { FUNCTEST_IMAGE=opnfv/functest-${tier}:${DOCKER_TAG} echo "Functest: Pulling Functest Docker image ${FUNCTEST_IMAGE} ..." docker pull ${FUNCTEST_IMAGE}>/dev/null - cmd="docker run --privileged=true ${envs} ${volumes} ${TESTCASE_OPTIONS} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" + cmd="docker run --rm --privileged=true ${envs} ${volumes} ${TESTCASE_OPTIONS} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" echo "Running Functest tier '${tier}'. CMD: ${cmd}" eval ${cmd} ret_value=$? @@ -31,21 +51,24 @@ run_tiers() { run_test() { test_name=$1 - cmd_opt="prepare_env start && run_tests -t ${test_name}" - [[ $BUILD_TAG =~ "suite" ]] && cmd_opt="prepare_env start && run_tests -t ${test_name}" + if [[ ${BRANCH##*/} == "master" ]]; then + cmd_opt="run_tests -t ${test_name}" + else + cmd_opt="prepare_env start && run_tests -t ${test_name}" + fi ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" echo 0 > ${ret_val_file} # Determine which Functest image should be used for the test case case ${test_name} in connection_check|api_check|snaps_health_check) FUNCTEST_IMAGE=opnfv/functest-healthcheck:${DOCKER_TAG} ;; - vping_ssh|vping_userdata|tempest_smoke_serial|rally_sanity|refstack_defcore|odl|odl_netvirt|fds|snaps_smoke) + vping_ssh|vping_userdata|tempest_smoke_serial|rally_sanity|refstack_defcore|odl|odl_netvirt|snaps_smoke) FUNCTEST_IMAGE=opnfv/functest-smoke:${DOCKER_TAG} ;; - tempest_full_parallel|tempest_custom|rally_full) + tempest_full_parallel|rally_full) FUNCTEST_IMAGE=opnfv/functest-components:${DOCKER_TAG} ;; cloudify_ims|orchestra_openims|orchestra_clearwaterims|vyos_vrouter) FUNCTEST_IMAGE=opnfv/functest-vnf:${DOCKER_TAG} ;; - promise|doctor-notification|bgpvpn|functest-odl-sfc|domino-multinode|barometercollectd) + promise|doctor-notification|bgpvpn|functest-odl-sfc|domino-multinode|barometercollectd|fds) FUNCTEST_IMAGE=opnfv/functest-features:${DOCKER_TAG} ;; parser-basics) FUNCTEST_IMAGE=opnfv/functest-parser:${DOCKER_TAG} ;; @@ -56,7 +79,7 @@ run_test() { esac echo "Functest: Pulling Functest Docker image ${FUNCTEST_IMAGE} ..." docker pull ${FUNCTEST_IMAGE}>/dev/null - cmd="docker run --privileged=true ${envs} ${volumes} ${TESTCASE_OPTIONS} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" + cmd="docker run --rm --privileged=true ${envs} ${volumes} ${TESTCASE_OPTIONS} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" echo "Running Functest test case '${test_name}'. CMD: ${cmd}" eval ${cmd} ret_value=$? @@ -71,7 +94,7 @@ FUNCTEST_DIR=/home/opnfv/functest DEPLOY_TYPE=baremetal [[ $BUILD_TAG =~ "virtual" ]] && DEPLOY_TYPE=virt HOST_ARCH=$(uname -m) -DOCKER_TAG=${DOCKER_TAG:-latest} +DOCKER_TAG=`[[ ${BRANCH##*/} == "master" ]] && echo "latest" || echo ${BRANCH##*/}` # Prepare OpenStack credentials volume rc_file=${HOME}/opnfv-openrc.sh @@ -132,6 +155,7 @@ set +e if [[ ${DEPLOY_SCENARIO} =~ ^os-.* ]]; then + [[ ${BRANCH##*/} == "master" ]] && check_os_deployment if [ ${FUNCTEST_MODE} == 'testcase' ]; then echo "FUNCTEST_MODE=testcase, FUNCTEST_SUITE_NAME=${FUNCTEST_SUITE_NAME}" run_test ${FUNCTEST_SUITE_NAME} diff --git a/jjb/functest/functest-cleanup.sh b/jjb/functest/functest-cleanup.sh index fc277b9ed..c21b543a6 100755 --- a/jjb/functest/functest-cleanup.sh +++ b/jjb/functest/functest-cleanup.sh @@ -3,11 +3,7 @@ [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" echo "Cleaning up docker containers/images..." -HOST_ARCH=$(uname -m) FUNCTEST_IMAGE=opnfv/functest -if [ "$HOST_ARCH" = "aarch64" ]; then - FUNCTEST_IMAGE="${FUNCTEST_IMAGE}_${HOST_ARCH}" -fi # Remove containers along with image opnfv/functest*:<none> dangling_images=($(docker images -f "dangling=true" | grep $FUNCTEST_IMAGE | awk '{print $3}')) diff --git a/jjb/functest/functest-daily-jobs.yml b/jjb/functest/functest-daily-jobs.yml index 2fc70b916..79e5c1503 100644 --- a/jjb/functest/functest-daily-jobs.yml +++ b/jjb/functest/functest-daily-jobs.yml @@ -14,12 +14,10 @@ stream: master branch: '{stream}' gs-pathname: '' - docker-tag: 'latest' euphrates: &euphrates stream: euphrates branch: 'stable/{stream}' gs-pathname: '/{stream}' - docker-tag: 'stable' # ------------------------------- # POD, INSTALLER, AND BRANCH MAPPING # ------------------------------- @@ -194,9 +192,9 @@ - 'suite': job-timeout: 60 - 'daily': - job-timeout: 240 + job-timeout: 300 - 'arm-daily': - job-timeout: 240 + job-timeout: 300 jobs: - 'functest-{installer}-{pod}-{testsuite}-{stream}' @@ -234,10 +232,6 @@ name: DEPLOY_SCENARIO default: 'os-odl_l2-nofeature-ha' - string: - name: DOCKER_TAG - default: '{docker-tag}' - description: 'Tag to pull docker image' - - string: name: CLEAN_DOCKER_IMAGES default: 'false' description: 'Remove downloaded docker images (opnfv/functest*:*)' @@ -399,8 +393,7 @@ !include-raw: - ./functest-env-presetup.sh - ../../utils/fetch_os_creds.sh - - ./set-functest-env.sh - - ./functest-loop.sh + - ./functest-alpine.sh # yamllint enable rule:indentation - builder: diff --git a/jjb/functest/functest-loop.sh b/jjb/functest/functest-loop.sh deleted file mode 100755 index a590d9f95..000000000 --- a/jjb/functest/functest-loop.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -set +e - -[[ "$PUSH_RESULTS_TO_DB" == "true" ]] && flags+="-r" -cmd="run_tests -t all ${flags}" - -container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1) -docker exec $container_id $cmd - -ret_value=$? -ret_val_file="${HOME}/opnfv/functest/results/${BRANCH##*/}/return_value" -echo ${ret_value}>${ret_val_file} - -exit 0 diff --git a/jjb/functest/functest-weekly-jobs.yml b/jjb/functest/functest-weekly-jobs.yml index 6826e4151..5d572aacc 100644 --- a/jjb/functest/functest-weekly-jobs.yml +++ b/jjb/functest/functest-weekly-jobs.yml @@ -118,13 +118,11 @@ # yamllint disable rule:indentation - shell: !include-raw: - - ./functest-env-presetup.sh - - ../../utils/fetch_os_creds.sh - - ./set-functest-env.sh + - ./functest-env-presetup.sh + - ../../utils/fetch_os_creds.sh + - ./functest-alpine.sh # yamllint enable rule:indentation - shell: - !include-raw: ./functest-loop.sh - - shell: !include-raw: ../../utils/push-test-logs.sh - shell: !include-raw: ./functest-exit.sh diff --git a/jjb/functest/set-functest-env.sh b/jjb/functest/set-functest-env.sh deleted file mode 100755 index b116a8528..000000000 --- a/jjb/functest/set-functest-env.sh +++ /dev/null @@ -1,111 +0,0 @@ -#!/bin/bash - -set -e -set +u -set +o pipefail - -[[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null" - -DEPLOY_TYPE=baremetal -[[ $BUILD_TAG =~ "virtual" ]] && DEPLOY_TYPE=virt -HOST_ARCH=$(uname -m) - -# Prepare OpenStack credentials volume -rc_file_vol="-v ${HOME}/opnfv-openrc.sh:/home/opnfv/functest/conf/openstack.creds" - -if [[ ${INSTALLER_TYPE} == 'joid' ]]; then - rc_file_vol="-v $LAB_CONFIG/admin-openrc:/home/opnfv/functest/conf/openstack.creds" -elif [[ ${INSTALLER_TYPE} == 'compass' && ${BRANCH} == 'master' ]]; then - cacert_file_vol="-v ${HOME}/os_cacert:/home/opnfv/functest/conf/os_cacert" - echo "export OS_CACERT=/home/opnfv/functest/conf/os_cacert" >> ${HOME}/opnfv-openrc.sh -elif [[ ${INSTALLER_TYPE} == 'fuel' && ${DEPLOY_TYPE} == 'baremetal' ]]; then - cacert_file_vol="-v ${HOME}/os_cacert:/etc/ssl/certs/mcp_os_cacert" -fi - - -# Set iptables rule to allow forwarding return traffic for container -if ! sudo iptables -C FORWARD -j RETURN 2> ${redirect} || ! sudo iptables -L FORWARD | awk 'NR==3' | grep RETURN 2> ${redirect}; then - sudo iptables -I FORWARD -j RETURN -fi - -echo "Functest: Start Docker and prepare environment" - -if [ "$BRANCH" != 'stable/danube' ]; then - echo "Functest: Download images that will be used by test cases" - images_dir="${HOME}/opnfv/functest/images" - chmod +x ${WORKSPACE}/functest/ci/download_images.sh - ${WORKSPACE}/functest/ci/download_images.sh ${images_dir} > ${redirect} - images_vol="-v ${images_dir}:/home/opnfv/functest/images" - echo "Functest: Images successfully downloaded" -fi - -dir_result="${HOME}/opnfv/functest/results/${BRANCH##*/}" -mkdir -p ${dir_result} -sudo rm -rf ${dir_result}/* -results_vol="-v ${dir_result}:/home/opnfv/functest/results" -custom_params= -test -f ${HOME}/opnfv/functest/custom/params_${DOCKER_TAG} && custom_params=$(cat ${HOME}/opnfv/functest/custom/params_${DOCKER_TAG}) -echo "Functest: custom parameters successfully retrieved: ${custom_params}" - -envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \ - -e NODE_NAME=${NODE_NAME} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} \ - -e BUILD_TAG=${BUILD_TAG} -e CI_DEBUG=${CI_DEBUG} -e DEPLOY_TYPE=${DEPLOY_TYPE}" - -ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" - -if [ "${INSTALLER_TYPE}" == 'fuel' ] && [ "$BRANCH" != 'stable/danube' ]; then - COMPUTE_ARCH=$(ssh -l ubuntu ${INSTALLER_IP} -i ${SSH_KEY} ${ssh_options} \ - "sudo salt 'cmp*' grains.get cpuarch --out yaml | awk '{print \$2; exit}'") - envs="${envs} -e POD_ARCH=${COMPUTE_ARCH}" -fi - -if [[ ${INSTALLER_TYPE} == 'compass' && ${DEPLOY_SCENARIO} == *'os-nosdn-openo-ha'* ]]; then - openo_msb_port=${openo_msb_port:-80} - openo_msb_endpoint="$(sshpass -p'root' ssh 2>/dev/null $ssh_options root@${installer_ip} \ - 'mysql -ucompass -pcompass -Dcompass -e "select package_config from cluster;" \ - | sed s/,/\\n/g | grep openo_ip | cut -d \" -f 4'):$openo_msb_port" - - envs=${env}" -e OPENO_MSB_ENDPOINT=${openo_msb_endpoint}" -fi - -if [ "$BRANCH" != 'stable/danube' ]; then - volumes="${images_vol} ${results_vol} ${sshkey_vol} ${stackrc_vol} ${rc_file_vol} ${cacert_file_vol}" -else - volumes="${results_vol} ${sshkey_vol} ${stackrc_vol} ${rc_file_vol}" -fi - -echo "Functest: volumes defined" - -FUNCTEST_IMAGE="opnfv/functest" -if [ "$HOST_ARCH" = "aarch64" ]; then - FUNCTEST_IMAGE="${FUNCTEST_IMAGE}_${HOST_ARCH}" -fi - -echo "Functest: Pulling Functest Docker image ${FUNCTEST_IMAGE}:${DOCKER_TAG}" -docker pull ${FUNCTEST_IMAGE}:$DOCKER_TAG >/dev/null - -cmd="sudo docker run --privileged=true -id ${envs} ${volumes} \ - ${custom_params} ${TESTCASE_OPTIONS} \ - ${FUNCTEST_IMAGE}:${DOCKER_TAG} /bin/bash" -echo "Functest: Running docker run command: ${cmd}" -${cmd} >${redirect} -sleep 5 -container_id=$(docker ps | grep "${FUNCTEST_IMAGE}:${DOCKER_TAG}" | awk '{print $1}' | head -1) -echo "Container ID=${container_id}" -if [ -z ${container_id} ]; then - echo "Cannot find opnfv/functest container ID ${container_id}. Please check if it is existing." - docker ps -a - exit 1 -fi -echo "Starting the container: docker start ${container_id}" -docker start ${container_id} -sleep 5 -docker ps >${redirect} -if [ $(docker ps | grep "${FUNCTEST_IMAGE}:${DOCKER_TAG}" | wc -l) == 0 ]; then - echo "The container ${FUNCTEST_IMAGE} with ID=${container_id} has not been properly started. Exiting..." - exit 1 -fi - -cmd="prepare_env start" -echo "Executing command inside the docker: ${cmd}" -docker exec ${container_id} ${cmd} diff --git a/jjb/global/basic-jobs.yml b/jjb/global/basic-jobs.yml new file mode 100644 index 000000000..e55f068ca --- /dev/null +++ b/jjb/global/basic-jobs.yml @@ -0,0 +1,46 @@ +--- +## +# Basic Job Config +# +# This is used for project which don't have any jobs of substance +# defined yet, but still need 'Verified+1'. +## +- job-group: + name: '{project}-verify-basic' + + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false + + jobs: + - '{project}-verify-{stream}' + +- job-template: + name: '{project}-verify-{stream}' + + disabled: '{obj:disabled}' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-defaults' + + scm: + - git-scm-gerrit + + triggers: + - gerrit-trigger-patchset-created: + project: '{project}' + branch: '{branch}' + files: 'docs/**|.gitignore' + + builders: + - shell: | + echo "Nothing to verify!" diff --git a/jjb/global/installer-report.sh b/jjb/global/installer-report.sh new file mode 100755 index 000000000..e2fcfd6f6 --- /dev/null +++ b/jjb/global/installer-report.sh @@ -0,0 +1,25 @@ +#!/bin/bash +############################################################################## +# Copyright (c) 2017 ZTE Corporation and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +source $WORKSPACE/installer_track.sh +echo """ + INSTALLER: $INSTALLER + INSTALLER_VERSION: $INSTALLER_VERSION + JOB_NAME: $JOB_NAME + BUILD_ID: $BUILD_ID + SENARIO: $DEPLOY_SCENARIO + UPSTREAM_JOB_NAME: $UPSTREAM_JOB_NAME: + UPSTREAM_BUILD_ID: $UPSTREAM_BUILD_ID + PROVISION_RESULT: $PROVISION_RESULT + TIMESTAMP_START: $TIMESTAMP_START + TIMESTAMP_END: `date '+%Y-%m-%d %H:%M:%S.%3N'` + POD_NAME: $NODE_NAME +""" + +# TODO call TestAPI to report installer provisoin result when API is ready diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml index 62c22bd3f..330584e25 100644 --- a/jjb/global/releng-macros.yml +++ b/jjb/global/releng-macros.yml @@ -76,6 +76,16 @@ submodule: recursive: true timeout: 20 + +- scm: + name: git-scm-openstack + scm: + - git: &git-scm-openstack-defaults + url: '$GIT_BASE' + branches: + - 'origin/$BRANCH' + timeout: 15 + - trigger: name: 'daily-trigger-disabled' triggers: @@ -141,7 +151,7 @@ - gerrit: server-name: 'gerrit.opnfv.org' trigger-on: - - ref-updated + - ref-updated-event projects: - project-compare-type: 'ANT' project-pattern: '{project}' @@ -284,28 +294,6 @@ fi - builder: - name: build-and-upload-artifacts-json-api - builders: - - shell: | - #!/bin/bash - set -o errexit - set -o pipefail - export PATH=$PATH:/usr/local/bin/ - - virtualenv -p python2.7 $WORKSPACE/releng_artifacts - source $WORKSPACE/releng_artifacts/bin/activate - - # install python packages - pip install google-api-python-client - - # generate and upload index file - echo "Generating Artifacts API ..." - python $WORKSPACE/utils/opnfv-artifacts.py > index.json - gsutil cp index.json gs://artifacts.opnfv.org/index.json - - deactivate - -- builder: name: lint-python-code builders: - shell: | @@ -405,7 +393,12 @@ echo "Running yaml code on $PROJECT ..." # Get list of yaml files - YAML_FILES=$(git --no-pager diff --diff-filter=MCRAT --name-only HEAD^1 | egrep "ya?ml$") + YAML_FILES=$(git --no-pager diff --diff-filter=MCRAT --name-only HEAD^1 | egrep "ya?ml$") || true + + #If YAML_FILES is none exit with 0 + if [ -z "$YAML_FILES" ]; then + exit 0 + fi # Ensure we start with a clean environment rm -f yaml-violation.log lint.log @@ -438,6 +431,12 @@ - shell: | find $WORKSPACE -type f -name '*.log' | xargs rm -f +- builder: + name: track-begin-timestamp + builders: + - shell: | + echo "export TIMESTAMP_START="\'`date '+%Y-%m-%d %H:%M:%S.%3N'`\' > $WORKSPACE/installer_track.sh + - publisher: name: archive-artifacts publishers: @@ -480,3 +479,521 @@ failure: true send-to: - recipients + +# Email PTL publishers +- email_ptl_defaults: &email_ptl_defaults + name: 'email_ptl_defaults' + content-type: text + attach-build-log: true + attachments: '*.log' + compress-log: true + always: true + subject: '{subject}' + +- publisher: &email_apex_ptl_defaults + name: 'email-apex-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + trozet@redhat.com +- publisher: + name: 'email-apex-os-net-config-ptl' + <<: *email_apex_ptl_defaults +- publisher: + name: 'email-apex-puppet-tripleo-ptl' + <<: *email_apex_ptl_defaults +- publisher: + name: 'email-apex-tripleo-heat-templates-ptl' + <<: *email_apex_ptl_defaults + +- publisher: + name: 'email-armband-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + bob.monkman@arm.com + +- publisher: + name: 'email-auto-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + tina.tsou@arm.com + +- publisher: + name: 'email-availability-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + fuqiao@chinamobile.com + +- publisher: + name: 'email-bamboo-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + donaldh@cisco.com + +- publisher: + name: 'email-barometer-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + aasmith@redhat.com + +- publisher: + name: 'email-bottlenecks-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + gabriel.yuyang@huawei.com + +- publisher: + name: 'email-calipso-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + korlev@cisco.com + +- publisher: + name: 'email-clover-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + stephen.wong1@huawei.com + +- publisher: &email_compass4nfv_ptl_defaults + name: 'email-compass4nfv-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + chigang@huawei.com +- publisher: + name: 'email-compass-containers-ptl' + <<: *email_compass4nfv_ptl_defaults + +- publisher: + name: 'email-conductor-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + limingjiang@huawei.com + +- publisher: + name: 'email-container4nfv-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + jiaxuan@chinamobile.com + +- publisher: + name: 'email-copper-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + aimeeu.opensource@gmail.com + +- publisher: + name: 'email-cperf-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + matt.welch@intel.com + +- publisher: + name: 'email-daisy-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + hu.zhijiang@zte.com.cn + +- publisher: + name: 'email-doctor-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + r-mibu@cq.jp.nec.com + +- publisher: + name: 'email-domino-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + ulas.kozat@huawei.com + +- publisher: + name: 'email-dovetail-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + hongbo.tianhongbo@huawei.com + +- publisher: + name: 'email-dpacc-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + denglingli@chinamobile.com + +- publisher: + name: 'email-enfv-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + JBuchanan@advaoptical.com + +- publisher: + name: 'email-escalator-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + kong.wei2@zte.com.cn + +- publisher: + name: 'email-fastpathmetrics-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + maryam.tahhan@intel.com + +- publisher: + name: 'email-fds-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + fbrockne@cisco.com + +- publisher: + name: 'email-fuel-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + gelkinbard@mirantis.com + +- publisher: + name: 'email-functest-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + cedric.ollivier@orange.com + +- publisher: + name: 'email-ipv6-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + bh526r@att.com + +- publisher: + name: 'email-joid-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + artur.tyloch@canonical.com + +- publisher: + name: 'email-kvmfornfv-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + raghuveer.reddy@intel.com + +- publisher: + name: 'email-models-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + bs3131@att.com + +- publisher: + name: 'email-moon-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + ruan.he@orange.com + +- publisher: + name: 'email-multisite-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + joehuang@huawei.com + +- publisher: + name: 'email-netready-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + georg.kunz@ericsson.com + +- publisher: + name: 'email-nfvbench-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + ahothan@cisco.com + +- publisher: + name: 'email-octopus-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + ulrich.kleber@huawei.com + +- publisher: + name: 'email-onosfw-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + su.wei@huawei.com + +- publisher: + name: 'email-openretriever-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + jiaxuan@chinamobile.com + +- publisher: + name: 'email-opera-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + Yingjun.li@huawei.com + +- publisher: + name: 'email-opnfvdocs-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + sofia.wallin@ericsson.com + +- publisher: + name: 'email-orchestra-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + giuseppe.carella@fokus.fraunhofer.de + +- publisher: + name: 'email-ovn4nfv-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + trinath.somanchi@gmail.com + +- publisher: + name: 'email-ovno-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + wsmackie@juniper.net + +- publisher: + name: 'email-ovsnfv-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + MarkD.Graymark.d.gray@intel.com + +- publisher: + name: 'email-parser-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + shang.xiaodong@zte.com.cn + +- publisher: &email_pharos_ptl_defaults + name: 'email-pharos-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + jack.morgan@intel.com +- publisher: + name: 'email-pharos-tools-ptl' + <<: *email_pharos_ptl_defaults + +- publisher: + name: 'email-promise-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + kunzmann@docomolab-euro.com + +- publisher: + name: 'email-qtip-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + wu.zhihui1@zte.com.cn + +- publisher: &email_releng_ptl_defaults + name: 'email-releng-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + fatih.degirmenci@ericsson.com +- publisher: + name: 'email-releng-anteater-ptl' + <<: *email_releng_ptl_defaults +- publisher: + name: 'email-releng-testresults-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + fatih.degirmenci@ericsson.com + feng.xiaowei@zte.com.cn +- publisher: + name: 'email-releng-utils-ptl' + <<: *email_releng_ptl_defaults +- publisher: + name: 'email-releng-xci-ptl' + <<: *email_releng_ptl_defaults + +- publisher: + name: 'email-samplevnf-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + deepak.s@intel.com + +- publisher: + name: 'email-sdnvpn-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + tim.irnich@ericsson.com + +- publisher: + name: 'email-securityscanning-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + lhinds@redhat.com + +- publisher: + name: 'email-sfc-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + ManuelBuilmbuil@suse.com + +- publisher: + name: 'email-snaps-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + s.pisarski@cablelabs.com + +- publisher: + name: 'email-stor4nfv-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + shane.wang@intel.com + +- publisher: + name: 'email-storperf-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + mark.beierl@emc.com + +- publisher: + name: 'email-ves-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + bryan.sullivan@att.com + +- publisher: + name: 'email-vswitchperf-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + sridhar.rao@spirent.com + +- publisher: + name: 'email-yardstick-ptl' + publishers: + - email-ext: + <<: *email_ptl_defaults + recipients: > + ross.b.brattain@intel.com + +- publisher: + name: 'report-provision-result' + publishers: + - postbuildscript: + script-only-if-succeeded: true + builders: + - shell: | + echo "export PROVISION_RESULT=SUCCEED" >> $WORKSPACE/installer_track.sh + echo "export INSTALLER={installer}" >> $WORKSPACE/installer_track.sh + - shell: + !include-raw-escape: installer-report.sh + - postbuildscript: + script-only-if-failed: true + builders: + - shell: | + echo "export PROVISION_RESULT=FAIL" >> $WORKSPACE/installer_track.sh + echo "export INSTALLER={installer}" >> $WORKSPACE/installer_track.sh + - shell: + !include-raw-escape: installer-report.sh diff --git a/jjb/global/slave-params.yml b/jjb/global/slave-params.yml index 04de1e091..5c1c7df8f 100644 --- a/jjb/global/slave-params.yml +++ b/jjb/global/slave-params.yml @@ -178,6 +178,44 @@ default: /root/.ssh/id_rsa description: 'SSH key to use for Apex' +- parameter: + name: 'lf-pod4-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - lf-pod4 + default-slaves: + - lf-pod4 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' + +- parameter: + name: 'lf-pod5-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - lf-pod5 + default-slaves: + - lf-pod5 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: SSH_KEY + default: /root/.ssh/id_rsa + description: 'SSH key to use for Apex' + ##################################################### # Parameters for CI baremetal PODs ##################################################### @@ -441,6 +479,22 @@ description: "Directory where the build artifact will be located upon the completion of the build." - parameter: + name: 'pharos-dashboard-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'pharos-dashboard' + description: 'Slave label on Jenkins' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: BUILD_DIRECTORY + default: $WORKSPACE/build_output + description: "Directory where the build artifact will be located upon the completion of the build." + +- parameter: name: 'opnfv-build-defaults' parameters: - label: @@ -457,6 +511,18 @@ description: "Directory where the build artifact will be located upon the completion of the build." - parameter: + name: 'ericsson-build3-defaults' + parameters: + - label: + name: SLAVE_LABEL + default: 'ericsson-build3' + description: 'Slave label on Jenkins' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + +- parameter: name: 'huawei-build-defaults' parameters: - node: @@ -635,6 +701,20 @@ default: https://gerrit.opnfv.org/gerrit/$PROJECT - parameter: + name: 'intel-pod17-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - intel-pod17 + default-slaves: + - intel-pod17 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + +- parameter: name: 'huawei-virtual5-defaults' parameters: - label: @@ -742,6 +822,29 @@ description: 'pxe bridge for booting of Daisy master' - parameter: + name: 'zte-pod9-defaults' + parameters: + - node: + name: SLAVE_NAME + description: 'Slave name on Jenkins' + allowed-slaves: + - zte-pod9 + default-slaves: + - zte-pod9 + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: INSTALLER_IP + default: '10.20.7.2' + description: 'IP of the installer' + - string: + name: BRIDGE + default: 'br0' + description: 'pxe bridge for booting of Daisy master' + +- parameter: name: zte-virtual5-defaults parameters: - node: @@ -946,6 +1049,12 @@ default-slave: 'doctor-fuel-verify' - parameter: + name: 'doctor-fuel-build-aarch64-verify-defaults' + parameters: + - 'doctor-defaults': + default-slave: 'doctor-fuel-build-aarch64-verify' + +- parameter: name: 'doctor-joid-verify-defaults' parameters: - 'doctor-defaults': diff --git a/jjb/ipv6/ipv6.yml b/jjb/ipv6/ipv6.yml index f51c4970b..2946ec77b 100644 --- a/jjb/ipv6/ipv6.yml +++ b/jjb/ipv6/ipv6.yml @@ -1,64 +1,8 @@ --- -################################################### -# All the jobs except verify have been removed! -# They will only be enabled on request by projects! -################################################### - project: name: ipv6 project: '{name}' jobs: - - 'ipv6-verify-{stream}' - - stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - euphrates: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - -- job-template: - name: 'ipv6-verify-{stream}' - - disabled: '{obj:disabled}' - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' - - scm: - - git-scm-gerrit - - 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' - - builders: - - shell: | - echo "Nothing to verify!" + - '{project}-verify-basic' diff --git a/jjb/joid/joid-daily-jobs.yml b/jjb/joid/joid-daily-jobs.yml index 569bff293..947b2f1ab 100644 --- a/jjb/joid/joid-daily-jobs.yml +++ b/jjb/joid/joid-daily-jobs.yml @@ -18,6 +18,11 @@ branch: 'stable/{stream}' disabled: false gs-pathname: '/{stream}' + master: &master + stream: master + branch: '{stream}' + disabled: false + gs-pathname: '' # ------------------------------- # POD, INSTALLER, AND BRANCH MAPPING # ------------------------------- @@ -27,7 +32,9 @@ - baremetal: slave-label: joid-baremetal <<: *euphrates - + - baremetal: + slave-label: joid-baremetal + <<: *master # ------------------------------- # scenarios # ------------------------------- @@ -56,6 +63,14 @@ auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger' - 'os-nosdn-openbaton-ha': auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger' + - 'k8-canal-lb-noha': + auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger' + - 'k8-nosdn-lb_ceph-noha': + auto-trigger-name: 'joid-{scenario}-{pod}-{stream}-trigger' + - 'k8-multus-lb-noha': + auto-trigger-name: 'daily-trigger-disabled' + - 'os-ovn-nofeature-ha': + auto-trigger-name: 'daily-trigger-disabled' jobs: - 'joid-{scenario}-{pod}-daily-{stream}' @@ -222,53 +237,148 @@ name: 'joid-os-nosdn-nofeature-ha-baremetal-euphrates-trigger' triggers: - timed: '5 2 * * *' +# os-nosdn-nofeature-ha trigger - branch: master +- trigger: + name: 'joid-os-nosdn-nofeature-ha-baremetal-master-trigger' + triggers: + - timed: '5 2 * * *' # os-odl_l2-nofeature-ha trigger - branch: euphrates - trigger: name: 'joid-os-odl_l2-nofeature-ha-baremetal-euphrates-trigger' triggers: - timed: '5 7 * * *' +# os-odl_l2-nofeature-ha trigger - branch: master +- trigger: + name: 'joid-os-odl_l2-nofeature-ha-baremetal-master-trigger' + triggers: + - timed: '5 7 * * *' # os-nosdn-lxd-noha trigger - branch: euphrates - trigger: name: 'joid-os-nosdn-lxd-noha-baremetal-euphrates-trigger' triggers: - timed: '5 22 * * *' +# os-nosdn-lxd-noha trigger - branch: master +- trigger: + name: 'joid-os-nosdn-lxd-noha-baremetal-master-trigger' + triggers: + - timed: '5 22 * * *' # os-nosdn-lxd-ha trigger - branch: euphrates - trigger: name: 'joid-os-nosdn-lxd-ha-baremetal-euphrates-trigger' triggers: - timed: '5 10 * * *' +# os-nosdn-lxd-ha trigger - branch: master +- trigger: + name: 'joid-os-nosdn-lxd-ha-baremetal-master-trigger' + triggers: + - timed: '5 10 * * *' # os-nosdn-nofeature-noha trigger - branch: euphrates - trigger: name: 'joid-os-nosdn-nofeature-noha-baremetal-euphrates-trigger' triggers: - timed: '5 4 * * *' +# os-nosdn-nofeature-noha trigger - branch: master +- trigger: + name: 'joid-os-nosdn-nofeature-noha-baremetal-master-trigger' + triggers: + - timed: '5 4 * * *' # k8-nosdn-nofeature-noha trigger - branch: euphrates - trigger: name: 'joid-k8-nosdn-nofeature-noha-baremetal-euphrates-trigger' triggers: - timed: '5 15 * * *' +# k8-nosdn-nofeature-noha trigger - branch: master +- trigger: + name: 'joid-k8-nosdn-nofeature-noha-baremetal-master-trigger' + triggers: + - timed: '5 15 * * *' # k8-nosdn-lb-noha trigger - branch: euphrates - trigger: name: 'joid-k8-nosdn-lb-noha-baremetal-euphrates-trigger' triggers: - timed: '5 20 * * *' +# k8-nosdn-lb-noha trigger - branch: master +- trigger: + name: 'joid-k8-nosdn-lb-noha-baremetal-master-trigger' + triggers: + - timed: '5 20 * * *' # k8-ovn-lb-noha trigger - branch: euphrates - trigger: name: 'joid-k8-ovn-lb-noha-baremetal-euphrates-trigger' triggers: - timed: '5 17 * * *' +# k8-ovn-lb-noha trigger - branch: master +- trigger: + name: 'joid-k8-ovn-lb-noha-baremetal-master-trigger' + triggers: + - timed: '5 17 * * *' # os-nosdn-openbaton-ha trigger - branch: euphrates - trigger: name: 'joid-os-nosdn-openbaton-ha-baremetal-euphrates-trigger' triggers: - - timed: '5 25 * * *' + - timed: '5 23 * * *' +# os-nosdn-openbaton-ha trigger - branch: master +- trigger: + name: 'joid-os-nosdn-openbaton-ha-baremetal-master-trigger' + triggers: + - timed: '5 23 * * *' # os-ocl-nofeature-ha trigger - branch: euphrates - trigger: name: 'joid-os-ocl-nofeature-ha-baremetal-euphrates-trigger' triggers: - timed: '5 13 * * *' -# os-ocl-nofeature-ha trigger - branch: euphrates +# os-ocl-nofeature-ha trigger - branch: master +- trigger: + name: 'joid-os-ocl-nofeature-ha-baremetal-master-trigger' + triggers: + - timed: '5 13 * * *' +# os-ocl-nofeature-noha trigger - branch: euphrates - trigger: name: 'joid-os-ocl-nofeature-noha-baremetal-euphrates-trigger' triggers: - - timed: '5 17 * * *' + - timed: '5 16 * * *' +# os-ocl-nofeature-noha trigger - branch: master +- trigger: + name: 'joid-os-ocl-nofeature-noha-baremetal-master-trigger' + triggers: + - timed: '5 16 * * *' +# k8-canal-lb-noha trigger - branch: euphrates +- trigger: + name: 'joid-k8-canal-lb-noha-baremetal-euphrates-trigger' + triggers: + - timed: '5 14 * * *' +# k8-canal-lb-noha trigger - branch: master +- trigger: + name: 'joid-k8-canal-lb-noha-baremetal-master-trigger' + triggers: + - timed: '5 14 * * *' +# k8-multus-lb-noha trigger - branch: euphrates +- trigger: + name: 'joid-k8-multus-lb-noha-baremetal-euphrates-trigger' + triggers: + - timed: '5 18 * * *' +# k8-multus-lb-noha trigger - branch: master +- trigger: + name: 'joid-k8-multus-lb-noha-baremetal-master-trigger' + triggers: + - timed: '5 18 * * *' +# k8-nosdn-lb_ceph-noha trigger - branch: euphrates +- trigger: + name: 'joid-k8-nosdn-lb_ceph-noha-baremetal-euphrates-trigger' + triggers: + - timed: '5 18 * * *' +# k8-nosdn-lb_ceph-noha trigger - branch: master +- trigger: + name: 'joid-k8-nosdn-lb_ceph-noha-baremetal-master-trigger' + triggers: + - timed: '5 18 * * *' +# os-ovn-nofeature-ha trigger - branch: euphrates +- trigger: + name: 'joid-os-ovn-nofeature-ha-baremetal-euphrates-trigger' + triggers: + - timed: '5 19 * * *' +# os-ovn-nofeature-ha trigger - branch: master +- trigger: + name: 'joid-os-ovn-nofeature-ha-baremetal-master-trigger' + triggers: + - timed: '5 19 * * *' diff --git a/jjb/kvmfornfv/kvmfornfv.yml b/jjb/kvmfornfv/kvmfornfv.yml index aae6e028e..ad497e97d 100644 --- a/jjb/kvmfornfv/kvmfornfv.yml +++ b/jjb/kvmfornfv/kvmfornfv.yml @@ -8,7 +8,7 @@ - master: branch: '{stream}' gs-pathname: '' - disabled: true + disabled: false - euphrates: branch: 'stable/{stream}' gs-pathname: '/{stream}' diff --git a/jjb/models/models.yml b/jjb/models/models.yml index b317c05f2..40fcf68de 100644 --- a/jjb/models/models.yml +++ b/jjb/models/models.yml @@ -1,69 +1,8 @@ --- -################################################### -# All the jobs except verify have been removed! -# They will only be enabled on request by projects! -################################################### - project: name: models project: '{name}' jobs: - - 'models-verify-{stream}' - - stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - euphrates: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - -- job-template: - name: 'models-verify-{stream}' - - disabled: '{obj:disabled}' - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' - - scm: - - git-scm-gerrit - - 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' - - builders: - - shell: | - #!/bin/bash - set -o errexit - set -o nounset - set -o pipefail - - # shellcheck -f tty tests/*.sh + - '{project}-verify-basic' diff --git a/jjb/netready/netready.yml b/jjb/netready/netready.yml index b72eeaa46..798029373 100644 --- a/jjb/netready/netready.yml +++ b/jjb/netready/netready.yml @@ -5,7 +5,7 @@ project: '{name}' jobs: - - 'netready-verify-{stream}' + - '{project}-verify-{stream}' - 'netready-build-gluon-packages-daily-{stream}' stream: @@ -15,47 +15,6 @@ disabled: false - job-template: - name: 'netready-verify-{stream}' - - disabled: '{obj:disabled}' - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - scm: - - git-scm-gerrit - - 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/**' - - builders: - - shell: | - echo "Nothing to verify!" - - -- job-template: name: 'netready-build-gluon-packages-daily-{stream}' disabled: true diff --git a/jjb/octopus/octopus.yml b/jjb/octopus/octopus.yml index fb6263d81..a04d7f10d 100644 --- a/jjb/octopus/octopus.yml +++ b/jjb/octopus/octopus.yml @@ -8,56 +8,4 @@ project: '{name}' jobs: - - 'octopus-verify-{stream}' - - stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - euphrates: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - -- job-template: - name: 'octopus-verify-{stream}' - - disabled: '{obj:disabled}' - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' - - scm: - - git-scm-gerrit - - 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' - - builders: - - shell: | - echo "Nothing to verify!" + - '{project}-verify-basic' diff --git a/jjb/ovn4nfv/ovn4nfv-project-jobs.yml b/jjb/ovn4nfv/ovn4nfv-project-jobs.yml index b5e078ca6..97d1baefd 100644 --- a/jjb/ovn4nfv/ovn4nfv-project-jobs.yml +++ b/jjb/ovn4nfv/ovn4nfv-project-jobs.yml @@ -4,7 +4,6 @@ project: '{name}' - stream: - master: branch: '{stream}' @@ -33,10 +32,11 @@ max-per-node: 1 option: 'project' - parametert: + parameters: - project-parameter: project: '{project}' branch: '{branch}' + - opnfv-build-defaults scm: - git-scm diff --git a/jjb/pharos/check-jinja2.yml b/jjb/pharos/check-jinja2.yml new file mode 100644 index 000000000..8ee2a2aa1 --- /dev/null +++ b/jjb/pharos/check-jinja2.yml @@ -0,0 +1,87 @@ +--- +######################## +# Job configuration to validate jinja2 files +######################## +- project: + + name: validate-pdf-templates + + project: 'pharos' + + jobs: + - 'validate-pdf-jinja2-templates-{stream}' + + stream: + - master: + branch: '{stream}' + disabled: false + - euphrates: + branch: 'stable/{stream}' + disabled: false + +######################## +# job templates +######################## + +- job-template: + name: 'validate-pdf-jinja2-templates-{stream}' + + disabled: '{obj:disabled}' + + concurrent: true + + parameters: + - project-parameter: + project: $GERRIT_PROJECT + branch: '{branch}' + - node: + name: SLAVE_NAME + description: Slave to execute jnija template test + default-slaves: + - lf-build1 + allowed-multiselect: true + ignore-offline-nodes: true + + scm: + - git-scm-gerrit + + 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: 'REG_EXP' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + file-paths: + - compare-type: ANT + pattern: '**/*.yaml' + - compare-type: ANT + pattern: 'config/installers/**/*.j2' + - compare-type: ANT + pattern: 'check-jinja2.sh' + skip-vote: + successful: true + failed: true + unstable: true + notbuilt: true + + builders: + - check-pdf-jinja + +- builder: + name: check-pdf-jinja + builders: + - shell: | + $WORKSPACE/config/utils/check-jinja2.sh diff --git a/jjb/pharos/pharos.yml b/jjb/pharos/pharos.yml index 7af4f0fa6..e1628250d 100644 --- a/jjb/pharos/pharos.yml +++ b/jjb/pharos/pharos.yml @@ -1,8 +1,4 @@ --- -################################################### -# All the jobs except verify have been removed! -# They will only be enabled on request by projects! -################################################### - project: name: pharos @@ -10,29 +6,50 @@ - '{name}' - '{name}-tools' + disabled: false + jobs: - - '{project}-verify-{stream}' + - '{project}-verify-basic' + - 'backup-pharos-dashboard' + - 'deploy-pharos-dashboard' + +- job-template: + name: 'backup-pharos-dashboard' + + disabled: '{obj:disabled}' + + parameters: + - 'pharos-dashboard-defaults' + + triggers: + - timed: '@daily' - stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - euphrates: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false + builders: + - shell: | + BACKUP_DIR=$HOME/backups/ + TMP_DIR=$HOME/tmp/ + mkdir -p $BACKUP_DIR + echo "-- $(date +%Y%m%d) --" + echo "Backing up Pharos Dashboard data..." + sudo docker run --rm \ + -v pharos-data:/pharos-data:ro \ + -v $TMP_DIR:/backup \ + alpine \ + tar -czf /backup/pharos-dashboard-db-$(date +%Y%m%d).tar.gz -C /pharos-data ./ + sudo mv $TMP_DIR/pharos-dashboard-db-$(date +%Y%m%d).tar.gz $BACKUP_DIR + sudo chown $USER:$USER $BACKUP_DIR/pharos-dashboard-db-$(date +%Y%m%d).tar.gz + echo "...complete" - job-template: - name: '{project}-verify-{stream}' + name: 'deploy-pharos-dashboard' disabled: '{obj:disabled}' parameters: - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' + project: 'pharos-tools' + branch: 'master' + - 'pharos-dashboard-defaults' scm: - git-scm-gerrit @@ -41,26 +58,18 @@ - 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' + - ref-updated-event - comment-added-contains-event: - comment-contains-value: 'reverify' + comment-contains-value: '^redeploy$' projects: - project-compare-type: 'ANT' - project-pattern: '{project}' + project-pattern: 'pharos-tools' branches: - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - disable-strict-forbidden-file-verification: 'true' - forbidden-file-paths: - - compare-type: ANT - pattern: 'docs/**|.gitignore' + branch-pattern: '**/master' builders: - shell: | - echo "Nothing to verify!" + cd $WORKSPACE/dashboard + sudo docker-compose build + sudo docker-compose up -d diff --git a/jjb/prediction/prediction.yml b/jjb/prediction/prediction.yml index 5e6e834e8..b686d9524 100644 --- a/jjb/prediction/prediction.yml +++ b/jjb/prediction/prediction.yml @@ -1,64 +1,8 @@ --- -################################################### -# All the jobs except verify have been removed! -# They will only be enabled on request by projects! -################################################### - project: name: prediction project: '{name}' jobs: - - 'prediction-verify-{stream}' - - stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - euphrates: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - -- job-template: - name: 'prediction-verify-{stream}' - - disabled: '{obj:disabled}' - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' - - scm: - - git-scm-gerrit - - 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' - - builders: - - shell: | - echo "Nothing to verify!" + - '{project}-verify-basic' diff --git a/jjb/promise/promise.yml b/jjb/promise/promise.yml index 3f1d9e23b..6e6fb54a8 100644 --- a/jjb/promise/promise.yml +++ b/jjb/promise/promise.yml @@ -1,64 +1,8 @@ --- -################################################### -# All the jobs except verify have been removed! -# They will only be enabled on request by projects! -################################################### - project: name: promise project: '{name}' jobs: - - 'promise-verify-{stream}' - - stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - euphrates: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - -- job-template: - name: 'promise-verify-{stream}' - - disabled: '{obj:disabled}' - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' - - scm: - - git-scm-gerrit - - 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' - - builders: - - shell: | - echo "Nothing to verify!" + - '{project}-verify-basic' diff --git a/jjb/qtip/qtip-experimental-jobs.yml b/jjb/qtip/qtip-experimental-jobs.yml index fdfed2601..103069fb7 100644 --- a/jjb/qtip/qtip-experimental-jobs.yml +++ b/jjb/qtip/qtip-experimental-jobs.yml @@ -7,7 +7,7 @@ name: qtip-experimental-jobs project: qtip jobs: - - 'qtip-experimental-{stream}' + - 'qtip-experimental-{pod}-{stream}' stream: - master: branch: '{stream}' @@ -18,12 +18,17 @@ gs-pathname: '/{stream}' disabled: false + pod: + - zte-virtual6: + installer: fuel + pod: zte-virtual6 + ################################ ## job templates ################################# - job-template: - name: 'qtip-experimental-{stream}' + name: 'qtip-experimental-{pod}-{stream}' disabled: '{obj:disabled}' @@ -31,9 +36,8 @@ - project-parameter: project: '{project}' branch: '{branch}' - # Pin the tests on zte-pod4 with apex deployment - - apex-defaults - - zte-virtual5-defaults + - '{installer}-defaults' + - '{pod}-defaults' scm: - git-scm-gerrit diff --git a/jjb/qtip/qtip-validate-jobs.yml b/jjb/qtip/qtip-validate-jobs.yml index 07f2431bc..d9d3e72e6 100644 --- a/jjb/qtip/qtip-validate-jobs.yml +++ b/jjb/qtip/qtip-validate-jobs.yml @@ -49,13 +49,13 @@ # JOB LIST # ------------------------------- jobs: - - 'qtip-{qpi}-{installer}-{stream}' + - 'qtip-{qpi}-{installer}-{pod}-{stream}' ################################ # job templates ################################ - job-template: - name: 'qtip-{qpi}-{installer}-{stream}' + name: 'qtip-{qpi}-{installer}-{pod}-{stream}' disabled: false parameters: @@ -89,7 +89,7 @@ wrappers: - timeout: - timeout: 15 + timeout: 30 abort: true - timestamps diff --git a/jjb/qtip/qtip-verify-jobs.yml b/jjb/qtip/qtip-verify-jobs.yml index 047d7f2be..783c92b04 100644 --- a/jjb/qtip/qtip-verify-jobs.yml +++ b/jjb/qtip/qtip-verify-jobs.yml @@ -8,8 +8,6 @@ project: qtip jobs: - 'qtip-verify-{stream}' - - 'qtip-verify-notebook-{stream}' - - 'qtip-merged-notebook-{stream}' stream: - master: branch: '{stream}' @@ -67,7 +65,8 @@ - publish-coverage - email-jenkins-admins-on-failure -# upload juypter notebook to artifacts for review +# Upload juypter notebook to artifacts for review +# TODO(yujunz): deal with *.ipynb deletion - job-template: name: 'qtip-verify-notebook-{stream}' @@ -191,7 +190,8 @@ mkdir -p $local_path - git diff HEAD~1 --name-only | grep -E ".+\.ipynb$" | xargs -I '{}' cp '{}' $local_path + git diff HEAD~1 --name-status | grep -E "[AM]\t.+\.ipynb$" | awk '{print $2}' \ + | xargs -I '{}' cp '{}' $local_path gsutil -m cp -r "$local_path" "gs://$gs_base/" echo "Document link(s):" >> gerrit_comment.txt diff --git a/jjb/releng/automate.yml b/jjb/releng/automate.yml index de7fcd6c0..afeb35821 100644 --- a/jjb/releng/automate.yml +++ b/jjb/releng/automate.yml @@ -19,7 +19,7 @@ - '{module}-automate-{phase}-{stream}' - '{module}-verify-{stream}' - project: 'releng' + project: 'releng-testresults' - job: name: 'testapi-mongodb-backup' @@ -30,11 +30,11 @@ default: 'testresults' description: 'Slave label on Jenkins' - project-parameter: - project: 'releng' + project: 'releng-testresults' branch: 'master' - string: name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/releng + default: https://gerrit.opnfv.org/gerrit/releng-testresults description: 'Git URL to use on this Jenkins Slave' scm: @@ -79,11 +79,11 @@ branch-pattern: '**/{branch}' file-paths: - compare-type: 'ANT' - pattern: 'utils/test/{module}/**' + pattern: '{module}/**' builders: - shell: | - cd ./utils/test/{module}/ + cd {module}/ tox if [ -e *.xml ];then cp *.xml $WORKSPACE @@ -143,7 +143,7 @@ branch-pattern: '**/{branch}' file-paths: - compare-type: 'ANT' - pattern: 'utils/test/{module}/**' + pattern: '{module}/**' builders: - description-setter: @@ -208,8 +208,8 @@ - builder: name: 'docker-update' builders: - - shell: - !include-raw: ./docker-update.sh + - shell: | + bash ./ci/docker-update.sh - builder: name: 'testapi-automate-generate-doc-macro' @@ -221,13 +221,13 @@ name: 'testapi-doc-build' builders: - shell: | - bash ./jjb/releng/htmlize/doc-build.sh + bash ./ci/htmlize/doc-build.sh - builder: name: 'upload-doc-artifact' builders: - shell: | - bash ./jjb/releng/htmlize/push-doc-artifact.sh + bash ./ci/htmlize/push-doc-artifacts.sh - builder: name: 'reporting-automate-generate-doc-macro' @@ -238,7 +238,7 @@ name: 'testapi-automate-docker-deploy-macro' builders: - shell: | - sudo bash ./jjb/releng/docker-deploy.sh "sudo docker run -dti --name testapi -p 8082:8000 + sudo bash ./ci/docker-deploy.sh "sudo docker run -dti --name testapi -p 8082:8000 -e mongodb_url=mongodb://172.17.0.1:27017 -e base_url=http://testresults.opnfv.org/test opnfv/testapi" \ "http://testresults.opnfv.org/test/" "testapi" @@ -247,14 +247,15 @@ name: 'reporting-automate-docker-deploy-macro' builders: - shell: | - sudo bash ./jjb/releng/docker-deploy.sh "sudo docker run -itd --name reporting -p 8084:8000 opnfv/reporting" \ + sudo bash ./ci/docker-deploy.sh \ + "sudo docker run -itd --name reporting -p 8084:8000 opnfv/reporting" \ "http://testresults.opnfv.org/reporting/index.html" "reporting" - builder: name: mongodb-backup builders: - - shell: | - bash ./jjb/releng/testapi-backup-mongodb.sh + - shell: + bash ./ci/testapi-backup-mongodb.sh ################################ # job publishers diff --git a/jjb/releng/compass4nfv-docker.yml b/jjb/releng/compass4nfv-docker.yml new file mode 100644 index 000000000..7f142241c --- /dev/null +++ b/jjb/releng/compass4nfv-docker.yml @@ -0,0 +1,174 @@ +--- +############################################## +# job configuration for docker build and push +############################################## +- project: + + name: compass-docker + + project: compass-containers + + stream: + - master: + branch: '{stream}' + disabled: false + - euphrates: + branch: 'stable/{stream}' + disabled: true + + arch_tag: + - 'amd64': + slave_label: 'opnfv-build-ubuntu' + + # yamllint disable rule:key-duplicates + image: + - 'tasks' + - 'cobbler' + - 'db' + - 'deck' + - 'tasks-base' + + # settings for jobs run in multijob phases + build-job-settings: &build-job-settings + current-parameters: false + git-revision: true + node-parameters: false + predefined-parameters: | + PUSH_IMAGE=$PUSH_IMAGE + COMMIT_ID=$COMMIT_ID + GERRIT_REFNAME=$GERRIT_REFNAME + DOCKERFILE=$DOCKERFILE + kill-phase-on: FAILURE + abort-all-jobs: false + + # yamllint enable rule:key-duplicates + jobs: + - "compass-docker-{stream}" + - "compass-{image}-build-{arch_tag}-{stream}" + +######################## +# job templates +######################## +- job-template: + name: 'compass-docker-{stream}' + + project-type: multijob + + disabled: '{obj:disabled}' + + parameters: + - compass-job-parameters: + project: '{project}' + branch: '{branch}' + slave_label: 'opnfv-build-ubuntu' + arch_tag: 'amd64' + + properties: + - throttle: + max-per-node: 1 + option: 'project' + + scm: + - git-scm + + triggers: + - pollscm: + cron: "*/30 * * * *" + + builders: + - multijob: + name: 'build compass-tasks-base images' + execution-type: PARALLEL + projects: + - name: 'compass-tasks-base-build-amd64-{stream}' + <<: *build-job-settings + - multijob: + name: 'build all compass images' + condition: SUCCESSFUL + execution-type: PARALLEL + projects: + - name: 'compass-cobbler-build-amd64-{stream}' + <<: *build-job-settings + - name: 'compass-db-build-amd64-{stream}' + <<: *build-job-settings + - name: 'compass-deck-build-amd64-{stream}' + <<: *build-job-settings + - name: 'compass-tasks-build-amd64-{stream}' + <<: *build-job-settings + + publishers: + - 'compass-amd64-recipients' + +- job-template: + name: 'compass-{image}-build-{arch_tag}-{stream}' + disabled: '{obj:disabled}' + parameters: + - compass-job-parameters: + project: '{project}' + branch: '{branch}' + slave_label: '{slave_label}' + arch_tag: '{arch_tag}' + - string: + name: DOCKER_REPO_NAME + default: "opnfv/compass-{image}" + description: "Dockerhub repo to be pushed to." + - string: + name: DOCKER_DIR + default: "compass-{image}" + description: "Directory containing files needed by the Dockerfile" + scm: + - git-scm + builders: + - shell: + !include-raw-escape: ./opnfv-docker.sh + +# parameter macro +- parameter: + name: compass-job-parameters + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - label: + name: SLAVE_LABEL + default: '{slave_label}' + description: 'Slave label on Jenkins' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + - string: + name: PUSH_IMAGE + default: "true" + description: "To enable/disable pushing the image to Dockerhub." + - string: + name: COMMIT_ID + default: "" + description: "commit id to make a snapshot docker image" + - string: + name: GERRIT_REFNAME + default: "" + description: "Docker tag to be built, e.g. refs/tags/5.0.0, refs/tags/opnfv-5.0.0, refs/tags/5.0.RC1" + - string: + name: DOCKERFILE + default: "Dockerfile" + description: "Dockerfile to use for creating the image." + - string: + name: ARCH_TAG + default: "" + description: "If set, this value will be added to the docker image tag as a prefix" + - string: + name: PROJECT + default: "{project}" + description: "Project name used to enable job conditions" + +# publisher macros +- publisher: + name: 'compass-amd64-recipients' + publishers: + - email: + recipients: > + chigang@huawei.com + huangxiangyui5@huawei.com + xueyifei@huawei.com + wutianwei1@huawei.com diff --git a/jjb/releng/docker-deploy.sh b/jjb/releng/docker-deploy.sh deleted file mode 100644 index 1e8357717..000000000 --- a/jjb/releng/docker-deploy.sh +++ /dev/null @@ -1,152 +0,0 @@ -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one * -# or more contributor license agreements. See the NOTICE file * -# distributed with this work for additional information * -# regarding copyright ownership. The ASF licenses this file * -# to you under the Apache License, Version 2.0 (the * -# "License"); you may not use this file except in compliance * -# with the License. You may obtain a copy of the License at * -# * -# http://www.apache.org/licenses/LICENSE-2.0 * -# * -# Unless required by applicable law or agreed to in writing, * -# software distributed under the License is distributed on an * -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * -# KIND, either express or implied. See the License for the * -# specific language governing permissions and limitations * -# under the License. * - - -command=$1 -url=$2 -module=$3 - -REPO="opnfv" -latest_image=$REPO/$module:latest -old_image=$REPO/$module:old -latest_container_name=$module -old_container_name=$module"_old" -latest_container_id= -old_container_id= -new_start_container= - -function DEBUG() { - echo `date "+%Y-%m-%d %H:%M:%S.%N"` ": $1" -} - -function check_connectivity() { - # check update status via test the connectivity of provide url - sleep 5 - cmd=`curl -s --head --request GET ${url} | grep '200 OK' > /dev/null` - rc=$? - DEBUG $rc - if [[ $rc == 0 ]]; then - return 0 - else - return 1 - fi -} - - -function pull_latest_image() { - DEBUG "pull latest image $latest_image" - docker pull $latest_image -} - -function get_latest_running_container() { - latest_container_id=`docker ps -q --filter name=^/$latest_container_name$` -} - -function get_old_running_container() { - old_container_id=`docker ps -q --filter name=^/$old_container_name$` -} - -function delete_old_image() { - DEBUG "delete old image: $old_image" - docker rmi -f $old_image -} - -function delete_old_container() { - DEBUG "delete old container: $old_container_name" - docker ps -a -q --filter name=^/$old_container_name$ | xargs docker rm -f &>/dev/null -} - -function delete_latest_container() { - DEBUG "delete latest container: $module" - docker ps -a -q --filter name=^/$latest_container_name$ | xargs docker rm -f &>/dev/null -} - -function delete_latest_image() { - DEBUG "delete latest image: $REPO/$module:latest" - docker rmi -f $latest_image -} - -function change_image_tag_2_old() { - DEBUG "change image tag 2 old" - docker tag $latest_image $old_image - docker rmi -f $latest_image -} - -function mark_latest_container_2_old() { - DEBUG "mark latest container to be old" - docker rename "$latest_container_name" "$old_container_name" -} - -function stop_old_container() { - DEBUG "stop old container" - docker stop "$old_container_name" -} - -function run_latest_image() { - new_start_container=`$command` - DEBUG "run latest image: $new_start_container" -} - -get_latest_running_container -get_old_running_container - -if [[ ! -z $latest_container_id ]]; then - DEBUG "latest container is running: $latest_container_id" - delete_old_container - delete_old_image - change_image_tag_2_old - mark_latest_container_2_old - pull_latest_image - stop_old_container - run_latest_image - -elif [[ ! -z $old_container_id ]]; then - DEBUG "old container is running: $old_container_id" - delete_latest_container - delete_latest_image - pull_latest_image - stop_old_container - run_latest_image -else - DEBUG "no container is running" - delete_old_container - delete_old_image - delete_latest_container - delete_latest_image - pull_latest_image - run_latest_image -fi - -if check_connectivity; then - DEBUG "CONGRATS: $module update successfully" -else - DEBUG "ATTENTION: $module update failed" - id=`docker ps -a -q --filter name=^/$old_container_name$` - if [[ ! -z $id ]]; then - DEBUG "start old container instead" - docker stop $new_start_container - docker start $id - fi - if ! check_connectivity; then - DEBUG "BIG ISSUE: no container is running normally" - fi - exit 1 -fi - -docker images -docker ps -a diff --git a/jjb/releng/docker-update.sh b/jjb/releng/docker-update.sh deleted file mode 100644 index 559ac835c..000000000 --- a/jjb/releng/docker-update.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one * -# or more contributor license agreements. See the NOTICE file * -# distributed with this work for additional information * -# regarding copyright ownership. The ASF licenses this file * -# to you under the Apache License, Version 2.0 (the * -# "License"); you may not use this file except in compliance * -# with the License. You may obtain a copy of the License at * -# * -# http://www.apache.org/licenses/LICENSE-2.0 * -# * -# Unless required by applicable law or agreed to in writing, * -# software distributed under the License is distributed on an * -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * -# KIND, either express or implied. See the License for the * -# specific language governing permissions and limitations * -# under the License. * - -set -o errexit -set -o nounset - -cd $WORKSPACE/utils/test/$MODULE_NAME/docker/ - -# Remove previous containers -docker ps -a | grep "opnfv/$MODULE_NAME" | awk '{ print $1 }' | xargs -r docker rm -f - -# Remove previous images -docker images | grep "opnfv/$MODULE_NAME" | awk '{ print $3 }' | xargs -r docker rmi -f - -# Start build -docker build --no-cache -t opnfv/$MODULE_NAME:$DOCKER_TAG . - -# Push Image -docker push opnfv/$MODULE_NAME:$DOCKER_TAG diff --git a/jjb/releng/functest-docker.yml b/jjb/releng/functest-docker.yml index 6c131604b..584dc302c 100644 --- a/jjb/releng/functest-docker.yml +++ b/jjb/releng/functest-docker.yml @@ -37,36 +37,35 @@ build-job-settings: &build-job-settings current-parameters: false git-revision: true - node-parameters: true + node-parameters: false predefined-parameters: | PUSH_IMAGE=$PUSH_IMAGE COMMIT_ID=$COMMIT_ID - RELEASE_VERSION=$RELEASE_VERSION + GERRIT_REFNAME=$GERRIT_REFNAME DOCKERFILE=$DOCKERFILE - ARCH_TAG=$ARCH_TAG kill-phase-on: FAILURE abort-all-jobs: false manifest-job-settings: &manifest-job-settings current-parameters: false git-revision: true - node-parameters: true - predefined-parameters: | - RELEASE_VERSION=$RELEASE_VERSION - ARCH_TAG=$ARCH_TAG + node-parameters: false + predefined-parameters: + GERRIT_REFNAME=$GERRIT_REFNAME kill-phase-on: FAILURE abort-all-jobs: false # yamllint enable rule:key-duplicates jobs: - - "functest-docker-build-push-{arch_tag}-{stream}" - - "functest-{image}-build-push-{arch_tag}-{stream}" - - "functest-{image}-create-manifest-{arch_tag}-{stream}" + - "functest-docker-{stream}" + - "functest-{image}-docker-build-{arch_tag}-{stream}" + - "functest-{image}-docker-manifest-{stream}" + ######################## # job templates ######################## - job-template: - name: 'functest-docker-build-push-{arch_tag}-{stream}' + name: 'functest-docker-{stream}' project-type: multijob @@ -76,12 +75,8 @@ - job-parameters: project: '{project}' branch: '{branch}' - slave_label: '{slave_label}' - arch_tag: '{arch_tag}' - - string: - name: ARCH_TAG - default: "{arch_tag}" - description: "If set, this value will be added to the docker image tag as a prefix" + slave_label: 'opnfv-build-ubuntu' + arch_tag: 'amd64' properties: - throttle: @@ -94,119 +89,139 @@ triggers: - pollscm: cron: "*/30 * * * *" + - gerrit-trigger-tag-created: + project: '{project}' builders: - multijob: - name: 'build-base-img-create-manifest' - execution-type: SEQUENTIAL + name: 'build functest-core images' + execution-type: PARALLEL projects: - - name: 'functest-core-build-push-{arch_tag}-{stream}' + - name: 'functest-core-docker-build-amd64-{stream}' <<: *build-job-settings - - name: 'functest-core-create-manifest-{arch_tag}-{stream}' + - name: 'functest-core-docker-build-arm64-{stream}' + <<: *build-job-settings + - multijob: + name: 'publish functest-core manifests' + execution-type: PARALLEL + projects: + - name: 'functest-core-docker-manifest-{stream}' <<: *manifest-job-settings - multijob: - name: 'build-child-img' + name: 'build all functest images' condition: SUCCESSFUL execution-type: PARALLEL projects: - - name: 'functest-healthcheck-build-push-{arch_tag}-{stream}' + - name: 'functest-healthcheck-docker-build-amd64-{stream}' + <<: *build-job-settings + - name: 'functest-healthcheck-docker-build-arm64-{stream}' + <<: *build-job-settings + - name: 'functest-features-docker-build-amd64-{stream}' + <<: *build-job-settings + - name: 'functest-features-docker-build-arm64-{stream}' + <<: *build-job-settings + - name: 'functest-components-docker-build-amd64-{stream}' + <<: *build-job-settings + - name: 'functest-components-docker-build-arm64-{stream}' + <<: *build-job-settings + - name: 'functest-parser-docker-build-amd64-{stream}' <<: *build-job-settings - - name: 'functest-features-build-push-{arch_tag}-{stream}' + - name: 'functest-parser-docker-build-arm64-{stream}' <<: *build-job-settings - - name: 'functest-components-build-push-{arch_tag}-{stream}' + - name: 'functest-smoke-docker-build-amd64-{stream}' <<: *build-job-settings - - name: 'functest-parser-build-push-{arch_tag}-{stream}' + - name: 'functest-smoke-docker-build-arm64-{stream}' <<: *build-job-settings - - name: 'functest-smoke-build-push-{arch_tag}-{stream}' + - name: 'functest-vnf-docker-build-amd64-{stream}' <<: *build-job-settings - - name: 'functest-vnf-build-push-{arch_tag}-{stream}' + - name: 'functest-vnf-docker-build-arm64-{stream}' <<: *build-job-settings - - name: 'functest-restapi-build-push-{arch_tag}-{stream}' + - name: 'functest-restapi-docker-build-amd64-{stream}' + <<: *build-job-settings + - name: 'functest-restapi-docker-build-arm64-{stream}' <<: *build-job-settings - multijob: - name: 'create-img-manifest' + name: 'publish all manifests' condition: SUCCESSFUL execution-type: PARALLEL projects: - - name: 'functest-healthcheck-create-manifest-{arch_tag}-{stream}' + - name: 'functest-healthcheck-docker-manifest-{stream}' <<: *manifest-job-settings - - name: 'functest-features-create-manifest-{arch_tag}-{stream}' + - name: 'functest-features-docker-manifest-{stream}' <<: *manifest-job-settings - - name: 'functest-components-create-manifest-{arch_tag}-{stream}' + - name: 'functest-components-docker-manifest-{stream}' <<: *manifest-job-settings - - name: 'functest-parser-create-manifest-{arch_tag}-{stream}' + - name: 'functest-parser-docker-manifest-{stream}' <<: *manifest-job-settings - - name: 'functest-smoke-create-manifest-{arch_tag}-{stream}' + - name: 'functest-smoke-docker-manifest-{stream}' <<: *manifest-job-settings - - name: 'functest-vnf-create-manifest-{arch_tag}-{stream}' + - name: 'functest-vnf-docker-manifest-{stream}' <<: *manifest-job-settings - - name: 'functest-restapi-create-manifest-{arch_tag}-{stream}' + - name: 'functest-restapi-docker-manifest-{stream}' <<: *manifest-job-settings publishers: - - 'functest-{arch_tag}-recipients' + - 'functest-amd64-recipients' + - 'functest-arm64-recipients' - job-template: - - name: 'functest-{image}-build-push-{arch_tag}-{stream}' - + name: 'functest-{image}-docker-build-{arch_tag}-{stream}' disabled: '{obj:disabled}' - parameters: - job-parameters: project: '{project}' branch: '{branch}' slave_label: '{slave_label}' arch_tag: '{arch_tag}' - - string: - name: DOCKER_REPO_NAME - default: "opnfv/functest-{image}" - description: "Dockerhub repo to be pushed to." - - string: - name: DOCKER_DIR - default: "docker/{image}" - description: "Directory containing files needed by the Dockerfile" - scm: - git-scm - - publishers: - - 'functest-{arch_tag}-recipients' - builders: - - shell: - !include-raw-escape: ./opnfv-docker.sh + - shell: | + #!/bin/bash -ex + case "{arch_tag}" in + "arm64") + sudo amd64_dirs= arm64_dirs=docker/{image} bash ./build.sh ;; + *) + sudo amd64_dirs=docker/{image} arm64_dirs= bash ./build.sh ;; + esac + exit $? - job-template: - - name: 'functest-{image}-create-manifest-{arch_tag}-{stream}' - - disabled: '{obj:disabled}' + name: 'functest-{image}-docker-manifest-{stream}' parameters: - - job-parameters: + - project-parameter: project: '{project}' branch: '{branch}' - slave_label: '{slave_label}' - arch_tag: '{arch_tag}' + - label: + name: SLAVE_LABEL + default: 'opnfv-build-ubuntu' + description: 'Slave label on Jenkins' - string: - name: DOCKER_REPO_NAME - default: "opnfv/functest-{image}" - description: "Dockerhub repo to be pushed to." + name: PROJECT + default: "{project}" + description: "Project name used to enable job conditions" - string: - name: DOCKER_DIR - default: "docker/{image}" - description: "Directory containing files needed by the Dockerfile" - - builders: - - shell: - !include-raw-escape: ./opnfv-manifest.sh + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' - scm: - - git-scm + disabled: '{obj:disabled}' - publishers: - - 'functest-{arch_tag}-recipients' + builders: + - shell: | + #!/bin/bash -ex + case "{stream}" in + "master") + tag="latest" ;; + *) + tag="{stream}" ;; + esac + sudo manifest-tool push from-args \ + --platforms linux/amd64,linux/arm64 \ + --template opnfv/functest-{image}:ARCH-$tag \ + --target opnfv/functest-{image}:$tag + exit $? # parameter macro - parameter: @@ -232,9 +247,9 @@ default: "" description: "commit id to make a snapshot docker image" - string: - name: RELEASE_VERSION + name: GERRIT_REFNAME default: "" - description: "Docker tag to be built, e.g. 5.0.0, opnfv-5.0.0, 5.0.RC1" + description: "Docker tag to be built, e.g. refs/tags/5.0.0, refs/tags/opnfv-5.0.0, refs/tags/5.0.RC1" - string: name: DOCKERFILE default: "Dockerfile" diff --git a/jjb/releng/htmlize/doc-build.sh b/jjb/releng/htmlize/doc-build.sh deleted file mode 100644 index b89baa8e6..000000000 --- a/jjb/releng/htmlize/doc-build.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -# Licensed to the Apache Software Foundation (ASF) under one * -# or more contributor license agreements. See the NOTICE file * -# distributed with this work for additional information * -# regarding copyright ownership. The ASF licenses this file * -# to you under the Apache License, Version 2.0 (the * -# "License"); you may not use this file except in compliance * -# with the License. You may obtain a copy of the License at * -# * -# http://www.apache.org/licenses/LICENSE-2.0 * -# * -# Unless required by applicable law or agreed to in writing, * -# software distributed under the License is distributed on an * -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * -# KIND, either express or implied. See the License for the * -# specific language governing permissions and limitations * -# under the License. * - -set -o errexit - -# Create virtual environment -virtualenv $WORKSPACE/testapi_venv -source $WORKSPACE/testapi_venv/bin/activate - -# Swgger Codegen Tool -url="http://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.2.1/swagger-codegen-cli-2.2.1.jar" - -# Check for jar file locally and in the repo -if [ ! -f swagger-codegen-cli.jar ]; -then - wget http://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.2.1/swagger-codegen-cli-2.2.1.jar -O swagger-codegen-cli.jar -fi - -# Install Pre-requistics -pip install requests - -python ./jjb/releng/htmlize/htmlize.py -o ${WORKSPACE}/ diff --git a/jjb/releng/htmlize/htmlize.py b/jjb/releng/htmlize/htmlize.py deleted file mode 100644 index da6a6cf91..000000000 --- a/jjb/releng/htmlize/htmlize.py +++ /dev/null @@ -1,57 +0,0 @@ -#!/usr/bin/env python - -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 - -import argparse -import requests -import json -import os - - -def main(args): - - # Merging two specs - api_response = requests.get(args.api_declaration_url) - api_response = json.loads(api_response.content) - resource_response = requests.get(args.resource_listing_url) - resource_response = json.loads(resource_response.content) - resource_response['models'] = api_response['models'] - resource_response['apis'] = api_response['apis'] - - # Storing the swagger specs - with open('specs.json', 'w') as outfile: - json.dump(resource_response, outfile) - - # Generating html page - cmd = 'java -jar swagger-codegen-cli.jar generate \ - -i specs.json -l html2 -o %s' % (args.output_directory) - if os.system(cmd) == 0: - exit(0) - else: - exit(1) - - -if __name__ == '__main__': - parser = argparse.ArgumentParser(description='Create \ - Swagger Spec documentation') - parser.add_argument('-ru', '--resource-listing-url', - type=str, - required=False, - default=('http://testresults.opnfv.org' - '/test/swagger/resources.json'), - help='Resource Listing Spec File') - parser.add_argument('-au', '--api-declaration-url', - type=str, - required=False, - default=('http://testresults.opnfv.org' - '/test/swagger/APIs'), - help='API Declaration Spec File') - parser.add_argument('-o', '--output-directory', - required=True, - default='./', - help='Output Directory where the \ - file should be stored') - main(parser.parse_args()) diff --git a/jjb/releng/htmlize/push-doc-artifact.sh b/jjb/releng/htmlize/push-doc-artifact.sh deleted file mode 100644 index 4cf1988b0..000000000 --- a/jjb/releng/htmlize/push-doc-artifact.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -set -e -set -o pipefail - -export PATH=$PATH:/usr/local/bin/ - -project=$PROJECT -workspace=$WORKSPACE -artifact_dir="$project/docs" - -set +e -gsutil&>/dev/null -if [ $? != 0 ]; then - echo "Not possible to push results to artifact: gsutil not installed" - exit 1 -else - gsutil ls gs://artifacts.opnfv.org/"$project"/ &>/dev/null - if [ $? != 0 ]; then - echo "Not possible to push results to artifact: gsutil not installed." - exit 1 - else - echo "Uploading document to artifact $artifact_dir" - gsutil cp "$workspace"/index.html gs://artifacts.opnfv.org/"$artifact_dir"/testapi.html >/dev/null 2>&1 - echo "Document can be found at http://artifacts.opnfv.org/releng/docs/testapi.html" - fi -fi diff --git a/jjb/releng/opnfv-docker-arm.yml b/jjb/releng/opnfv-docker-arm.yml index 3486a0775..fbf565844 100644 --- a/jjb/releng/opnfv-docker-arm.yml +++ b/jjb/releng/opnfv-docker-arm.yml @@ -15,16 +15,10 @@ stream: euphrates branch: 'stable/{stream}' disabled: false - functest-arm-receivers: &functest-arm-receivers - receivers: > - cristina.pauna@enea.com - alexandru.avadanii@enea.com - delia.popescu@enea.com dovetail-arm-receivers: &dovetail-arm-receivers receivers: > cristina.pauna@enea.com alexandru.avadanii@enea.com - alexandru.nemes@enea.com storperf-arm-receivers: &storperf-arm-receivers receivers: > cristina.pauna@enea.com @@ -34,8 +28,6 @@ receivers: > cristina.pauna@enea.com alexandru.avadanii@enea.com - alexandru.nemes@enea.com - catalina.focsa@enea.com delia.popescu@enea.com other-receivers: &other-receivers receivers: '' @@ -48,10 +40,6 @@ # yamllint disable rule:key-duplicates dockerrepo: # projects with jobs for master - - 'functest': - project: 'functest' - <<: *master - <<: *functest-arm-receivers - 'dovetail': project: 'dovetail' <<: *master @@ -96,10 +84,6 @@ <<: *master <<: *yardstick-arm-receivers # projects with jobs for stable/euphrates - - 'functest': - project: 'functest' - <<: *euphrates - <<: *functest-arm-receivers - 'dovetail': project: 'dovetail' <<: *euphrates @@ -170,9 +154,9 @@ default: "{docker_repo_name}" description: "Dockerhub repo to be pushed to." - string: - name: RELEASE_VERSION + name: GERRIT_REFNAME default: "" - description: "Release version, e.g. 1.0, 2.0, 3.0" + description: "Docker tag to be built, e.g. refs/tags/5.0.0, refs/tags/opnfv-5.0.0, refs/tags/5.0.RC1" - string: name: DOCKER_DIR default: "{dockerdir}" @@ -201,6 +185,8 @@ triggers: - pollscm: cron: "*/30 * * * *" + - gerrit-trigger-tag-created: + project: '{project}' publishers: - email: diff --git a/jjb/releng/opnfv-docker.sh b/jjb/releng/opnfv-docker.sh index c179b1d8e..28e5b7ce1 100644 --- a/jjb/releng/opnfv-docker.sh +++ b/jjb/releng/opnfv-docker.sh @@ -12,11 +12,41 @@ set -o nounset set -o pipefail - -echo "Starting opnfv-docker for $DOCKER_REPO_NAME ..." +echo "Using Docker $(docker --version) on $NODE_NAME" +echo "Starting Docker build for $DOCKER_REPO_NAME ..." echo "--------------------------------------------------------" echo +function remove_containers_images() +{ + # Remove previous running containers if exist + if [[ -n "$(docker ps -a | grep $DOCKER_REPO_NAME)" ]]; then + echo "Removing existing $DOCKER_REPO_NAME containers..." + docker ps -a | grep $DOCKER_REPO_NAME | awk '{print $1}' | xargs docker rm -f + t=60 + # Wait max 60 sec for containers to be removed + while [[ $t -gt 0 ]] && [[ -n "$(docker ps| grep $DOCKER_REPO_NAME)" ]]; do + sleep 1 + let t=t-1 + done + fi + + + # Remove existing images if exist + if [[ -n "$(docker images | grep $DOCKER_REPO_NAME)" ]]; then + echo "Docker images to remove:" + docker images | head -1 && docker images | grep $DOCKER_REPO_NAME + image_ids=($(docker images | grep $DOCKER_REPO_NAME | awk '{print $3}')) + for id in "${image_ids[@]}"; do + if [[ -n "$(docker images|grep $DOCKER_REPO_NAME|grep $id)" ]]; then + echo "Removing docker image $DOCKER_REPO_NAME:$id..." + docker rmi -f $id + fi + done + fi +} + + count=30 # docker build jobs might take up to ~30 min while [[ -n `ps -ef| grep 'docker build' | grep $DOCKER_REPO_NAME | grep -v grep` ]]; do echo "Build or cleanup of $DOCKER_REPO_NAME in progress. Waiting..." @@ -28,33 +58,12 @@ while [[ -n `ps -ef| grep 'docker build' | grep $DOCKER_REPO_NAME | grep -v grep fi done -# Remove previous running containers if exist -if [[ -n "$(docker ps -a | grep $DOCKER_REPO_NAME)" ]]; then - echo "Removing existing $DOCKER_REPO_NAME containers..." - docker ps -a | grep $DOCKER_REPO_NAME | awk '{print $1}' | xargs docker rm -f - t=60 - # Wait max 60 sec for containers to be removed - while [[ $t -gt 0 ]] && [[ -n "$(docker ps| grep $DOCKER_REPO_NAME)" ]]; do - sleep 1 - let t=t-1 - done -fi - +# Remove the existing containers and images before building +remove_containers_images -# Remove existing images if exist -if [[ -n "$(docker images | grep $DOCKER_REPO_NAME)" ]]; then - echo "Docker images to remove:" - docker images | head -1 && docker images | grep $DOCKER_REPO_NAME - image_ids=($(docker images | grep $DOCKER_REPO_NAME | awk '{print $3}')) - for id in "${image_ids[@]}"; do - if [[ -n "$(docker images|grep $DOCKER_REPO_NAME|grep $id)" ]]; then - echo "Removing docker image $DOCKER_REPO_NAME:$id..." - docker rmi -f $id - fi - done -fi +DOCKER_PATH=$WORKSPACE/$DOCKER_DIR -cd "$WORKSPACE/$DOCKER_DIR" || exit 1 +cd $DOCKER_PATH || exit 1 HOST_ARCH="$(uname -m)" #If there is a patch for other arch then x86, apply the patch and #replace Dockerfile file @@ -68,6 +77,9 @@ echo "Current branch: $BRANCH" BUILD_BRANCH=$BRANCH +GERRIT_REFNAME=${GERRIT_REFNAME:-''} +RELEASE_VERSION=${GERRIT_REFNAME/refs\/tags//} + if [[ "$BRANCH" == "master" ]]; then DOCKER_TAG="latest" elif [[ -n "${RELEASE_VERSION-}" ]]; then @@ -100,7 +112,8 @@ echo "Building docker image: $DOCKER_REPO_NAME:$DOCKER_TAG" echo "--------------------------------------------------------" echo cmd="docker build --no-cache -t $DOCKER_REPO_NAME:$DOCKER_TAG --build-arg BRANCH=$BUILD_BRANCH - -f $DOCKERFILE ." + $ARCH_BUILD_ARG + -f $DOCKERFILE $DOCKER_PATH" echo ${cmd} ${cmd} @@ -117,3 +130,6 @@ if [[ "$PUSH_IMAGE" == "true" ]]; then echo docker push $DOCKER_REPO_NAME:$DOCKER_TAG fi + +# Remove the existing containers and images after building +remove_containers_images diff --git a/jjb/releng/opnfv-docker.yml b/jjb/releng/opnfv-docker.yml index 862e77ac8..317efc807 100644 --- a/jjb/releng/opnfv-docker.yml +++ b/jjb/releng/opnfv-docker.yml @@ -19,11 +19,6 @@ stream: euphrates branch: 'stable/{stream}' disabled: false - functest-receivers: &functest-receivers - receivers: > - jalausuch@suse.com morgan.richomme@orange.com - cedric.ollivier@orange.com feng.xiaowei@zte.com.cn - juha.kosonen@nokia.com wangwulin@huawei.com storperf-receivers: &storperf-receivers receivers: > mark.beierl@emc.com @@ -44,6 +39,31 @@ project: 'releng-anteater' <<: *master <<: *other-receivers + - 'barometer-collectd': + project: 'barometer' + dockerdir: 'docker/barometer-collectd' + <<: *master + <<: *other-receivers + - 'barometer-grafana': + project: 'barometer' + dockerdir: 'docker/barometer-grafana' + <<: *master + <<: *other-receivers + - 'barometer-influxdb': + project: 'barometer' + dockerdir: 'docker/barometer-influxdb' + <<: *master + <<: *other-receivers + - 'barometer-kafka': + project: 'barometer' + dockerdir: 'docker/barometer-kafka' + <<: *master + <<: *other-receivers + - 'barometer-ves': + project: 'barometer' + dockerdir: 'docker/barometer-ves' + <<: *master + <<: *other-receivers - 'bottlenecks': project: 'bottlenecks' <<: *master @@ -56,16 +76,14 @@ project: 'dovetail' <<: *master <<: *other-receivers - - 'functest': - project: 'functest' - <<: *master - <<: *functest-receivers - 'nfvbench': project: 'nfvbench' <<: *master <<: *other-receivers - 'qtip': project: 'qtip' + dockerdir: '.' + dockerfile: 'docker/Dockerfile.local' <<: *master <<: *other-receivers - 'storperf-master': @@ -102,24 +120,23 @@ project: 'yardstick' <<: *master <<: *other-receivers - # projects with jobs for Danube - - 'qtip': - project: 'qtip' - <<: *euphrates - <<: *other-receivers - - 'yardstick': - project: 'yardstick' - <<: *euphrates + - 'functest-kubernetes': + project: 'functest-kubernetes' + <<: *master <<: *other-receivers # projects with jobs for euphrates - 'bottlenecks': project: 'bottlenecks' <<: *euphrates <<: *other-receivers - - 'functest': - project: 'functest' + - 'nfvbench': + project: 'nfvbench' <<: *euphrates - <<: *functest-receivers + <<: *other-receivers + - 'qtip': + project: 'qtip' + <<: *euphrates + <<: *other-receivers - 'storperf-master': project: 'storperf' dockerdir: 'docker/storperf-master' @@ -150,10 +167,15 @@ arch_tag: 'x86_64' <<: *euphrates <<: *storperf-receivers - - 'nfvbench': - project: 'nfvbench' + - 'yardstick': + project: 'yardstick' <<: *euphrates <<: *other-receivers + # projects with jobs for danube + - 'dovetail': + project: 'dovetail' + <<: *danube + <<: *other-receivers # yamllint enable rule:key-duplicates jobs: @@ -209,9 +231,9 @@ default: "" description: "commit id to make a snapshot docker image" - string: - name: RELEASE_VERSION + name: GERRIT_REFNAME default: "" - description: "Docker tag to be built, e.g. 5.0.0, opnfv-5.0.0, 5.0.RC1" + description: "Docker tag to be built, e.g. refs/tags/5.0.0, refs/tags/opnfv-5.0.0, refs/tags/5.0.RC1" - string: name: DOCKERFILE default: "{dockerfile}" @@ -236,6 +258,8 @@ triggers: - pollscm: cron: "*/30 * * * *" + - gerrit-trigger-tag-created: + project: '{project}' publishers: - email: diff --git a/jjb/releng/opnfv-manifest.sh b/jjb/releng/opnfv-manifest.sh deleted file mode 100755 index a740491c2..000000000 --- a/jjb/releng/opnfv-manifest.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## - - -set -o errexit -set -o nounset -set -o pipefail - -# Starting creating manifest image for $DOCKER_REPO_NAME - -ARCH=(amd64 arm64) -DOCKER_REPO_NAME=${DOCKER_REPO_NAME-} -RELEASE_VERSION=${RELEASE_VERSION-} -BRANCH=${BRANCH-} -ARCH_TAG=${ARCH_TAG-} - -# Before script install manifest-tool: -# cd .. && git clone https://github.com/estesp/manifest-tool -# cd ../manifest-tool && sudo -E make && sudo -E make install - -if [[ "$BRANCH" == "master" ]]; then - DOCKER_TAG="latest" -elif [[ "$BRANCH" == "euphrates" ]]; then - DOCKER_TAG="euphrates" -elif [[ -n "${RELEASE_VERSION}" ]]; then - DOCKER_TAG="${RELEASE_VERSION}" -else - DOCKER_TAG="stable" -fi -if [[ "${ARCH_TAG}" =~ "arm64" || "${ARCH_TAG}" =~ "amd64" ]]; then - sudo manifest-tool push from-args --platforms linux/amd64,linux/arm64 \ - --template "${DOCKER_REPO_NAME}":"${ARCH[0]}"-"${DOCKER_TAG}" \ - --template "${DOCKER_REPO_NAME}":"${ARCH[1]}"-"${DOCKER_TAG}" \ - --target "${DOCKER_REPO_NAME}":"${DOCKER_TAG}" -fi - diff --git a/jjb/releng/opnfv-repo-archiver.sh b/jjb/releng/opnfv-repo-archiver.sh index 2408c2a83..6fa0aef50 100644 --- a/jjb/releng/opnfv-repo-archiver.sh +++ b/jjb/releng/opnfv-repo-archiver.sh @@ -61,6 +61,8 @@ echo "--------------------------------------" gsutil cp "$WORKSPACE/opnfv-archive-$DATE.tar.gz" \ "gs://opnfv-archive/opnfv-archive-$DATE.tar.gz" 2>&1 +echo "https://storage.googleapis.com/opnfv-archive/opnfv-archive-$DATE.tar.gz" > archive-link.txt + rm -f opnfv-archive-$DATE.tar.gz echo "Finished" diff --git a/jjb/releng/opnfv-utils.yml b/jjb/releng/opnfv-utils.yml index 80cd08f4e..6f77cd250 100644 --- a/jjb/releng/opnfv-utils.yml +++ b/jjb/releng/opnfv-utils.yml @@ -24,8 +24,8 @@ description: Slaves to prune docker images default-slaves: - arm-build2 + - ericsson-build3 - ericsson-build4 - - ericsson-build5 - lf-build2 allowed-multiselect: true ignore-offline-nodes: true @@ -65,6 +65,19 @@ - shell: !include-raw-escape: opnfv-repo-archiver.sh + publishers: + - email-ext: + content-type: 'text' + failure: false + always: true + body: + ${{FILE,path="archive-link.txt"}} + reply-to: > + helpdesk@opnfv.org + recipients: > + swinslow@linuxfoundation.org + + - job-template: name: 'check-status-of-slaves' diff --git a/jjb/releng/releng-ci-jobs.yml b/jjb/releng/releng-ci-jobs.yml index d4f39708e..ef99f5abb 100644 --- a/jjb/releng/releng-ci-jobs.yml +++ b/jjb/releng/releng-ci-jobs.yml @@ -5,7 +5,6 @@ - 'releng-verify-jjb' - 'releng-merge-jjb' - 'releng-comment-jjb' - - 'releng-generate-artifacts-api' project: 'releng' @@ -91,6 +90,12 @@ project: '{project}' branch: 'master' + properties: + - throttle: + max-per-node: 1 + max-total: 1 + option: 'project' + scm: - git-scm @@ -119,22 +124,3 @@ cd /opt/jenkins-ci/releng git pull jenkins-jobs update -r --delete-old jjb/ - -- job-template: - name: 'releng-generate-artifacts-api' - - # Generate and upload the JSON file to used for artifacts site - - parameters: - - project-parameter: - project: '{project}' - branch: 'master' - - scm: - - git-scm - - triggers: - - timed: '@hourly' - - builders: - - build-and-upload-artifacts-json-api diff --git a/jjb/releng/testapi-backup-mongodb.sh b/jjb/releng/testapi-backup-mongodb.sh deleted file mode 100644 index 795e479d9..000000000 --- a/jjb/releng/testapi-backup-mongodb.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/bin/bash - -set -e - -# Run MongoDB backup -python $WORKSPACE/utils/test/testapi/update/templates/backup_mongodb.py -o $WORKSPACE/ - -# Compressing the dump -now=$(date +"%m_%d_%Y_%H_%M_%S") -echo $now - -file_name="testapi_mongodb_"$now".tar.gz" -echo $file_name - -tar cvfz "$file_name" test_results_collection* - -rm -rf test_results_collection* - -artifact_dir="testapibackup" -workspace="$WORKSPACE" - -set +e -/usr/local/bin/gsutil &>/dev/null -if [ $? != 0 ]; then - echo "Not possible to push results to artifact: gsutil not installed" - exit 1 -else - echo "Uploading mongodump to artifact $artifact_dir" - /usr/local/bin/gsutil cp -r "$workspace"/"$file_name" gs://artifacts.opnfv.org/"$artifact_dir"/ - echo "MongoDump can be found at http://artifacts.opnfv.org/$artifact_dir.html" -fi diff --git a/jjb/snaps/snaps-verify-jobs.yml b/jjb/snaps/snaps-verify-jobs.yml index bc3f39315..a6c86c966 100644 --- a/jjb/snaps/snaps-verify-jobs.yml +++ b/jjb/snaps/snaps-verify-jobs.yml @@ -15,7 +15,7 @@ - master: branch: '{stream}' gs-pathname: '' - disabled: false + disabled: true - job-template: name: 'snaps-verify-{stream}' diff --git a/jjb/stor4nfv/stor4nfv-project.yml b/jjb/stor4nfv/stor4nfv-project.yml index fc479b1a1..6e796cfd4 100644 --- a/jjb/stor4nfv/stor4nfv-project.yml +++ b/jjb/stor4nfv/stor4nfv-project.yml @@ -1,64 +1,8 @@ --- -################################################### -# All the jobs except verify have been removed! -# They will only be enabled on request by projects! -################################################### - project: name: stor4nfv project: '{name}' jobs: - - 'stor4nfv-verify-{stream}' - - stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - euphrates: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - -- job-template: - name: 'stor4nfv-verify-{stream}' - - disabled: '{obj:disabled}' - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' - - scm: - - git-scm-gerrit - - 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' - - builders: - - shell: | - echo "Nothing to verify!" + - '{project}-verify-basic' diff --git a/jjb/ves/ves.yml b/jjb/ves/ves.yml index d2182cbc3..f8c5da2b4 100644 --- a/jjb/ves/ves.yml +++ b/jjb/ves/ves.yml @@ -1,70 +1,8 @@ --- -################################################### -# All the jobs except verify have been removed! -# They will only be enabled on request by projects! -################################################### - project: name: ves project: '{name}' jobs: - - 'ves-verify-{stream}' - - stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - euphrates: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - -- job-template: - name: 'ves-verify-{stream}' - - disabled: '{obj:disabled}' - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - - 'opnfv-build-ubuntu-defaults' - - scm: - - git-scm-gerrit - - 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' - - builders: - - shell: | - #!/bin/bash - set -o errexit - set -o nounset - set -o pipefail - - # shellcheck -f tty tests/*.sh - # shellcheck -f tty utils/*.sh + - '{project}-verify-basic' diff --git a/jjb/vnf_forwarding_graph/vnf_forwarding_graph.yml b/jjb/vnf_forwarding_graph/vnf_forwarding_graph.yml index 7f21032e2..b11c20f62 100644 --- a/jjb/vnf_forwarding_graph/vnf_forwarding_graph.yml +++ b/jjb/vnf_forwarding_graph/vnf_forwarding_graph.yml @@ -5,50 +5,4 @@ project: '{name}' jobs: - - 'vnf_forwarding_graph-verify-{stream}' - - stream: - - master: - branch: '{stream}' - gs-pathname: '' - disabled: false - - euphrates: - branch: 'stable/{stream}' - gs-pathname: '/{stream}' - disabled: false - -- job-template: - name: 'vnf_forwarding_graph-verify-{stream}' - - disabled: '{obj:disabled}' - - parameters: - - project-parameter: - project: '{project}' - branch: '{branch}' - scm: - - git-scm-gerrit - - 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}' - - builders: - - shell: | - echo "Nothing to verify!" + - '{project}-verify-basic' diff --git a/jjb/xci/bifrost-verify-jobs.yml b/jjb/xci/bifrost-verify-jobs.yml index f8d39b2fb..e4c2d0e5b 100644 --- a/jjb/xci/bifrost-verify-jobs.yml +++ b/jjb/xci/bifrost-verify-jobs.yml @@ -70,7 +70,9 @@ - build-blocker: use-build-blocker: true blocking-jobs: + - 'xci-verify-{distro}-.*' - '.*-bifrost-verify.*-{type}' + block-level: 'NODE' parameters: @@ -78,9 +80,6 @@ name: PROJECT_REPO default: 'https://git.openstack.org/openstack/bifrost' - string: - name: CLONE_LOCATION - default: '$WORKSPACE/bifrost' - - string: name: DISTRO default: '{distro}' - string: @@ -173,6 +172,7 @@ - comment-added-contains-event: comment-contains-value: 'recheck' silent-start: true + custom-url: '* $JOB_NAME $BUILD_URL' projects: - project-compare-type: 'PLAIN' project-pattern: 'openstack/bifrost' diff --git a/jjb/xci/bifrost-verify.sh b/jjb/xci/bifrost-verify.sh index a86ba91c3..198f2e1c7 100755 --- a/jjb/xci/bifrost-verify.sh +++ b/jjb/xci/bifrost-verify.sh @@ -11,15 +11,13 @@ set -o errexit set -o nounset set -o pipefail -git clone https://git.openstack.org/openstack/bifrost $WORKSPACE/bifrost git clone https://gerrit.opnfv.org/gerrit/releng-xci $WORKSPACE/releng-xci -# checkout the patch -cd $CLONE_LOCATION +cd $WORKSPACE git fetch $PROJECT_REPO $GERRIT_REFSPEC && sudo git checkout FETCH_HEAD # combine opnfv and upstream scripts/playbooks -/bin/cp -rf $WORKSPACE/releng-xci/bifrost/* $WORKSPACE/bifrost/ +/bin/cp -rf $WORKSPACE/releng-xci/bifrost/* $WORKSPACE/ cd $WORKSPACE/releng-xci cat > bifrost_test.sh<<EOF @@ -27,9 +25,6 @@ cd ~/bifrost # provision 3 VMs; xcimaster, controller, and compute ./scripts/bifrost-provision.sh -# list the provisioned VMs -source env-vars -ironic node-list sudo -H -E virsh list EOF chmod a+x bifrost_test.sh @@ -41,8 +36,11 @@ case ${DISTRO} in *suse*) VM_DISTRO=opensuse ;; esac +export XCI_BUILD_CLEAN_VM_OS=false +export XCI_UPDATE_CLEAN_VM_OS=true + ./xci/scripts/vm/start-new-vm.sh $VM_DISTRO -rsync -a $WORKSPACE/releng-xci ${VM_DISTRO}_xci_vm:~/bifrost +rsync -a -e "ssh -F $HOME/.ssh/xci-vm-config" $WORKSPACE/ ${VM_DISTRO}_xci_vm:~/bifrost -ssh -F $HOME/.ssh/xci-vm-config ${VM_DISTRO}_xci_vm "cd ~/bifrost && ./bifrost_test.sh" +ssh -F $HOME/.ssh/xci-vm-config ${VM_DISTRO}_xci_vm "cd ~/bifrost/releng-xci && ./bifrost_test.sh" diff --git a/jjb/xci/osa-periodic-jobs.yml b/jjb/xci/osa-periodic-jobs.yml index 26c1575f4..64daa696b 100644 --- a/jjb/xci/osa-periodic-jobs.yml +++ b/jjb/xci/osa-periodic-jobs.yml @@ -2,7 +2,7 @@ - project: name: 'opnfv-osa-periodic' - project: 'releng-xci' + project: openstack-ansible # ------------------------------- # branches # ------------------------------- @@ -13,19 +13,19 @@ # distros # ------------------------------- distro: - - 'xenial': + - ubuntu: + disabled: false + - centos: + disabled: false + - opensuse: disabled: false - - 'centos7': - disabled: true - - 'suse': - disabled: true # ------------------------------- # type # ------------------------------- type: - virtual # ------------------------------- - # phases + # periodic deploy & test phases # ------------------------------- phase: - 'deploy' @@ -34,32 +34,37 @@ # jobs # ------------------------------- jobs: - - 'osa-periodic-{distro}-{type}-{stream}' - - 'osa-periodic-{phase}-{type}-{stream}' - + - 'xci-osa-periodic-{distro}-{type}-{stream}' + - 'xci-osa-periodic-{distro}-{phase}-{type}-{stream}' # ------------------------------- # job templates # ------------------------------- - job-template: - name: 'osa-periodic-{distro}-{type}-{stream}' + name: 'xci-osa-periodic-{distro}-{type}-{stream}' project-type: multijob disabled: '{obj:disabled}' - concurrent: false + concurrent: true properties: - logrotate-default - build-blocker: use-build-blocker: true blocking-jobs: - - 'xci-verify-.*' - - 'bifrost-verify-.*' - - 'bifrost-periodic-.*' - - 'osa-verify-.*' - - 'osa-periodic-.*' + - 'xci-verify-{distro}-.*' + - 'bifrost-verify-{distro}-.*' + - 'bifrost-periodic-{distro}-.*' + - 'xci-osa-verify-{distro}-.*' + - 'xci-osa-periodic-{distro}-.*' block-level: 'NODE' + - throttle: + max-per-node: 2 + max-total: 10 + categories: + - xci-verify-virtual + option: category wrappers: - ssh-agent-wrapper @@ -68,12 +73,7 @@ - fix-workspace-permissions scm: - - git-scm-osa - - triggers: - - pollscm: - cron: "@midnight" - ignore-post-commit-hooks: true + - git-scm-openstack parameters: - project-parameter: @@ -81,7 +81,17 @@ branch: '{branch}' - label: name: SLAVE_LABEL - default: 'xci-virtual-{distro}' + default: 'xci-virtual' + - string: + name: OPENSTACK_OSA_VERSION + default: 'master' + - string: + name: CLEAN_DIB_IMAGES + default: 'true' + - string: + name: GIT_BASE + default: 'https://git.openstack.org/openstack/$PROJECT' + description: 'Git URL to use on this Jenkins Slave' builders: - description-setter: @@ -90,32 +100,38 @@ name: deploy condition: SUCCESSFUL projects: - - name: 'osa-periodic-deploy-{type}-{stream}' + - name: 'xci-osa-periodic-{distro}-deploy-{type}-{stream}' current-parameters: true predefined-parameters: | DISTRO={distro} DEPLOY_SCENARIO=os-nosdn-nofeature-noha - git-revision: true + OPENSTACK_OSA_VERSION=$OPENSTACK_OSA_VERSION + CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES + BRANCH=$BRANCH node-parameters: true kill-phase-on: FAILURE abort-all-job: true + git-revision: true - multijob: name: healthcheck condition: SUCCESSFUL projects: - - name: 'osa-periodic-healthcheck-{type}-{stream}' + - name: 'xci-osa-periodic-{distro}-healthcheck-{type}-{stream}' current-parameters: true predefined-parameters: | DISTRO={distro} DEPLOY_SCENARIO=os-nosdn-nofeature-noha + OPENSTACK_OSA_VERSION=$OPENSTACK_OSA_VERSION + CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES FUNCTEST_MODE=tier FUNCTEST_TIER=healthcheck + BRANCH=$BRANCH node-parameters: true kill-phase-on: NEVER - abort-all-job: false + abort-all-job: true - job-template: - name: 'osa-periodic-{phase}-{type}-{stream}' + name: 'xci-osa-periodic-{distro}-{phase}-{type}-{stream}' disabled: false @@ -126,41 +142,23 @@ - build-blocker: use-build-blocker: true blocking-jobs: - - 'xci-verify-deploy-.*' - - 'xci-verify-healthcheck-.*' - - 'bifrost-verify-.*' - - 'bifrost-periodic-.*' - - 'osa-verify-deploy-.*' - - 'osa-verify-halthcheck-.*' - - 'osa-periodic-deploy-.*' - - 'osa-periodic-healthcheck-.*' + - '.*-bifrost-verify-.*' + - '.*-bifrost-periodic-.*' block-level: 'NODE' parameters: - project-parameter: project: '{project}' branch: '{branch}' - - label: - name: SLAVE_LABEL - default: 'xci-virtual-{distro}' - - string: - name: OPENSTACK_OSA_VERSION - default: 'master' - string: name: DISTRO - default: 'xenial' + default: 'ubuntu' - string: name: DEPLOY_SCENARIO default: 'os-nosdn-nofeature-noha' - string: - name: XCI_FLAVOR - default: 'mini' - - string: - name: XCI_LOOP - default: 'periodic' - - string: - name: OPNFV_RELENG_DEV_PATH - default: $WORKSPACE/releng-xci + name: OPENSTACK_OSA_VERSION + default: 'master' - string: name: FUNCTEST_MODE default: 'tier' @@ -168,14 +166,18 @@ name: FUNCTEST_SUITE_NAME default: 'healthcheck' - string: - name: FORCE_MASTER + name: XCI_FLAVOR + default: 'mini' + - string: + name: CLEAN_DIB_IMAGES default: 'true' - string: + name: INSTALLER_TYPE + default: 'osa' + - string: name: GIT_BASE - default: https://gerrit.opnfv.org/gerrit/$PROJECT - - scm: - - git-scm-osa + default: 'https://git.openstack.org/openstack/$PROJECT' + description: 'Git URL to use on this Jenkins Slave' wrappers: - ssh-agent-wrapper @@ -183,48 +185,76 @@ timeout: 240 - fix-workspace-permissions + scm: + - git-scm-openstack + builders: - description-setter: description: "Built on $NODE_NAME" - - 'osa-periodic-{phase}-macro' + - 'xci-osa-periodic-{phase}-macro' # ------------------------------- # builder macros # ------------------------------- - builder: - name: 'osa-periodic-deploy-macro' + name: 'xci-osa-periodic-deploy-macro' builders: - shell: | #!/bin/bash - # here we will - # - clone releng-xci repo as the jobs are running against openstack gerrit - # and we need to clone releng-xci ourselves to $OPNFV_RELENG_DEV_PATH - # - run sources-branch-updater.sh from osa to update/pin the role versions - # at the time this job gets triggered against osa master in case if the - # deployment succeeds and we decide to bump version used by xci - # - copy generated role versions into $OPNFV_RELENG_DEV_PATH/xci/file - # - start the deployment by executing xci-deploy.sh as usual - # - # we might also need to pin versions of openstack services as well. + cd $WORKSPACE + + # The start-new-vm.sh script will copy the entire releng-xci directory + # so lets prepare the test script now so it can be copied by the script. + # Please do not move it elsewhere or you would have to move it to the VM + # yourself. + cat > xci_test.sh<<EOF + #!/bin/bash + export DISTRO=$DISTRO + export DEPLOY_SCENARIO=$DEPLOY_SCENARIO + export OPENSTACK_OSA_VERSION=$OPENSTACK_OSA_VERSION + export FUNCTEST_MODE=$FUNCTEST_MODE + export FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME + export XCI_FLAVOR=$XCI_FLAVOR + export CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES + export OPNFV_RELENG_DEV_PATH=/home/devuser/releng-xci/ + export INSTALLER_TYPE=$INSTALLER_TYPE + export GIT_BASE=$GIT_BASE + export JENKINS_HOME=$JENKINS_HOME + + cd xci + ./xci-deploy.sh + EOF + chmod a+x xci_test.sh + + export XCI_BUILD_CLEAN_VM_OS=false + export XCI_UPDATE_CLEAN_VM_OS=true + + ./xci/scripts/vm/start-new-vm.sh $DISTRO + - shell: | + #!/bin/bash + + ssh -F $HOME/.ssh/xci-vm-config ${DISTRO}_xci_vm "cd releng-xci && ./xci_test.sh" - echo "Hello World!" - builder: - name: 'osa-periodic-healthcheck-macro' + name: 'xci-osa-periodic-healthcheck-macro' builders: - shell: | #!/bin/bash echo "Hello World!" -# ------------------------------- -# scm macro -# ------------------------------- -- scm: - name: git-scm-osa - scm: - - git: - url: https://review.openstack.org/p/openstack/openstack-ansible.git - branches: - - master - timeout: 15 + - shell: | + #!/bin/bash + + sudo virsh destroy ${DISTRO}_xci_vm + sudo virsh undefine ${DISTRO}_xci_vm + +# this will be enabled once the xci is prepared +# - builder: +# name: 'xci-verify-healthcheck-macro' +# builders: +# - shell: +# !include-raw: ../../utils/fetch_os_creds.sh +# - shell: +# !include-raw: ../functest/functest-alpine.sh diff --git a/jjb/xci/xci-cleanup.sh b/jjb/xci/xci-cleanup.sh new file mode 100755 index 000000000..45b4ec273 --- /dev/null +++ b/jjb/xci/xci-cleanup.sh @@ -0,0 +1,24 @@ +#!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2018 SUSE and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +#---------------------------------------------------------------------- +# This script is used by CI and executed by Jenkins jobs. +# You are not supposed to use this script manually if you don't know +# what you are doing. +#---------------------------------------------------------------------- + +# skip the deployment if the patch doesn't impact the deployment +if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then + echo "Skipping the deployment!" + exit 0 +fi + +sudo virsh destroy ${DISTRO}_xci_vm +sudo virsh undefine ${DISTRO}_xci_vm diff --git a/jjb/xci/xci-merge-jobs.yml b/jjb/xci/xci-merge-jobs.yml new file mode 100644 index 000000000..351fe22bb --- /dev/null +++ b/jjb/xci/xci-merge-jobs.yml @@ -0,0 +1,257 @@ +--- +- project: + name: 'opnfv-xci-merge' + + # ------------------------------- + # branches + # ------------------------------- + stream: + - master: + branch: '{stream}' + # ------------------------------- + # distros + # ------------------------------- + distro: + - ubuntu: + disabled: false + - centos: + disabled: false + - opensuse: + disabled: false + # ------------------------------- + # type + # ------------------------------- + type: + - virtual + # ------------------------------- + # patch verification phases + # ------------------------------- + phase: + - 'deploy' + - 'healthcheck' + - 'promote' + # ------------------------------- + # scenarios + # ------------------------------- + scenario: + - 'os-odl-sfc': + project: sfc + # ------------------------------- + # jobs + # ------------------------------- + jobs: + - 'xci-{scenario}-{type}-{distro}-merge-{stream}' + - 'xci-{phase}-{type}-{distro}-merge-{stream}' +# ------------------------------- +# job templates +# ------------------------------- +- job-template: + name: 'xci-{scenario}-{type}-{distro}-merge-{stream}' + + project-type: multijob + + disabled: '{obj:disabled}' + + concurrent: false + + properties: + - logrotate-default + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'xci-verify-{distro}-.*' + - 'bifrost-verify-{distro}-.*' + - 'bifrost-periodic-{distro}-.*' + - 'xci-osa-verify-{distro}-.*' + - 'xci-osa-periodic-{distro}-.*' + - 'xci-(os|k8s).*?-virtual-{distro}-.*' + block-level: 'NODE' + + wrappers: + - ssh-agent-wrapper + - build-timeout: + timeout: 240 + - fix-workspace-permissions + + scm: + - git: + credentials-id: '$SSH_CREDENTIAL_ID' + url: 'https://gerrit.opnfv.org/gerrit/releng-xci' + branches: + - 'origin/master' + timeout: 15 + + 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: '{obj:project}' + 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: '{obj:project}' + branch: '{branch}' + - label: + name: SLAVE_LABEL + default: 'xci-virtual' + - string: + name: DEPLOY_SCENARIO + default: '{scenario}' + - 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: + - description-setter: + description: "Built on $NODE_NAME" + - multijob: + name: deploy + condition: SUCCESSFUL + projects: + - name: 'xci-deploy-{type}-{distro}-merge-{stream}' + current-parameters: true + predefined-parameters: | + PROJECT=$PROJECT + DISTRO={distro} + DEPLOY_SCENARIO={scenario} + CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES + 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: FAILURE + abort-all-job: true + - multijob: + name: healthcheck + condition: SUCCESSFUL + projects: + - name: 'xci-healthcheck-{type}-{distro}-merge-{stream}' + current-parameters: true + predefined-parameters: | + PROJECT=$PROJECT + DISTRO={distro} + DEPLOY_SCENARIO={scenario} + CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES + FUNCTEST_MODE=tier + FUNCTEST_TIER=healthcheck + 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: NEVER + abort-all-job: true + +- job-template: + name: 'xci-{phase}-{type}-{distro}-merge-{stream}' + + disabled: false + + concurrent: true + + 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: 'releng-xci' + - string: + name: DISTRO + default: 'ubuntu' + - string: + name: DEPLOY_SCENARIO + default: 'os-nosdn-nofeature-noha' + - 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: INSTALLER_TYPE + default: 'osa' + - string: + name: GIT_BASE + default: https://gerrit.opnfv.org/gerrit/$PROJECT + description: 'Git URL to use on this Jenkins Slave' + + wrappers: + - ssh-agent-wrapper + - build-timeout: + timeout: 240 + - fix-workspace-permissions + + scm: + - git: + credentials-id: '$SSH_CREDENTIAL_ID' + url: 'https://gerrit.opnfv.org/gerrit/releng-xci' + branches: + - 'origin/master' + timeout: 15 + + builders: + - description-setter: + description: "Built on $NODE_NAME" + - 'xci-merge-{phase}-macro' + +# ------------------------------- +# builder macros +# ------------------------------- +- 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 + - shell: + !include-raw: ./xci-cleanup.sh + +- builder: + name: 'xci-merge-promote-macro' + builders: + - shell: + !include-raw: ./xci-promote.sh diff --git a/jjb/xci/xci-promote.sh b/jjb/xci/xci-promote.sh new file mode 100755 index 000000000..98ad7ff4a --- /dev/null +++ b/jjb/xci/xci-promote.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2018 Ericsson and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +#---------------------------------------------------------------------- +# This script is used by CI and executed by Jenkins jobs. +# You are not supposed to use this script manually if you don't know +# what you are doing. +#---------------------------------------------------------------------- + +# skip the healthcheck if the patch doesn't impact the deployment +if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then + echo "Skipping the healthcheck!" + exit 0 +fi + +# skip the deployment if the scenario is not supported on this distro +OPNFV_SCENARIO_REQUIREMENTS=$WORKSPACE/xci/opnfv-scenario-requirements.yml +if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENTS | grep -q $DISTRO; then + echo "# SKIPPED: Scenario $DEPLOY_SCENARIO is NOT supported on $DISTRO" + exit 0 +fi + +echo "Hello World!" diff --git a/jjb/xci/xci-run-functest.sh b/jjb/xci/xci-run-functest.sh new file mode 100755 index 000000000..4fbc6c40d --- /dev/null +++ b/jjb/xci/xci-run-functest.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2018 SUSE and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +#---------------------------------------------------------------------- +# This script is used by CI and executed by Jenkins jobs. +# You are not supposed to use this script manually if you don't know +# what you are doing. +#---------------------------------------------------------------------- + +# skip the healthcheck if the patch doesn't impact the deployment +if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then + echo "Skipping the healthcheck!" + exit 0 +fi + +# skip the deployment if the scenario is not supported on this distro +OPNFV_SCENARIO_REQUIREMENTS=$WORKSPACE/xci/opnfv-scenario-requirements.yml +if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENTS | grep -q $DISTRO; then + echo "# SKIPPED: Scenario $DEPLOY_SCENARIO is NOT supported on $DISTRO" + exit 0 +fi + +echo "Hello World!" diff --git a/jjb/xci/xci-start-deployment.sh b/jjb/xci/xci-start-deployment.sh new file mode 100755 index 000000000..e86f5b3a1 --- /dev/null +++ b/jjb/xci/xci-start-deployment.sh @@ -0,0 +1,30 @@ +#!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2018 SUSE and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +#---------------------------------------------------------------------- +# This script is used by CI and executed by Jenkins jobs. +# You are not supposed to use this script manually if you don't know +# what you are doing. +#---------------------------------------------------------------------- + +# skip the deployment if the patch doesn't impact the deployment +if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then + echo "Skipping the deployment!" + exit 0 +fi + +# skip the deployment if the scenario is not supported on this distro +OPNFV_SCENARIO_REQUIREMENTS=$WORKSPACE/xci/opnfv-scenario-requirements.yml +if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENTS | grep -q $DISTRO; then + echo "# SKIPPED: Scenario $DEPLOY_SCENARIO is NOT supported on $DISTRO" + exit 0 +fi + +ssh -F $HOME/.ssh/xci-vm-config ${DISTRO}_xci_vm "cd releng-xci && ./xci_test.sh" diff --git a/jjb/xci/xci-start-new-vm.sh b/jjb/xci/xci-start-new-vm.sh new file mode 100755 index 000000000..b72c33920 --- /dev/null +++ b/jjb/xci/xci-start-new-vm.sh @@ -0,0 +1,63 @@ +#!/bin/bash +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2018 SUSE and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +#---------------------------------------------------------------------- +# This script is used by CI and executed by Jenkins jobs. +# You are not supposed to use this script manually if you don't know +# what you are doing. +#---------------------------------------------------------------------- + +# skip the deployment if the patch doesn't impact the deployment +if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then + echo "Skipping the deployment!" + exit 0 +fi + +# skip the deployment if the scenario is not supported on this distro +OPNFV_SCENARIO_REQUIREMENTS=$WORKSPACE/xci/opnfv-scenario-requirements.yml +if ! sed -n "/^- scenario: $DEPLOY_SCENARIO$/,/^$/p" $OPNFV_SCENARIO_REQUIREMENTS | grep -q $DISTRO; then + echo "# SKIPPED: Scenario $DEPLOY_SCENARIO is NOT supported on $DISTRO" + exit 0 +fi + +cd $WORKSPACE + +# The start-new-vm.sh script will copy the entire releng-xci directory +# so lets prepare the test script now so it can be copied by the script. +# Please do not move it elsewhere or you would have to move it to the VM +# yourself. +cat > xci_test.sh<<EOF +#!/bin/bash +export DISTRO=$DISTRO +export DEPLOY_SCENARIO=$DEPLOY_SCENARIO +export FUNCTEST_MODE=$FUNCTEST_MODE +export FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME +export XCI_FLAVOR=$XCI_FLAVOR +export CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES +export OPNFV_RELENG_DEV_PATH=/home/devuser/releng-xci/ +export INSTALLER_TYPE=$INSTALLER_TYPE +export GIT_BASE=$GIT_BASE +export JENKINS_HOME=$JENKINS_HOME + +if [[ ! -z ${WORKSPACE+x} && $GERRIT_PROJECT != "releng-xci" ]]; then + git clone https://gerrit.opnfv.org/gerrit/$GERRIT_PROJECT xci/scenarios/$DEPLOY_SCENARIO && cd xci/scenarios/$DEPLOY_SCENARIO + git fetch https://gerrit.opnfv.org/gerrit/$GERRIT_PROJECT $GERRIT_REFSPEC && git checkout FETCH_HEAD + cd - +fi + +cd xci +./xci-deploy.sh +EOF +chmod a+x xci_test.sh + +export XCI_BUILD_CLEAN_VM_OS=false +export XCI_UPDATE_CLEAN_VM_OS=true + +./xci/scripts/vm/start-new-vm.sh $DISTRO diff --git a/jjb/xci/xci-verify-jobs.yml b/jjb/xci/xci-verify-jobs.yml index 93ca18708..af2432dd0 100644 --- a/jjb/xci/xci-verify-jobs.yml +++ b/jjb/xci/xci-verify-jobs.yml @@ -68,8 +68,8 @@ - 'xci-verify-{distro}-.*' - 'bifrost-verify-{distro}-.*' - 'bifrost-periodic-{distro}-.*' - - 'osa-verify-{distro}-.*' - - 'osa-periodic-{distro}-.*' + - 'xci-osa-verify-{distro}-.*' + - 'xci-osa-periodic-{distro}-.*' block-level: 'NODE' - throttle: max-per-node: 2 @@ -106,22 +106,12 @@ branches: - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' - disable-strict-forbidden-file-verification: 'true' - file-paths: - - compare-type: ANT - pattern: 'bifrost/**' - - compare-type: ANT - pattern: 'xci/**' + disable-strict-forbidden-file-verification: 'false' forbidden-file-paths: - compare-type: ANT - pattern: 'prototypes/**' - - compare-type: ANT - pattern: 'upstream/**' - - compare-type: ANT - pattern: '**/README.rst' - - compare-type: ANT - pattern: 'docs/**' + pattern: 'xci/scripts/vm/**' readable-message: true + custom-url: '* $JOB_NAME $BUILD_URL' skip-vote: successful: '{obj:successful}' failed: '{obj:failed}' @@ -154,7 +144,7 @@ current-parameters: true predefined-parameters: | DISTRO={distro} - DEPLOY_SCENARIO=os-nosdn-nofeature-noha + DEPLOY_SCENARIO=os-nosdn-nofeature CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES GERRIT_BRANCH=$GERRIT_BRANCH GERRIT_REFSPEC=$GERRIT_REFSPEC @@ -171,7 +161,7 @@ current-parameters: true predefined-parameters: | DISTRO={distro} - DEPLOY_SCENARIO=os-nosdn-nofeature-noha + DEPLOY_SCENARIO=os-nosdn-nofeature CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES FUNCTEST_MODE=tier FUNCTEST_TIER=healthcheck @@ -195,8 +185,8 @@ - build-blocker: use-build-blocker: true blocking-jobs: - - 'bifrost-verify-.*' - - 'bifrost-periodic-.*' + - '.*-bifrost-verify-.*' + - '.*-bifrost-periodic-.*' - 'osa-verify-.*' - 'osa-periodic-.*' block-level: 'NODE' @@ -210,7 +200,7 @@ default: 'ubuntu' - string: name: DEPLOY_SCENARIO - default: 'os-nosdn-nofeature-noha' + default: 'os-nosdn-nofeature' - string: name: FUNCTEST_MODE default: 'tier' @@ -254,85 +244,16 @@ - builder: name: 'xci-verify-deploy-macro' builders: - - shell: | - #!/bin/bash - - # skip the deployment if the patch doesn't impact the deployment - if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then - echo "Skipping the deployment!" - exit 0 - fi - - cd $WORKSPACE - - # The start-new-vm.sh script will copy the entire releng-xci directory - # so lets prepare the test script now so it can be copied by the script. - # Please do not move it elsewhere or you would have to move it to the VM - # yourself. - cat > xci_test.sh<<EOF - #!/bin/bash - export DISTRO=$DISTRO - export DEPLOY_SCENARIO=$DEPLOY_SCENARIO - export FUNCTEST_MODE=$FUNCTEST_MODE - export FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME - export XCI_FLAVOR=$XCI_FLAVOR - export CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES - export OPNFV_RELENG_DEV_PATH=/home/devuser/releng-xci/ - export INSTALLER_TYPE=$INSTALLER_TYPE - export GIT_BASE=$GIT_BASE - export JENKINS_HOME=$JENKINS_HOME - - cd xci - ./xci-deploy.sh - EOF - chmod a+x xci_test.sh - - export XCI_BUILD_CLEAN_VM_OS=false - export XCI_UPDATE_CLEAN_VM_OS=true - - ./xci/scripts/vm/start-new-vm.sh $DISTRO - - shell: | - #!/bin/bash - - # skip the deployment if the patch doesn't impact the deployment - if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then - echo "Skipping the deployment!" - exit 0 - fi - - ssh -F $HOME/.ssh/xci-vm-config ${DISTRO}_xci_vm "cd releng-xci && ./xci_test.sh" + - shell: + !include-raw: ./xci-start-new-vm.sh + - shell: + !include-raw: ./xci-start-deployment.sh - builder: name: 'xci-verify-healthcheck-macro' builders: - - shell: | - #!/bin/bash - - # skip the healthcheck if the patch doesn't impact the deployment - if [[ "$GERRIT_TOPIC" =~ skip-verify|skip-deployment ]]; then - echo "Skipping the healthcheck!" - exit 0 - fi - - echo "Hello World!" - - shell: | - #!/bin/bash - - # skip the deployment if the patch doesn't impact the deployment - if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then - echo "Skipping the deployment!" - exit 0 - fi - - sudo virsh destroy ${DISTRO}_xci_vm - sudo virsh undefine ${DISTRO}_xci_vm - -# this will be enabled once the xci is prepared -# - builder: -# name: 'xci-verify-healthcheck-macro' -# builders: -# - shell: -# !include-raw: ../../utils/fetch_os_creds.sh -# - shell: -# !include-raw: ../functest/functest-alpine.sh + - shell: + !include-raw: ./xci-run-functest.sh + - shell: + !include-raw: ./xci-cleanup.sh diff --git a/jjb/yardstick/yardstick-daily.sh b/jjb/yardstick/yardstick-daily.sh index 4b8c5d240..f0e4f8e22 100755 --- a/jjb/yardstick/yardstick-daily.sh +++ b/jjb/yardstick/yardstick-daily.sh @@ -22,7 +22,7 @@ fi if [[ ${INSTALLER_TYPE} == 'joid' ]]; then if [[ "${DEPLOY_SCENARIO:0:2}" == "k8" ]];then - rc_file_vol="-v /home/ubuntu/config:/etc/yardstick/admin.conf" + rc_file_vol="-v ${HOME}/admin.conf:/etc/yardstick/admin.conf" else # If production lab then creds may be retrieved dynamically # creds are on the jumphost, always in the same folder @@ -31,8 +31,12 @@ if [[ ${INSTALLER_TYPE} == 'joid' ]]; then # replace the default one by the customized one provided by jenkins config fi elif [[ ${INSTALLER_TYPE} == 'compass' ]]; then - cacert_file_vol="-v ${HOME}/os_cacert:/etc/yardstick/os_cacert" - echo "export OS_CACERT=/etc/yardstick/os_cacert" >> ${HOME}/opnfv-openrc.sh + if [[ "${DEPLOY_SCENARIO:0:2}" == "k8" ]];then + rc_file_vol="-v ${HOME}/admin.conf:/etc/yardstick/admin.conf" + else + cacert_file_vol="-v ${HOME}/os_cacert:/etc/yardstick/os_cacert" + echo "export OS_CACERT=/etc/yardstick/os_cacert" >> ${HOME}/opnfv-openrc.sh + fi elif [[ ${INSTALLER_TYPE} == 'fuel' ]]; then cacert_file_vol="-v ${HOME}/os_cacert:/etc/ssl/certs/mcp_os_cacert" sshkey="-v ${SSH_KEY}:/root/.ssh/mcp.rsa" @@ -68,13 +72,8 @@ sudo rm -rf ${dir_result}/* map_log_dir="-v ${dir_result}:/tmp/yardstick" # Run docker -if [[ ${INSTALLER_TYPE} == "joid" && "${DEPLOY_SCENARIO:0:2}" == "k8" ]];then - juju ssh kubernetes-master/0 sudo apt-get install -y docker.io - cmd="juju ssh kubernetes-master/0 sudo docker run ${opts} ${envs} ${rc_file_vol} ${cacert_file_vol} ${map_log_dir} ${sshkey} ${DOCKER_REPO}:${DOCKER_TAG} exec_tests.sh ${YARDSTICK_DB_BACKEND} ${YARDSTICK_SCENARIO_SUITE_NAME}" -else - cmd="sudo docker run ${opts} ${envs} ${rc_file_vol} ${cacert_file_vol} ${map_log_dir} ${sshkey} ${DOCKER_REPO}:${DOCKER_TAG} \ - exec_tests.sh ${YARDSTICK_DB_BACKEND} ${YARDSTICK_SCENARIO_SUITE_NAME}" -fi +cmd="sudo docker run ${opts} ${envs} ${rc_file_vol} ${cacert_file_vol} ${map_log_dir} ${sshkey} ${DOCKER_REPO}:${DOCKER_TAG} \ +exec_tests.sh ${YARDSTICK_DB_BACKEND} ${YARDSTICK_SCENARIO_SUITE_NAME}" echo "Yardstick: Running docker cmd: ${cmd}" ${cmd} diff --git a/jjb/yardstick/yardstick-get-k8s-conf.sh b/jjb/yardstick/yardstick-get-k8s-conf.sh index e93367f9a..22a6aa4e6 100755 --- a/jjb/yardstick/yardstick-get-k8s-conf.sh +++ b/jjb/yardstick/yardstick-get-k8s-conf.sh @@ -4,5 +4,9 @@ set -e dest_path="$HOME/admin.conf" if [[ "${DEPLOY_SCENARIO:0:2}" == "k8" ]];then - juju scp kubernetes-master/0:config "${dest_path}" + if [[ ${INSTALLER_TYPE} == 'joid' ]];then + juju scp kubernetes-master/0:config "${dest_path}" + elif [[ ${INSTALLER_TYPE} == 'compass' ]];then + docker cp compass-tasks:/opt/admin.conf "${dest_path}" + fi fi diff --git a/jjb/yardstick/yardstick-project-jobs.yml b/jjb/yardstick/yardstick-project-jobs.yml index 7486d8a11..e2fee2988 100644 --- a/jjb/yardstick/yardstick-project-jobs.yml +++ b/jjb/yardstick/yardstick-project-jobs.yml @@ -67,7 +67,12 @@ fail: true builders: - - yardstick-unit-tests-and-docs-build + - yardstick-unit-tests-python-27 + - yardstick-unit-tests-python-3 + - yardstick-functional-tests-python-27 + - yardstick-functional-tests-python-3 + - yardstick-coverage-tests + - yardstick-pep8-tests - job-template: name: 'yardstick-merge-{stream}' @@ -108,14 +113,19 @@ fail: true builders: - - yardstick-unit-tests-and-docs-build + - yardstick-unit-tests-python-27 + - yardstick-unit-tests-python-3 + - yardstick-functional-tests-python-27 + - yardstick-functional-tests-python-3 + - yardstick-coverage-tests + - yardstick-pep8-tests ################################ # job builders ################################ - builder: - name: yardstick-unit-tests-and-docs-build + name: yardstick-unit-tests-python-27 builders: - shell: | #!/bin/bash @@ -124,6 +134,76 @@ sudo apt-get install -y build-essential python-dev python3-dev - echo "Running unit tests..." + echo "Running unit tests in Python 2.7 ..." cd $WORKSPACE - tox + tox -epy27 + +- builder: + name: yardstick-unit-tests-python-3 + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + + sudo apt-get install -y build-essential python-dev python3-dev + + echo "Running unit tests in Python 3 ..." + cd $WORKSPACE + tox -epy3 + +- builder: + name: yardstick-functional-tests-python-27 + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + + sudo apt-get install -y build-essential python-dev python3-dev + + echo "Running functional tests in Python 2.7 ..." + cd $WORKSPACE + tox -efunctional + +- builder: + name: yardstick-functional-tests-python-3 + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + + sudo apt-get install -y build-essential python-dev python3-dev + + echo "Running functional tests in Python 3 ..." + cd $WORKSPACE + tox -efunctional-py3 + +- builder: + name: yardstick-coverage-tests + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + + sudo apt-get install -y build-essential python-dev python3-dev + + echo "Running coverage tests ..." + cd $WORKSPACE + tox -ecoverage + +- builder: + name: yardstick-pep8-tests + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o pipefail + + sudo apt-get install -y build-essential python-dev python3-dev + + echo "Running style guidelines (PEP8) tests ..." + cd $WORKSPACE + tox -epep8 |