diff options
-rw-r--r-- | jjb/armband/armband-ci-jobs.yml | 4 | ||||
-rw-r--r-- | jjb/fuel/fuel-daily-jobs.yml | 4 | ||||
-rwxr-xr-x | jjb/functest/functest-k8.sh | 3 | ||||
-rw-r--r-- | jjb/functest/functest-kubernetes-project-jobs.yml | 257 | ||||
-rw-r--r-- | jjb/releng/opnfv-docker.sh | 2 | ||||
-rw-r--r-- | jjb/releng/opnfv-docker.yml | 4 | ||||
-rw-r--r-- | jjb/releng/testresults-automate.yml (renamed from jjb/releng/automate.yml) | 69 | ||||
-rw-r--r-- | jjb/releng/testresults-verify.yml | 78 | ||||
-rw-r--r-- | jjb/xci/osa-periodic-jobs.yml | 5 | ||||
-rwxr-xr-x | jjb/xci/xci-cleanup.sh | 4 | ||||
-rwxr-xr-x | jjb/xci/xci-run-functest.sh | 4 | ||||
-rwxr-xr-x | jjb/xci/xci-set-scenario.sh | 2 | ||||
-rwxr-xr-x | jjb/xci/xci-start-new-vm.sh | 1 |
13 files changed, 362 insertions, 75 deletions
diff --git a/jjb/armband/armband-ci-jobs.yml b/jjb/armband/armband-ci-jobs.yml index 767187de5..339c3cc5b 100644 --- a/jjb/armband/armband-ci-jobs.yml +++ b/jjb/armband/armband-ci-jobs.yml @@ -171,7 +171,7 @@ condition-kind: and condition-operands: - condition-kind: regex-match - regex: '*-ha' + regex: '-ha$' label: '{scenario}' - condition-kind: day-of-week day-selector: select-days @@ -196,7 +196,7 @@ condition-kind: and condition-operands: - condition-kind: regex-match - regex: '*-ha' + regex: '-ha$' label: '{scenario}' - condition-kind: day-of-week day-selector: select-days diff --git a/jjb/fuel/fuel-daily-jobs.yml b/jjb/fuel/fuel-daily-jobs.yml index 26f892d97..a214a56b8 100644 --- a/jjb/fuel/fuel-daily-jobs.yml +++ b/jjb/fuel/fuel-daily-jobs.yml @@ -207,7 +207,7 @@ condition-kind: and condition-operands: - condition-kind: regex-match - regex: '*-ha' + regex: '-ha$' label: '{scenario}' - condition-kind: day-of-week day-selector: select-days @@ -232,7 +232,7 @@ condition-kind: and condition-operands: - condition-kind: regex-match - regex: '*-ha' + regex: '-ha$' label: '{scenario}' - condition-kind: day-of-week day-selector: select-days diff --git a/jjb/functest/functest-k8.sh b/jjb/functest/functest-k8.sh index 7c5308d5f..3f08e4a0b 100755 --- a/jjb/functest/functest-k8.sh +++ b/jjb/functest/functest-k8.sh @@ -47,9 +47,10 @@ envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} \ DOCKER_TAG=`[[ ${BRANCH##*/} == "master" ]] && echo "latest" || echo ${BRANCH##*/}` FUNCTEST_IMAGE=opnfv/functest-kubernetes:${DOCKER_TAG} +echo "Pulling Docker image ${FUNCTEST_IMAGE} ..." docker pull ${FUNCTEST_IMAGE}>/dev/null cmd_opt="run_tests -r -t all" -cmd="docker run --rm --privileged=true ${volumes} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" +cmd="docker run --rm --privileged=true ${envs} ${volumes} ${FUNCTEST_IMAGE} /bin/bash -c '${cmd_opt}'" echo "Running Functest k8s test cases, CMD: ${cmd}" eval ${cmd} ret_value=$? diff --git a/jjb/functest/functest-kubernetes-project-jobs.yml b/jjb/functest/functest-kubernetes-project-jobs.yml new file mode 100644 index 000000000..3eba5d177 --- /dev/null +++ b/jjb/functest/functest-kubernetes-project-jobs.yml @@ -0,0 +1,257 @@ +--- +################################################### +# All the jobs except verify have been removed! +# They will only be enabled on request by projects! +################################################### +- project: + name: functest-kubernetes-project-jobs + + project: 'functest-kubernetes' + + jobs: + - 'functest-kubernetes-verify-{stream}' + - 'functest-kubernetes-verify-{phase}-{stream}' + - 'functest-kubernetes-docs-upload-{stream}' + + stream: + - master: + branch: '{stream}' + gs-pathname: '' + disabled: false + - euphrates: + branch: 'stable/{stream}' + gs-pathname: '/{stream}' + disabled: false + + phase: + - 'unit-tests-and-docs': + slave-label: 'opnfv-build-ubuntu' + - 'build-x86_64': + slave-label: 'opnfv-build-ubuntu' + - 'build-aarch64': + slave-label: 'opnfv-build-ubuntu-arm' + +- job-template: + name: 'functest-kubernetes-verify-{stream}' + + disabled: '{obj:disabled}' + + project-type: 'multijob' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + + scm: + - git-scm-gerrit + + triggers: + - 'functest-kubernetes-verify-triggers-macro': + project: '{project}' + branch: '{branch}' + + builders: + - shell: | + #!/bin/bash + # we do nothing here as the main stuff will be done + # in phase jobs + echo "Triggering phase jobs!" + - multijob: + name: 'functest-kubernetes-build-and-unittest' + execution-type: PARALLEL + projects: + - name: 'functest-kubernetes-verify-unit-tests-and-docs-{stream}' + current-parameters: false + predefined-parameters: | + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + git-revision: true + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: false + - name: 'functest-kubernetes-verify-build-x86_64-{stream}' + current-parameters: false + predefined-parameters: | + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + ARCH=x86_64 + git-revision: true + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: false + - name: 'functest-kubernetes-verify-build-aarch64-{stream}' + current-parameters: false + predefined-parameters: | + GERRIT_BRANCH=$GERRIT_BRANCH + GERRIT_REFSPEC=$GERRIT_REFSPEC + GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER + GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE + ARCH=aarch64 + git-revision: true + node-parameters: false + kill-phase-on: FAILURE + abort-all-job: false + +- job-template: + name: 'functest-kubernetes-verify-{phase}-{stream}' + + disabled: '{obj:disabled}' + + wrappers: + - ssh-agent-wrapper + - build-timeout: + timeout: 30 + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - '{slave-label}-defaults' + + scm: + - git-scm-gerrit + + builders: + - 'functest-kubernetes-verify-{phase}-builders-macro' + + publishers: + - 'functest-kubernetes-verify-{phase}-publishers-macro' + +- job-template: + name: 'functest-kubernetes-docs-upload-{stream}' + + disabled: '{obj:disabled}' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + + scm: + - git-scm + + triggers: + - 'functest-kubernetes-docs-upload-triggers-macro': + project: '{project}' + branch: '{branch}' + + builders: + - functest-kubernetes-upload-doc-artifact + +################################ +# job triggers +################################ +- trigger: + name: 'functest-kubernetes-verify-triggers-macro' + triggers: + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - patchset-created-event: + exclude-drafts: 'false' + exclude-trivial-rebase: 'false' + exclude-no-code-change: 'false' + - draft-published-event + - comment-added-contains-event: + comment-contains-value: 'recheck' + - comment-added-contains-event: + comment-contains-value: 'reverify' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' + +- trigger: + name: 'functest-kubernetes-docs-upload-triggers-macro' + triggers: + - gerrit: + server-name: 'gerrit.opnfv.org' + trigger-on: + - change-merged-event + - comment-added-contains-event: + comment-contains-value: 'remerge' + projects: + - project-compare-type: 'ANT' + project-pattern: '{project}' + branches: + - branch-compare-type: 'ANT' + branch-pattern: '**/{branch}' + disable-strict-forbidden-file-verification: 'true' + forbidden-file-paths: + - compare-type: ANT + pattern: 'docs/**|.gitignore' +################################ +# job builders +################################ + +- builder: + name: 'functest-kubernetes-verify-unit-tests-and-docs-builders-macro' + builders: + - shell: | + cd $WORKSPACE && tox + +- builder: + name: 'functest-kubernetes-verify-build-x86_64-builders-macro' + builders: + - shell: | + echo "Not activated!" + +- builder: + name: 'functest-kubernetes-verify-build-aarch64-builders-macro' + builders: + - shell: | + echo "Not activated!" + +- builder: + name: 'functest-kubernetes-upload-doc-artifact' + builders: + - shell: | + cd $WORKSPACE && tox -edocs + wget -O - https://git.opnfv.org/releng/plain/utils/upload-artifact.sh | bash -s "api/_build" "docs" +################################ +# job publishers +################################ +- publisher: + name: 'functest-kubernetes-verify-unit-tests-and-docs-publishers-macro' + publishers: + - junit: + results: nosetests.xml + - cobertura: + report-file: "coverage.xml" + only-stable: "true" + health-auto-update: "true" + stability-auto-update: "true" + zoom-coverage-chart: "true" + targets: + - files: + healthy: 10 + unhealthy: 20 + failing: 30 + - method: + healthy: 50 + unhealthy: 40 + failing: 30 + - email-jenkins-admins-on-failure + +- publisher: + name: 'functest-kubernetes-verify-build-x86_64-publishers-macro' + publishers: + - email-jenkins-admins-on-failure + +- publisher: + name: 'functest-kubernetes-verify-build-aarch64-publishers-macro' + publishers: + - email-jenkins-admins-on-failure diff --git a/jjb/releng/opnfv-docker.sh b/jjb/releng/opnfv-docker.sh index 28e5b7ce1..5c8cafbe3 100644 --- a/jjb/releng/opnfv-docker.sh +++ b/jjb/releng/opnfv-docker.sh @@ -111,7 +111,7 @@ fi 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 +cmd="docker build --pull=true --no-cache -t $DOCKER_REPO_NAME:$DOCKER_TAG --build-arg BRANCH=$BUILD_BRANCH $ARCH_BUILD_ARG -f $DOCKERFILE $DOCKER_PATH" diff --git a/jjb/releng/opnfv-docker.yml b/jjb/releng/opnfv-docker.yml index 317efc807..93b9a9c51 100644 --- a/jjb/releng/opnfv-docker.yml +++ b/jjb/releng/opnfv-docker.yml @@ -171,6 +171,10 @@ project: 'yardstick' <<: *euphrates <<: *other-receivers + - 'xtesting': + project: 'functest-xtesting' + <<: *master + <<: *other-receivers # projects with jobs for danube - 'dovetail': project: 'dovetail' diff --git a/jjb/releng/automate.yml b/jjb/releng/testresults-automate.yml index 6bd952a1d..01fbe0c6d 100644 --- a/jjb/releng/automate.yml +++ b/jjb/releng/testresults-automate.yml @@ -1,6 +1,6 @@ --- - project: - name: utils-automate + name: testresults-automate stream: - master: branch: '{stream}' @@ -17,7 +17,6 @@ jobs: - '{module}-automate-{stream}' - '{module}-automate-{phase}-{stream}' - - '{module}-verify-{stream}' project: 'releng-testresults' @@ -53,53 +52,6 @@ send-to-individuals: true - job-template: - name: '{module}-verify-{stream}' - - 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}' - file-paths: - - compare-type: 'ANT' - pattern: '{module}/**' - - builders: - - shell: | - cd {module}/ - tox - if [ -e *.xml ];then - cp *.xml $WORKSPACE - fi - - publishers: - - publish-coverage - - email-jenkins-admins-on-failure - -- job-template: name: '{module}-automate-{stream}' project-type: multijob @@ -135,21 +87,10 @@ fail: true triggers: - - gerrit: - server-name: 'gerrit.opnfv.org' - trigger-on: - - change-merged-event - - comment-added-contains-event: - comment-contains-value: 'remerge' - projects: - - project-compare-type: 'ANT' - project-pattern: '{project}' - branches: - - branch-compare-type: 'ANT' - branch-pattern: '**/{branch}' - file-paths: - - compare-type: 'ANT' - pattern: '{module}/**' + - gerrit-trigger-change-merged: + project: '**' + branch: '{branch}' + files: '{module}/**' builders: - description-setter: diff --git a/jjb/releng/testresults-verify.yml b/jjb/releng/testresults-verify.yml new file mode 100644 index 000000000..958833c0f --- /dev/null +++ b/jjb/releng/testresults-verify.yml @@ -0,0 +1,78 @@ +--- +- project: + name: testresults-verify + stream: + - master: + branch: '{stream}' + + module: + - 'testapi' + - 'reporting' + + jobs: + - '{module}-verify-{stream}' + - '{module}-client-verify-{stream}' + + project: 'releng-testresults' + +- job-template: + name: '{module}-verify-{stream}' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + + scm: + - git-scm-gerrit + + triggers: + - gerrit-trigger-patchset-created: + server: 'gerrit.opnfv.org' + project: '**' + branch: '{branch}' + files: '{module}/**' + + builders: + - shell: | + cd {module}/ + tox + if [ -e *.xml ];then + cp *.xml $WORKSPACE + fi + + publishers: + - publish-coverage + - email-jenkins-admins-on-failure + +- job-template: + name: '{module}-client-verify-{stream}' + + parameters: + - project-parameter: + project: '{project}' + branch: '{branch}' + - 'opnfv-build-ubuntu-defaults' + + scm: + - git-scm-gerrit + + triggers: + - gerrit-trigger-patchset-created: + server: 'gerrit.opnfv.org' + project: '**' + branch: '{branch}' + files: '{module}/{module}-client/**' + + builders: + - shell: | + cd {module}/{module}-client + tox + if [ -e *.xml ];then + cp *.xml $WORKSPACE + fi + + publishers: + - publish-coverage + - email-jenkins-admins-on-failure diff --git a/jjb/xci/osa-periodic-jobs.yml b/jjb/xci/osa-periodic-jobs.yml index cf4916bde..6c2d165a4 100644 --- a/jjb/xci/osa-periodic-jobs.yml +++ b/jjb/xci/osa-periodic-jobs.yml @@ -216,6 +216,7 @@ export FUNCTEST_MODE=$FUNCTEST_MODE export FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME export XCI_FLAVOR=$XCI_FLAVOR + export CORE_OPENSTACK_INSTALL=true export CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES export OPNFV_RELENG_DEV_PATH=/home/devuser/releng-xci/ export INSTALLER_TYPE=$INSTALLER_TYPE @@ -247,8 +248,8 @@ - shell: | #!/bin/bash - sudo virsh destroy ${DISTRO}_xci_vm - sudo virsh undefine ${DISTRO}_xci_vm + sudo virsh destroy ${DISTRO}_xci_vm || true + sudo virsh undefine ${DISTRO}_xci_vm || true # this will be enabled once the xci is prepared # - builder: diff --git a/jjb/xci/xci-cleanup.sh b/jjb/xci/xci-cleanup.sh index 45b4ec273..ce84830aa 100755 --- a/jjb/xci/xci-cleanup.sh +++ b/jjb/xci/xci-cleanup.sh @@ -20,5 +20,5 @@ if [[ "$GERRIT_TOPIC" =~ 'skip-verify' ]]; then exit 0 fi -sudo virsh destroy ${DISTRO}_xci_vm -sudo virsh undefine ${DISTRO}_xci_vm +sudo virsh destroy ${DISTRO}_xci_vm || true +sudo virsh undefine ${DISTRO}_xci_vm || true diff --git a/jjb/xci/xci-run-functest.sh b/jjb/xci/xci-run-functest.sh index 238a833d0..9bcc469c7 100755 --- a/jjb/xci/xci-run-functest.sh +++ b/jjb/xci/xci-run-functest.sh @@ -42,3 +42,7 @@ fi ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm "cd releng-xci/xci && PATH=/home/devuser/.local/bin:$PATH ansible-playbook -i installer/osa/files/$XCI_FLAVOR/inventory playbooks/prepare-functest.yml" echo "Running functest" ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "/root/run-functest.sh" +echo "Functest log" +echo "---------------------------------------------------------------------------------" +ssh -F $HOME/.ssh/${DISTRO}-xci-vm-config ${DISTRO}_xci_vm_opnfv "cat /root/results/functest.log" +echo "---------------------------------------------------------------------------------" diff --git a/jjb/xci/xci-set-scenario.sh b/jjb/xci/xci-set-scenario.sh index 59205e291..764857ba4 100755 --- a/jjb/xci/xci-set-scenario.sh +++ b/jjb/xci/xci-set-scenario.sh @@ -58,7 +58,7 @@ fi git clone https://gerrit.opnfv.org/gerrit/$GERRIT_PROJECT $WORK_DIRECTORY/$GERRIT_PROJECT cd $WORK_DIRECTORY/$GERRIT_PROJECT git fetch https://gerrit.opnfv.org/gerrit/$GERRIT_PROJECT $GERRIT_REFSPEC && git checkout FETCH_HEAD -DEPLOY_SCENARIO=$(git diff HEAD^..HEAD --name-only | grep scenarios | sed -r 's/scenarios\/(.*?)\/.*/\1/' | uniq) +DEPLOY_SCENARIO=$(git diff HEAD^..HEAD --name-only | grep scenarios | awk -F '[/|/]' '{print $2}' | uniq) # ensure single scenario is impacted if [[ $(echo $DEPLOY_SCENARIO | wc -w) != 1 ]]; then diff --git a/jjb/xci/xci-start-new-vm.sh b/jjb/xci/xci-start-new-vm.sh index d676e2662..d816a4f38 100755 --- a/jjb/xci/xci-start-new-vm.sh +++ b/jjb/xci/xci-start-new-vm.sh @@ -53,6 +53,7 @@ export DEPLOY_SCENARIO=$DEPLOY_SCENARIO export FUNCTEST_MODE=$FUNCTEST_MODE export FUNCTEST_SUITE_NAME=$FUNCTEST_SUITE_NAME export XCI_FLAVOR=$XCI_FLAVOR +export CORE_OPENSTACK_INSTALL=true export CLEAN_DIB_IMAGES=$CLEAN_DIB_IMAGES export OPNFV_RELENG_DEV_PATH=/home/devuser/releng-xci/ export INSTALLER_TYPE=$INSTALLER_TYPE |