X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Ffunctest%2Ffunctest-virtual.yaml;h=91dacb1777662a54ef212dd924e5b97660f1a132;hb=28f7d7c0ef101a6660b743620e0f2d5aa3e8993e;hp=43eb2fb0c7bcd66f2ed5d2aebda1431ff02e84a0;hpb=44807a3a3b14072f2d6318146a024b5d2b6052f5;p=releng.git diff --git a/jjb/functest/functest-virtual.yaml b/jjb/functest/functest-virtual.yaml index 43eb2fb0c..91dacb177 100644 --- a/jjb/functest/functest-virtual.yaml +++ b/jjb/functest/functest-virtual.yaml @@ -7,9 +7,16 @@ branch: stable/gambia - hunter: branch: stable/hunter - - master: + - latest: branch: master +- job: + name: alpine-pull + parameters: + - functest-virtual-defaults + builders: + - shell: sudo docker pull alpine:3.8 + - job-template: name: '{repo}-functest-{container}-{tag}-pull' parameters: @@ -21,6 +28,8 @@ name: repo-functest-container-tag-pull <<: *functest-defaultparameters container: + - core + - tempest - healthcheck - smoke - benchmarking @@ -33,6 +42,9 @@ - functest-pulljobs: &functest-pulljobs name: 'functest-pulljobs' projects: + - name: 'alpine-pull' + - name: '{repo}-functest-core-{tag}-pull' + - name: '{repo}-functest-tempest-{tag}-pull' - name: '{repo}-functest-healthcheck-{tag}-pull' - name: '{repo}-functest-smoke-{tag}-pull' - name: '{repo}-functest-benchmarking-{tag}-pull' @@ -40,6 +52,35 @@ - name: '{repo}-functest-vnf-{tag}-pull' - name: '{repo}-functest-features-{tag}-pull' +- job: + name: alpine-rmi + parameters: + - functest-virtual-defaults + builders: + - shell: sudo docker rmi alpine:3.8 || true + +- job-template: + name: '{repo}-functest-{container}-{tag}-rmi' + parameters: + - functest-virtual-defaults + builders: + - shell: sudo docker rmi {repo}/functest-{container}:{tag} || true + +- project: + name: repo-functest-container-tag-rmi + <<: *functest-defaultparameters + container: + - core + - tempest + - healthcheck + - smoke + - benchmarking + - components + - vnf + - features + jobs: + - '{repo}-functest-{container}-{tag}-rmi' + - job-template: name: '{repo}-functest-{container}-{test}-{tag}-run' parameters: @@ -59,7 +100,15 @@ -v /home/opnfv/functest/rally_blacklist.yaml:\ /usr/lib/python2.7/site-packages/functest/opnfv_tests/openstack/\ rally/blacklist.yaml \ - {repo}/functest-{container}:{tag} run_tests -t {test} + {repo}/functest-{container}:{tag} run_tests -t {test} || \ + export RES=$? + gsutil -m cp -r /home/opnfv/functest/results/$JOB_NAME-$BUILD_ID \ + gs://artifacts.opnfv.org/functest/ > /dev/null + find /home/opnfv/functest/results/$JOB_NAME-$BUILD_ID -type f \ + -printf \ + "http://artifacts.opnfv.org/functest/$JOB_NAME-$BUILD_ID/%P\n" + sudo rm -rf /home/opnfv/functest/results/$JOB_NAME-$BUILD_ID + exit $RES - project: name: repo-functest-healthcheck-test-tag-run @@ -213,34 +262,85 @@ - name: '{repo}-functest-features-vgpu-{tag}-run' - name: '{repo}-functest-features-stor4nfv_os-{tag}-run' +- functest-advjobs: &functest-advjobs + name: '&functest-advjobs' + projects: + - name: '{repo}-functest-smoke-tempest_smoke-{tag}-run' + - name: '{repo}-functest-smoke-neutron-tempest-plugin-api-{tag}-run' + - name: '{repo}-functest-smoke-rally_sanity-{tag}-run' + - name: '{repo}-functest-smoke-rally_jobs-{tag}-run' + - name: '{repo}-functest-smoke-refstack_defcore-{tag}-run' + - name: '{repo}-functest-smoke-patrole-{tag}-run' + - name: '{repo}-functest-smoke-snaps_smoke-{tag}-run' + - name: '{repo}-functest-smoke-neutron_trunk-{tag}-run' + - name: '{repo}-functest-smoke-networking-bgpvpn-{tag}-run' + - name: '{repo}-functest-smoke-networking-sfc-{tag}-run' + - name: '{repo}-functest-smoke-barbican-{tag}-run' + - name: '{repo}-functest-benchmarking-vmtp-{tag}-run' + - name: '{repo}-functest-benchmarking-shaker-{tag}-run' + - name: '{repo}-functest-components-tempest_full-{tag}-run' + - name: '{repo}-functest-components-tempest_scenario-{tag}-run' + # - name: '{repo}-functest-components-rally_full-{tag}-run' + - name: '{repo}-functest-vnf-cloudify-{tag}-run' + # - name: '{repo}-functest-vnf-cloudify_ims-{tag}-run' + # - name: '{repo}-functest-vnf-heat_ims-{tag}-run' + # - name: '{repo}-functest-vnf-vyos_vrouter-{tag}-run' + # - name: '{repo}-functest-vnf-juju_epc-{tag}-run' + - name: '{repo}-functest-features-doctor-notification-{tag}-run' + - name: '{repo}-functest-features-bgpvpn-{tag}-run' + - name: '{repo}-functest-features-functest-odl-sfc-{tag}-run' + - name: '{repo}-functest-features-barometercollectd-{tag}-run' + - name: '{repo}-functest-features-vgpu-{tag}-run' + - name: '{repo}-functest-features-stor4nfv_os-{tag}-run' + +- functest-advcontainers-rmi: &functest-advcontainers-rmi + name: 'functest-advcontainers-rmi' + projects: + - name: '{repo}-functest-smoke-{tag}-rmi' + - name: '{repo}-functest-benchmarking-{tag}-rmi' + - name: '{repo}-functest-components-{tag}-rmi' + - name: '{repo}-functest-vnf-{tag}-rmi' + - name: '{repo}-functest-features-{tag}-rmi' + - job-template: name: '{repo}-functest-{tag}-daily' <<: *functest-defaultparameters project-type: multijob + triggers: + - timed: '@daily' + properties: + - build-blocker: + use-build-blocker: true + blocking-level: 'NODE' + blocking-jobs: + - '{repo}-functest-.*-.*' parameters: - functest-virtual-defaults builders: - multijob: - name: pull containers - <<: *functest-pulljobs + name: remove advanced functest containers + <<: *functest-advcontainers-rmi - multijob: - name: healthcheck - <<: *functest-healthcheckjobs + name: remove functest-tempest + projects: + - name: '{repo}-functest-tempest-{tag}-rmi' - multijob: - name: smoke - <<: *functest-smokejobs + name: remove functest-core + projects: + - name: '{repo}-functest-core-{tag}-rmi' - multijob: - name: benchmarking - <<: *functest-benchmarkingjobs + name: remove alpine + projects: + - name: 'alpine-rmi' - multijob: - name: components - <<: *functest-componentsjobs + name: pull containers + <<: *functest-pulljobs - multijob: - name: vnf - <<: *functest-vnfjobs + name: healthcheck + <<: *functest-healthcheckjobs - multijob: - name: features - <<: *functest-featuresjobs + name: advanced suites + <<: *functest-advjobs - project: name: repo-functest-tag-daily @@ -248,35 +348,106 @@ jobs: - '{repo}-functest-{tag}-daily' -- functest-buildparameters: &functest-buildparameters - name: 'functest-buildparameters' +- functest-gateparameters: &functest-gateparameters + name: 'functest-gateparameters' + parameters: + - functest-virtual-defaults + +- functest-checkparameters: &functest-checkparameters + name: 'functest-checkparameters' parameters: - functest-virtual-defaults - string: name: BRANCH default: '{branch}' -- job-template: - name: '{repo}-functest-{container}-{tag}-build' - <<: *functest-buildparameters +- builder: + name: build-containers + builders: + - shell: | + case "{container}" in + "components") + args="" ;; + *) + args="--build-arg BRANCH={ref}" ;; + esac + cd docker/{container} + sudo docker build \ + ${{args}} --pull=false --no-cache --force-rm=true \ + -t {repo}/functest-{container}:{tag} . + +- scm: + name: functest-scm scm: - git: url: https://gerrit.opnfv.org/gerrit/functest refspec: '+refs/changes/*:refs/changes/*' branches: - - $GERRIT_REFSPEC + - '{ref}' + +- functest-buildparameters: &functest-buildparameters + name: 'functest-buildparameters' + container: '{container}' + repo: '{repo}' + tag: '{tag}' + +- job-template: + name: '{repo}-functest-{container}-{tag}-gate' + <<: *functest-gateparameters + scm: + - functest-scm: + ref: $GERRIT_REFSPEC builders: - - shell: | - case "{container}" in - "components") - args="" ;; - *) - args="--build-arg BRANCH=$GERRIT_REFSPEC" ;; - esac - cd docker/{container} - sudo docker build \ - ${{args}} --pull=false --no-cache --force-rm=true \ - -t {repo}/functest-{container}:{tag} . + - build-containers: + ref: $GERRIT_REFSPEC + <<: *functest-buildparameters + +- builder: + name: run-tox + builders: + - shell: tox -e docs,pep8,pylint,yamllint,bashate,py27,cover + +- job-template: + name: '{repo}-functest-{tag}-ut-gate' + <<: *functest-gateparameters + scm: + - functest-scm: + ref: $GERRIT_REFSPEC + builders: + - run-tox: + ref: $GERRIT_REFSPEC + repo: '{repo}' + tag: '{tag}' + +- job-template: + name: '{repo}-functest-{tag}-ut-check' + <<: *functest-checkparameters + scm: + - functest-scm: + ref: $BRANCH + builders: + - run-tox: + ref: $BRANCH + repo: '{repo}' + tag: '{tag}' + +- project: + name: repo-functest-tag-ut-build + <<: *functest-defaultparameters + jobs: + - '{repo}-functest-{tag}-ut-gate' + - '{repo}-functest-{tag}-ut-check' + +- job-template: + name: '{repo}-functest-{container}-{tag}-check' + <<: *functest-checkparameters + scm: + - functest-scm: + ref: $BRANCH + builders: + - build-containers: + ref: $BRANCH + <<: *functest-buildparameters - project: name: repo-functest-container-tag-build @@ -291,7 +462,8 @@ - vnf - features jobs: - - '{repo}-functest-{container}-{tag}-build' + - '{repo}-functest-{container}-{tag}-gate' + - '{repo}-functest-{container}-{tag}-check' - functest-projectparameters: &functest-projectparameters name: 'functest-projectparameters' @@ -300,59 +472,151 @@ - job-template: name: '{repo}-functest-{tag}-gate' project-type: multijob - <<: *functest-buildparameters + <<: *functest-gateparameters triggers: - gerrit-trigger-patchset-created: project: 'functest' branch: '{branch}' files: '**' + properties: + - build-blocker: + use-build-blocker: true + blocking-level: 'NODE' + blocking-jobs: + - '{repo}-functest-.*-.*' builders: + - multijob: + name: run tox + projects: + - name: '{repo}-functest-{tag}-ut-gate' + <<: *functest-projectparameters + - multijob: + name: remove advanced functest containers + <<: *functest-advcontainers-rmi + - multijob: + name: remove functest-tempest + projects: + - name: '{repo}-functest-tempest-{tag}-rmi' + <<: *functest-projectparameters + - multijob: + name: remove functest-core + projects: + - name: '{repo}-functest-core-{tag}-rmi' + <<: *functest-projectparameters + - multijob: + name: remove alpine + projects: + - name: 'alpine-rmi' + <<: *functest-projectparameters + - multijob: + name: pull alpine + projects: + - name: 'alpine-pull' - multijob: name: build functest-core projects: - - name: '{repo}-functest-core-{tag}-build' + - name: '{repo}-functest-core-{tag}-gate' <<: *functest-projectparameters - multijob: name: build functest-tempest projects: - - name: '{repo}-functest-tempest-{tag}-build' + - name: '{repo}-functest-tempest-{tag}-gate' <<: *functest-projectparameters - multijob: name: build all remaining contrainers projects: - - name: '{repo}-functest-healthcheck-{tag}-build' + - name: '{repo}-functest-healthcheck-{tag}-gate' <<: *functest-projectparameters - - name: '{repo}-functest-smoke-{tag}-build' + - name: '{repo}-functest-smoke-{tag}-gate' <<: *functest-projectparameters - - name: '{repo}-functest-benchmarking-{tag}-build' + - name: '{repo}-functest-benchmarking-{tag}-gate' <<: *functest-projectparameters - - name: '{repo}-functest-components-{tag}-build' + - name: '{repo}-functest-components-{tag}-gate' <<: *functest-projectparameters - - name: '{repo}-functest-vnf-{tag}-build' + - name: '{repo}-functest-vnf-{tag}-gate' <<: *functest-projectparameters - - name: '{repo}-functest-features-{tag}-build' + - name: '{repo}-functest-features-{tag}-gate' <<: *functest-projectparameters - multijob: name: healthcheck <<: *functest-healthcheckjobs - multijob: - name: smoke - <<: *functest-smokejobs + name: advanced suites + <<: *functest-advjobs + +- job-template: + name: '{repo}-functest-{tag}-check' + project-type: multijob + <<: *functest-checkparameters + properties: + - build-blocker: + use-build-blocker: true + blocking-level: 'NODE' + blocking-jobs: + - '{repo}-functest-.*-.*' + builders: + - multijob: + name: run tox + projects: + - name: '{repo}-functest-{tag}-ut-check' + <<: *functest-projectparameters + - multijob: + name: remove advanced functest containers + <<: *functest-advcontainers-rmi + - multijob: + name: remove functest-tempest + projects: + - name: '{repo}-functest-tempest-{tag}-rmi' + <<: *functest-projectparameters + - multijob: + name: remove functest-core + projects: + - name: '{repo}-functest-core-{tag}-rmi' + <<: *functest-projectparameters + - multijob: + name: remove alpine + projects: + - name: 'alpine-rmi' + <<: *functest-projectparameters + - multijob: + name: pull alpine + projects: + - name: 'alpine-pull' + - multijob: + name: build functest-core + projects: + - name: '{repo}-functest-core-{tag}-check' + <<: *functest-projectparameters - multijob: - name: benchmarking - <<: *functest-benchmarkingjobs + name: build functest-tempest + projects: + - name: '{repo}-functest-tempest-{tag}-check' + <<: *functest-projectparameters - multijob: - name: components - <<: *functest-componentsjobs - # - multijob: - # name: vnf - # <<: *functest-vnfjobs + name: build all remaining contrainers + projects: + - name: '{repo}-functest-healthcheck-{tag}-check' + <<: *functest-projectparameters + - name: '{repo}-functest-smoke-{tag}-check' + <<: *functest-projectparameters + - name: '{repo}-functest-benchmarking-{tag}-check' + <<: *functest-projectparameters + - name: '{repo}-functest-components-{tag}-check' + <<: *functest-projectparameters + - name: '{repo}-functest-vnf-{tag}-check' + <<: *functest-projectparameters + - name: '{repo}-functest-features-{tag}-check' + <<: *functest-projectparameters + - multijob: + name: healthcheck + <<: *functest-healthcheckjobs - multijob: - name: features - <<: *functest-featuresjobs + name: advanced suites + <<: *functest-advjobs - project: - name: repo-functest-tag-gate + name: repo-functest-tag-build <<: *functest-defaultparameters jobs: - '{repo}-functest-{tag}-gate' + - '{repo}-functest-{tag}-check'