name: 'functest-defaultparameters'
repo: opnfv
tag:
- - gambia
- - hunter
- - latest
+ - gambia:
+ branch: stable/gambia
+ - hunter:
+ branch: stable/hunter
+ - 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'
name: repo-functest-container-tag-pull
<<: *functest-defaultparameters
container:
+ - core
+ - tempest
- healthcheck
- smoke
- benchmarking
- 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'
- name: '{repo}-functest-vnf-{tag}-pull'
- name: '{repo}-functest-features-{tag}-pull'
-- functest-buildparameters: &functest-buildparameters
- name: 'functest-buildparameters'
+- job:
+ name: alpine-rmi
parameters:
- functest-virtual-defaults
- - string:
- name: branch
- default: master
+ 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'
-v /home/opnfv/functest/tempest_blacklist.yaml:\
/usr/lib/python2.7/site-packages/functest/opnfv_tests/openstack/\
tempest/custom_tests/blacklist.yaml \
- -v /home/opnfv/functest/images/rally_blacklist.yaml:\
+ -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
test:
- tempest_full
- tempest_scenario
+ - rally_full
jobs:
- '{repo}-functest-{container}-{test}-{tag}-run'
projects:
- name: '{repo}-functest-components-tempest_full-{tag}-run'
- name: '{repo}-functest-components-tempest_scenario-{tag}-run'
+ # - name: '{repo}-functest-components-rally_full-{tag}-run'
- project:
name: repo-functest-vnf-{test}-{tag}-run
- 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
jobs:
- '{repo}-functest-{tag}-daily'
+- 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}'
+
+- 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-gerrit
+ name: functest-scm
scm:
- git:
url: https://gerrit.opnfv.org/gerrit/functest
refspec: '+refs/changes/*:refs/changes/*'
branches:
- - ${branch}
+ - '{ref}'
+
+- functest-buildparameters: &functest-buildparameters
+ name: 'functest-buildparameters'
+ container: '{container}'
+ repo: '{repo}'
+ tag: '{tag}'
- job-template:
- name: '{repo}-functest-{container}-{tag}-build'
- <<: *functest-buildparameters
+ name: '{repo}-functest-{container}-{tag}-gate'
+ <<: *functest-gateparameters
scm:
- - functest-gerrit
+ - functest-scm:
+ ref: $GERRIT_REFSPEC
builders:
- - shell: |
- case "{container}" in
- "components")
- args="" ;;
- *)
- args="--build-arg BRANCH=${{branch}}" ;;
- esac
- cd docker/$(echo {container} |cut -d\- -f 2)
- 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
- 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'
- 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: benchmarking
- <<: *functest-benchmarkingjobs
+ name: remove advanced functest containers
+ <<: *functest-advcontainers-rmi
- multijob:
- name: components
- <<: *functest-componentsjobs
+ name: remove functest-tempest
+ projects:
+ - name: '{repo}-functest-tempest-{tag}-rmi'
+ <<: *functest-projectparameters
- multijob:
- name: vnf
- <<: *functest-vnfjobs
+ 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: build functest-tempest
+ projects:
+ - name: '{repo}-functest-tempest-{tag}-check'
+ <<: *functest-projectparameters
+ - multijob:
+ 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'