X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Ffunctest%2Ffunctest.yaml;h=09494e732342018ee3dfee7bb2e0d7766cd8b364;hb=e68f0d5ccca1215080e34a7e905bba1e7ddec6cb;hp=2ab08097c9fa34d4051f8d55463508e2f6cb2ed4;hpb=6ffddbea33bb13caa0a43aa9f22086ffbac0f9fd;p=releng.git diff --git a/jjb/functest/functest.yaml b/jjb/functest/functest.yaml index 2ab08097c..09494e732 100644 --- a/jjb/functest/functest.yaml +++ b/jjb/functest/functest.yaml @@ -1,7 +1,10 @@ --- -- functest-jobs: &functest-jobs - name: 'functest-jobs' - current-parameters: true +- functest-containers: &functest-containers + name: 'functest-containers' + repo: '{repo}' + port: '{port}' + container: '{container}' + tag: '{tag}' - functest-params: &functest-params name: 'functest-params' @@ -9,35 +12,44 @@ port: tag: - latest: + from: + buildargs: branch: master - slave: lf-virtual9 - dashboard_url: http://172.30.13.94 + slave: lf-pod4-2 + DASHBOARD_URL: http://172.30.12.85 + dependency: 3.13 + - wallaby: + from: + buildargs: + branch: stable/wallaby + slave: lf-virtual6 + DASHBOARD_URL: http://172.30.13.91 dependency: 3.13 - leguer: + from: + buildargs: branch: stable/leguer slave: lf-virtual9 - dashboard_url: http://172.30.13.94 + DASHBOARD_URL: http://172.30.13.94 dependency: 3.12 - kali: + from: + buildargs: branch: stable/kali slave: lf-pod4-3 - dashboard_url: http://172.30.12.88 + DASHBOARD_URL: http://172.30.12.88 dependency: 3.11 - jerma: + from: + buildargs: branch: stable/jerma slave: lf-pod4 - dashboard_url: http://172.30.12.83 + DASHBOARD_URL: http://172.30.12.83 dependency: 3.10 - - iruya: - branch: stable/iruya - slave: lf-virtual4 - dashboard_url: http://172.30.13.89 - dependency: 3.9 - - hunter: - branch: stable/hunter - slave: lf-virtual6 - dashboard_url: http://172.30.13.91 - dependency: 3.9 + +- functest-jobs: &functest-jobs + name: 'functest-jobs' + current-parameters: true - parameter: name: functest-slave @@ -58,12 +70,14 @@ - string: name: EXTERNAL_NETWORK default: public + - parameter: name: functest-VOLUME_DEVICE_NAME parameters: - string: name: VOLUME_DEVICE_NAME default: sdb + - parameter: name: functest-IMAGE_PROPERTIES parameters: @@ -71,19 +85,13 @@ name: IMAGE_PROPERTIES default: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi -- functest-containers: &functest-containers - name: 'functest-containers' - repo: '{repo}' - port: '{port}' - container: '{container}' - tag: '{tag}' - - functest-run-containers: &functest-run-containers name: 'functest-run-containers' <<: *functest-containers test: '{test}' privileged: '{privileged}' network: '{network}' + DASHBOARD_URL: '{DASHBOARD_URL}' - builder: name: functest-pull-containers @@ -127,6 +135,7 @@ -e EXTERNAL_NETWORK=$EXTERNAL_NETWORK \ -e VOLUME_DEVICE_NAME=$VOLUME_DEVICE_NAME \ -e IMAGE_PROPERTIES=$IMAGE_PROPERTIES \ + -e DASHBOARD_URL={DASHBOARD_URL} \ -v /home/opnfv/functest/openstack.creds:/home/opnfv/functest/conf/env_file \ -v /home/opnfv/functest/images:/home/opnfv/functest/images \ $image run_tests -t {test} -p -r @@ -145,43 +154,6 @@ fi sudo docker rmi $image || true -- functest-build-containers: &functest-build-containers - name: 'functest-build-containers' - <<: *functest-containers - ref_arg: '{ref_arg}' - path: '{path}' - -- builder: - name: functest-build-containers - builders: - - shell: | - set +x - if [ "{repo}" = "_" ]; then - image={container}:{tag} - elif [ "{port}" = "None" ]; then - image={repo}/{container}:{tag} - else - image={repo}:{port}/{container}:{tag} - fi - if [ "{ref_arg}" = "None" ]; then - build_arg="" - else - build_arg="--build-arg {ref_arg}={ref}" - fi - cd {path} - sudo docker build $build_arg \ - --pull=false --no-cache --force-rm=true \ - -t $image . - -- scm: - name: functest-scm - scm: - - git: - url: 'https://gerrit.opnfv.org/gerrit/functest' - refspec: '+refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*' - branches: - - '{ref}' - - job-template: name: 'functest-{repo}-{container}-{tag}-pull' parameters: @@ -354,41 +326,56 @@ privileged: 'false' network: bridge exclude: - - {'tag': 'latest', 'test': 'refstack_defcore'} - - {'tag': 'latest', 'test': 'networking-bgpvpn'} - - {'tag': 'latest', 'test': 'networking-sfc'} - - {'tag': 'latest', 'test': 'patrole'} - - {'tag': 'leguer', 'test': 'refstack_defcore'} - - {'tag': 'leguer', 'test': 'networking-bgpvpn'} - - {'tag': 'leguer', 'test': 'networking-sfc'} - - {'tag': 'leguer', 'test': 'patrole'} - - {'tag': 'kali', 'test': 'refstack_defcore'} - - {'tag': 'kali', 'test': 'networking-bgpvpn'} - - {'tag': 'kali', 'test': 'networking-sfc'} - - {'tag': 'kali', 'test': 'patrole_admin'} - - {'tag': 'kali', 'test': 'patrole_member'} - - {'tag': 'kali', 'test': 'patrole_reader'} - - {'tag': 'jerma', 'test': 'refstack_defcore'} - - {'tag': 'jerma', 'test': 'networking-bgpvpn'} - - {'tag': 'jerma', 'test': 'networking-sfc'} - - {'tag': 'jerma', 'test': 'patrole_admin'} - - {'tag': 'jerma', 'test': 'patrole_member'} - - {'tag': 'jerma', 'test': 'patrole_reader'} - - {'tag': 'jerma', 'test': 'tempest_cyborg'} - - {'tag': 'iruya', 'test': 'refstack_defcore'} - - {'tag': 'iruya', 'test': 'patrole_admin'} - - {'tag': 'iruya', 'test': 'patrole_member'} - - {'tag': 'iruya', 'test': 'patrole_reader'} - - {'tag': 'iruya', 'test': 'tempest_cyborg'} - - {'tag': 'hunter', 'test': 'refstack_compute'} - - {'tag': 'hunter', 'test': 'refstack_object'} - - {'tag': 'hunter', 'test': 'refstack_platform'} - - {'tag': 'hunter', 'test': 'tempest_octavia'} - - {'tag': 'hunter', 'test': 'tempest_telemetry'} - - {'tag': 'hunter', 'test': 'patrole_admin'} - - {'tag': 'hunter', 'test': 'patrole_member'} - - {'tag': 'hunter', 'test': 'patrole_reader'} - - {'tag': 'hunter', 'test': 'tempest_cyborg'} + - tag: latest + test: refstack_defcore + - tag: latest + test: networking-bgpvpn + - tag: latest + test: networking-sfc + - tag: latest + test: patrole + - tag: wallaby + test: refstack_defcore + - tag: wallaby + test: networking-bgpvpn + - tag: wallaby + test: networking-sfc + - tag: wallaby + test: patrole + - tag: leguer + test: refstack_defcore + - tag: leguer + test: networking-bgpvpn + - tag: leguer + test: networking-sfc + - tag: leguer + test: patrole + - tag: kali + test: refstack_defcore + - tag: kali + test: networking-bgpvpn + - tag: kali + test: networking-sfc + - tag: kali + test: patrole_admin + - tag: kali + test: patrole_member + - tag: kali + test: patrole_reader + - tag: jerma + test: refstack_defcore + - tag: jerma + test: networking-bgpvpn + - tag: jerma + test: networking-sfc + - tag: jerma + test: patrole_admin + - tag: jerma + test: patrole_member + - tag: jerma + test: patrole_reader + - tag: jerma + test: tempest_cyborg jobs: - 'functest-{repo}-{container}-{tag}-{test}-run' @@ -451,12 +438,12 @@ jobs: - 'functest-{repo}-{container}-{tag}-{test}-run' - - builder: name: functest-zip builders: - shell: | set +x + [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true if [ "{repo}" = "_" ]; then image={container}:{tag} elif [ "{port}" = "None" ]; then @@ -520,12 +507,14 @@ VOLUME_DEVICE_NAME: sdb - functest-IMAGE_PROPERTIES: IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi + # PyYAML and yamllint differ here + # see https://github.com/yaml/pyyaml/issues/234 + # yamllint disable rule:indentation properties: - build-blocker: - use-build-blocker: true - blocking-level: 'NODE' blocking-jobs: - - '^functest-{tag}-(daily|docker|review)$' + - ^functest-(pi-)*{tag}-(daily|docker|review)$ + # yamllint enable rule:indentation builders: - multijob: name: remove former images @@ -689,6 +678,68 @@ - name: 'functest-{tag}-zip' <<: *functest-jobs +- project: + name: 'functest-daily' + <<: *functest-params + jobs: + - 'functest-{tag}-daily' + +- view: + name: functest + view-type: list + columns: + - status + - weather + - job + - last-success + - last-failure + - last-duration + regex: ^functest-[a-z0-9.]+-daily$ + +- functest-build-containers: &functest-build-containers + name: 'functest-build-containers' + <<: *functest-containers + ref_arg: '{ref_arg}' + path: '{path}' + buildargs: '{buildargs}' + from: '{from}' + +- builder: + name: functest-build-containers + builders: + - shell: | + set +x + if [ "{repo}" = "_" ]; then + image={container}:{tag} + elif [ "{port}" = "None" ]; then + image={repo}/{container}:{tag} + else + image={repo}:{port}/{container}:{tag} + fi + build_args="" + if [ "{buildargs}" != "None" ]; then + build_args="{buildargs}" + fi + if [ "{ref_arg}" != "None" ]; then + build_args="$build_args --build-arg {ref_arg}={ref}" + fi + cd {path} + if [ "{from}" != "None" ]; then + sed -i {from} Dockerfile + fi + sudo docker build $build_args \ + --pull=false --no-cache --force-rm=true \ + -t $image . + +- scm: + name: functest-scm + scm: + - git: + url: 'https://gerrit.opnfv.org/gerrit/functest' + refspec: '+refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*' + branches: + - '{ref}' + - functest-dep: &functest-dep name: 'functest-containers' repo: '{repo}' @@ -703,10 +754,10 @@ set +x if [ "_" = "_" ]; then image=alpine:{dependency} - elif [ "_" = "None" ]; then + elif [ "None" = "None" ]; then image=_/alpine:{dependency} else - image=_:/alpine{dependency} + image=_:/alpine:{dependency} fi sudo docker pull $image || true @@ -717,10 +768,10 @@ set +x if [ "_" = "_" ]; then image=alpine:{dependency} - elif [ "_" = "None" ]; then + elif [ "" = "None" ]; then image=_/alpine:{dependency} else - image=_:/alpine{dependency} + image=_:/alpine:{dependency} fi sudo docker rmi $image || true @@ -759,13 +810,15 @@ builders: - shell: | set +x - sudo apt-get update && sudo apt-get install software-properties-common gpg -y + sudo apt-get update && sudo apt-get install \ + software-properties-common gpg -y sudo add-apt-repository -y ppa:deadsnakes/ppa - sudo apt-get update && sudo apt-get install python3.8 python3.8-dev \ - python3.8-distutils \ + sudo apt-get update && sudo apt-get install python3.8 \ + python3.8-dev python3.8-distutils \ python3.7 python3.7-dev python3.6 python3.6-dev \ python python-dev python3-pip enchant -y sudo pip3 install tox tox-pip-version + tox - job-template: @@ -788,6 +841,20 @@ jobs: - 'functest-{tag}-tox' +- job-template: + name: 'functest-{repo}-{container}-{tag}-gate' + parameters: + - functest-slave: + slave: '{slave}' + scm: + - functest-scm: + ref: $GERRIT_REFSPEC + builders: + - functest-build-containers: + <<: *functest-build-containers + ref: $GERRIT_REFSPEC + buildargs: '{buildargs}' + - project: name: functest-opnfv-functest-core-{tag}-gate <<: *functest-params @@ -797,6 +864,21 @@ jobs: - 'functest-{repo}-{container}-{tag}-gate' +- project: + name: functest-opnfv-functest-tempest-{tag}-gate + <<: *functest-params + container: functest-tempest + ref_arg: BRANCH + path: docker/tempest + exclude: + - {'tag': 'latest'} + - {'tag': 'wallaby'} + - {'tag': 'leguer'} + - {'tag': 'kali'} + - {'tag': 'jerma'} + jobs: + - 'functest-{repo}-{container}-{tag}-gate' + - project: name: functest-opnfv-functest-healthcheck-{tag}-gate <<: *functest-params @@ -851,20 +933,6 @@ jobs: - 'functest-{repo}-{container}-{tag}-gate' - -- job-template: - name: 'functest-{repo}-{container}-{tag}-gate' - parameters: - - functest-slave: - slave: '{slave}' - scm: - - functest-scm: - ref: $GERRIT_REFSPEC - builders: - - functest-build-containers: - <<: *functest-build-containers - ref: $GERRIT_REFSPEC - - trigger: name: functest-patchset-created triggers: @@ -899,12 +967,14 @@ VOLUME_DEVICE_NAME: sdb - functest-IMAGE_PROPERTIES: IMAGE_PROPERTIES: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi + # PyYAML and yamllint differ here + # see https://github.com/yaml/pyyaml/issues/234 + # yamllint disable rule:indentation properties: - build-blocker: - use-build-blocker: true - blocking-level: 'NODE' blocking-jobs: - - '^functest-{tag}-(daily|docker|review)$' + - ^functest-(pi-)*{tag}-(daily|docker|review)$ + # yamllint enable rule:indentation builders: - multijob: name: remove former images @@ -936,6 +1006,11 @@ projects: - name: 'functest-opnfv-functest-core-{tag}-gate' <<: *functest-jobs + - multijob: + name: build opnfv/functest-tempest + projects: + - name: 'functest-opnfv-functest-tempest-{tag}-gate' + <<: *functest-jobs - multijob: name: build containers projects: @@ -1081,6 +1156,36 @@ - name: 'functest-opnfv-functest-vnf-{tag}-juju_epc-run' <<: *functest-jobs +- project: + name: 'functest-review' + <<: *functest-params + jobs: + - 'functest-{tag}-review' + +- view: + name: functest-review + view-type: list + columns: + - status + - weather + - job + - last-success + - last-failure + - last-duration + regex: ^functest-[a-z0-9.]+-review$ + +- view: + name: functest-tox + view-type: list + columns: + - status + - weather + - job + - last-success + - last-failure + - last-duration + regex: ^functest-[a-z0-9.]+-tox$ + - builder: name: functest-push-containers builders: @@ -1113,6 +1218,7 @@ - functest-build-containers: <<: *functest-build-containers ref: '{branch}' + buildargs: '{buildargs}' - functest-push-containers: <<: *functest-build-containers ref: '{branch}' @@ -1126,6 +1232,21 @@ jobs: - 'functest-{repo}-{container}-{tag}-build' +- project: + name: functest-opnfv-functest-tempest-{tag}-build + <<: *functest-params + container: functest-tempest + ref_arg: BRANCH + path: docker/tempest + exclude: + - {'tag': 'latest'} + - {'tag': 'wallaby'} + - {'tag': 'leguer'} + - {'tag': 'kali'} + - {'tag': 'jerma'} + jobs: + - 'functest-{repo}-{container}-{tag}-build' + - project: name: functest-opnfv-functest-healthcheck-{tag}-build <<: *functest-params @@ -1180,7 +1301,6 @@ jobs: - 'functest-{repo}-{container}-{tag}-build' - - job-template: name: 'functest-{tag}-docker' project-type: multijob @@ -1192,12 +1312,14 @@ parameters: - functest-slave: slave: '{slave}' + # PyYAML and yamllint differ here + # see https://github.com/yaml/pyyaml/issues/234 + # yamllint disable rule:indentation properties: - build-blocker: - use-build-blocker: true - blocking-level: 'NODE' blocking-jobs: - - '^functest-{tag}-(daily|docker|review)$' + - ^functest-(pi-)*{tag}-(daily|docker|review)$ + # yamllint enable rule:indentation builders: - multijob: name: remove dependency @@ -1214,6 +1336,11 @@ projects: - name: 'functest-opnfv-functest-core-{tag}-build' <<: *functest-jobs + - multijob: + name: build opnfv/functest-tempest + projects: + - name: 'functest-opnfv-functest-tempest-{tag}-build' + <<: *functest-jobs - multijob: name: build containers projects: @@ -1237,7 +1364,8 @@ name: functest-trivy builders: - shell: | - sudo apt-get update && sudo apt-get install curl + sudo apt-get update && sudo apt-get install curl -y + curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sudo sh -s -- -b . if [ "{repo}" = "_" ]; then image={container}:{tag} @@ -1259,40 +1387,59 @@ - functest-trivy: <<: *functest-containers +- project: + name: 'functest-opnfv-functest-core-trivy' + <<: *functest-params + container: 'functest-core' + jobs: + - 'functest-{repo}-{container}-{tag}-trivy' + +- project: + name: 'functest-opnfv-functest-tempest-trivy' + <<: *functest-params + container: 'functest-tempest' + jobs: + - 'functest-{repo}-{container}-{tag}-trivy' + - project: name: 'functest-opnfv-functest-healthcheck-trivy' <<: *functest-params container: 'functest-healthcheck' jobs: - 'functest-{repo}-{container}-{tag}-trivy' + - project: name: 'functest-opnfv-functest-smoke-trivy' <<: *functest-params container: 'functest-smoke' jobs: - 'functest-{repo}-{container}-{tag}-trivy' + - project: - name: 'functest-opnfv-functest-smoke-cntt-trivy' + name: 'functest-opnfv-functest-benchmarking-trivy' <<: *functest-params - container: 'functest-smoke-cntt' + container: 'functest-benchmarking' jobs: - 'functest-{repo}-{container}-{tag}-trivy' + - project: - name: 'functest-opnfv-functest-benchmarking-trivy' + name: 'functest-opnfv-functest-vnf-trivy' <<: *functest-params - container: 'functest-benchmarking' + container: 'functest-vnf' jobs: - 'functest-{repo}-{container}-{tag}-trivy' + - project: - name: 'functest-opnfv-functest-benchmarking-cntt-trivy' + name: 'functest-opnfv-functest-smoke-cntt-trivy' <<: *functest-params - container: 'functest-benchmarking-cntt' + container: 'functest-smoke-cntt' jobs: - 'functest-{repo}-{container}-{tag}-trivy' + - project: - name: 'functest-opnfv-functest-vnf-trivy' + name: 'functest-opnfv-functest-benchmarking-cntt-trivy' <<: *functest-params - container: 'functest-vnf' + container: 'functest-benchmarking-cntt' jobs: - 'functest-{repo}-{container}-{tag}-trivy' @@ -1300,47 +1447,8 @@ name: 'functest' <<: *functest-params jobs: - - 'functest-{tag}-daily' - - 'functest-{tag}-review' - 'functest-{tag}-docker' - -- view: - name: functest - view-type: list - columns: - - status - - weather - - job - - last-success - - last-failure - - last-duration - regex: ^functest-[a-z-]+-daily$ - -- view: - name: functest-review - view-type: list - columns: - - status - - weather - - job - - last-success - - last-failure - - last-duration - regex: ^functest-[a-z-]+-review$ - -- view: - name: functest-tox - view-type: list - columns: - - status - - weather - - job - - last-success - - last-failure - - last-duration - regex: ^functest-[a-z-]+-tox$ - - view: name: functest-docker view-type: list @@ -1351,7 +1459,7 @@ - last-success - last-failure - last-duration - regex: ^functest-[a-z-]+-docker$ + regex: ^functest-[a-z0-9.]+-docker$ - view: name: functest-trivy @@ -1363,4 +1471,4 @@ - last-success - last-failure - last-duration - regex: ^functest-[a-z-]+-trivy$ + regex: (?!functest-kubernetes)(?!functest-pi)^functest-[a-z-0-9.]+-trivy$