--- - functest-kubernetes-containers: &functest-kubernetes-containers name: 'functest-kubernetes-containers' repo: '{repo}' port: '{port}' container: '{container}' tag: '{tag}' - functest-kubernetes-params: &functest-kubernetes-params name: 'functest-kubernetes-params' repo: 'opnfv' port: tag: - latest: from: build_args: branch: master slave: lf-virtual1-8 dependency: 3.14 - v1.24: dependency: latest from: build_args: branch: stable/v1.24 slave: lf-virtual1-9 - v1.23: from: build_args: branch: stable/v1.23 slave: lf-virtual1-9 dependency: 3.14 - v1.22: from: build_args: branch: stable/v1.22 slave: lf-virtual1-7 dependency: 3.14 - v1.21: from: build_args: branch: stable/v1.21 slave: lf-virtual1-6 dependency: 3.13 - leguer: from: build_args: branch: stable/leguer slave: lf-virtual1-5 dependency: 3.12 - kali: from: build_args: branch: stable/kali slave: lf-virtual1-4 dependency: 3.11 - functest-kubernetes-jobs: &functest-kubernetes-jobs name: 'functest-kubernetes-jobs' current-parameters: true - parameter: name: functest-kubernetes-slave parameters: - label: name: slave default: '{slave}' - parameter: name: functest-kubernetes-build_tag parameters: - random-string: name: build_tag - parameter: name: functest-kubernetes-DEPLOY_SCENARIO parameters: - string: name: DEPLOY_SCENARIO default: k8-nosdn-nofeature-noha - parameter: name: functest-kubernetes-E2E_TEST_OPTS parameters: - string: name: E2E_TEST_OPTS default: container-runtime:containerd - functest-kubernetes-run-containers: &functest-kubernetes-run-containers name: 'functest-kubernetes-run-containers' <<: *functest-kubernetes-containers test: '{test}' privileged: '{privileged}' volumes: '{volumes}' env: '{env}' network: '{network}' uid: '{uid}' gid: '{gid}' published_ports: '{published_ports}' - builder: name: functest-kubernetes-pull-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 docker pull $image - builder: name: functest-kubernetes-run-containers builders: - shell: | set +x volumes=; if [ "{volumes}" != "None" ]; then for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \ do volumes="-v $i $volumes"; done fi env=; if [ "{env}" != "None" ]; then for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \ do env="-e $i $env"; done fi published_ports=; if [ "{published_ports}" != "None" ]; then for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \ do published_ports="-p $i $published_ports"; done fi [ ! -z "$WORKSPACE" ] && rm -rf $WORKSPACE/results || true if [ "{repo}" = "_" ]; then image={container}:{tag} elif [ "{port}" = "None" ]; then image={repo}/{container}:{tag} else image={repo}:{port}/{container}:{tag} fi mkdir -p $WORKSPACE/results chown {uid}:{gid} $WORKSPACE/results docker run --rm \ --privileged={privileged} \ --network={network} \ $volumes \ $env \ $published_ports \ -e S3_ENDPOINT_URL=https://storage.googleapis.com \ -e S3_DST_URL=s3://artifacts.opnfv.org/functest-kubernetes/$BUILD_TAG/$JOB_NAME-$BUILD_ID \ -e HTTP_DST_URL=http://artifacts.opnfv.org/functest-kubernetes/$BUILD_TAG/$JOB_NAME-$BUILD_ID \ -v /home/opnfv/functest-kubernetes/.boto:/etc/boto.cfg \ -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \ -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \ -e NODE_NAME=$slave \ -e BUILD_TAG=$BUILD_TAG \ -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \ $image run_tests -t {test} -p -r - builder: name: functest-kubernetes-remove-images 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 docker rmi $image || true - job-template: name: 'functest-kubernetes-{repo}-{container}-{tag}-pull' parameters: - functest-kubernetes-slave: slave: '{slave}' builders: - functest-kubernetes-pull-containers: <<: *functest-kubernetes-containers - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-pull' <<: *functest-kubernetes-params container: 'functest-kubernetes-healthcheck' jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-pull' - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-pull' <<: *functest-kubernetes-params container: 'functest-kubernetes-smoke' jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-pull' - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-security-pull' <<: *functest-kubernetes-params container: 'functest-kubernetes-security' jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-pull' - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-pull' <<: *functest-kubernetes-params container: 'functest-kubernetes-benchmarking' jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-pull' - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-pull' <<: *functest-kubernetes-params container: 'functest-kubernetes-cnf' jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-pull' - job-template: name: 'functest-kubernetes-{repo}-{container}-{tag}-rmi' parameters: - functest-kubernetes-slave: slave: '{slave}' builders: - functest-kubernetes-remove-images: <<: *functest-kubernetes-containers - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-rmi' <<: *functest-kubernetes-params container: 'functest-kubernetes-healthcheck' jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-rmi' - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-rmi' <<: *functest-kubernetes-params container: 'functest-kubernetes-smoke' jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-rmi' - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-security-rmi' <<: *functest-kubernetes-params container: 'functest-kubernetes-security' jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-rmi' - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-rmi' <<: *functest-kubernetes-params container: 'functest-kubernetes-benchmarking' jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-rmi' - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-rmi' <<: *functest-kubernetes-params container: 'functest-kubernetes-cnf' jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-rmi' - job-template: name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-{tag}-{test}-run' parameters: - functest-kubernetes-slave: slave: '{slave}' - functest-kubernetes-build_tag: build_tag: '' - functest-kubernetes-DEPLOY_SCENARIO: DEPLOY_SCENARIO: k8-nosdn-nofeature-noha - functest-kubernetes-E2E_TEST_OPTS: E2E_TEST_OPTS: container-runtime:containerd builders: - functest-kubernetes-run-containers: <<: *functest-kubernetes-run-containers - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck' <<: *functest-kubernetes-params volumes: - /home/opnfv/functest-kubernetes/config.{tag}:/root/.kube/config env: - DEPLOY_SCENARIO=$DEPLOY_SCENARIO - E2E_TEST_OPTS=$E2E_TEST_OPTS published_ports: container: 'functest-kubernetes-healthcheck' test: - k8s_quick - k8s_smoke privileged: 'false' network: bridge uid: 1000 gid: 1000 jobs: - 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-{tag}-{test}-run' - job-template: name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-{test}-run' parameters: - functest-kubernetes-slave: slave: '{slave}' - functest-kubernetes-build_tag: build_tag: '' - functest-kubernetes-DEPLOY_SCENARIO: DEPLOY_SCENARIO: k8-nosdn-nofeature-noha - functest-kubernetes-E2E_TEST_OPTS: E2E_TEST_OPTS: container-runtime:containerd builders: - functest-kubernetes-run-containers: <<: *functest-kubernetes-run-containers - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke' <<: *functest-kubernetes-params volumes: - /home/opnfv/functest-kubernetes/config.{tag}:/root/.kube/config env: - DEPLOY_SCENARIO=$DEPLOY_SCENARIO - E2E_TEST_OPTS=$E2E_TEST_OPTS published_ports: container: 'functest-kubernetes-smoke' test: - xrally_kubernetes - k8s_io - k8s_conformance - k8s_conformance_serial - sig_api_machinery - sig_api_machinery_serial - sig_apps - sig_apps_serial - sig_auth - sig_cluster_lifecycle - sig_instrumentation - sig_network - sig_node - sig_scheduling_serial - sig_storage - sig_storage_serial privileged: 'false' network: bridge uid: 1000 gid: 1000 exclude: - tag: latest test: k8s_io - tag: v1.24 test: k8s_io - tag: v1.23 test: k8s_io - tag: v1.22 test: k8s_io - tag: v1.21 test: k8s_io jobs: - 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-{test}-run' - job-template: name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-{test}-run' parameters: - functest-kubernetes-slave: slave: '{slave}' - functest-kubernetes-build_tag: build_tag: '' - functest-kubernetes-DEPLOY_SCENARIO: DEPLOY_SCENARIO: k8-nosdn-nofeature-noha - functest-kubernetes-E2E_TEST_OPTS: E2E_TEST_OPTS: container-runtime:containerd builders: - functest-kubernetes-run-containers: <<: *functest-kubernetes-run-containers - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-security' <<: *functest-kubernetes-params volumes: - /home/opnfv/functest-kubernetes/config.{tag}:/root/.kube/config env: - DEPLOY_SCENARIO=$DEPLOY_SCENARIO - E2E_TEST_OPTS=$E2E_TEST_OPTS published_ports: container: 'functest-kubernetes-security' test: - kube_hunter - kube_bench_master - kube_bench_node privileged: 'false' network: bridge uid: 1000 gid: 1000 jobs: - 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-{test}-run' - job-template: name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-{tag}-{test}-run' parameters: - functest-kubernetes-slave: slave: '{slave}' - functest-kubernetes-build_tag: build_tag: '' - functest-kubernetes-DEPLOY_SCENARIO: DEPLOY_SCENARIO: k8-nosdn-nofeature-noha - functest-kubernetes-E2E_TEST_OPTS: E2E_TEST_OPTS: container-runtime:containerd builders: - functest-kubernetes-run-containers: <<: *functest-kubernetes-run-containers - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking' <<: *functest-kubernetes-params volumes: - /home/opnfv/functest-kubernetes/config.{tag}:/root/.kube/config env: - DEPLOY_SCENARIO=$DEPLOY_SCENARIO - E2E_TEST_OPTS=$E2E_TEST_OPTS published_ports: container: 'functest-kubernetes-benchmarking' test: - xrally_kubernetes_full - netperf privileged: 'false' network: bridge uid: 1000 gid: 1000 jobs: - 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-{tag}-{test}-run' - job-template: name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-{test}-run' parameters: - functest-kubernetes-slave: slave: '{slave}' - functest-kubernetes-build_tag: build_tag: '' - functest-kubernetes-DEPLOY_SCENARIO: DEPLOY_SCENARIO: k8-nosdn-nofeature-noha - functest-kubernetes-E2E_TEST_OPTS: E2E_TEST_OPTS: container-runtime:containerd builders: - functest-kubernetes-run-containers: <<: *functest-kubernetes-run-containers - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf' <<: *functest-kubernetes-params volumes: - /home/opnfv/functest-kubernetes/config.{tag}:/root/.kube/config env: - DEPLOY_SCENARIO=$DEPLOY_SCENARIO - E2E_TEST_OPTS=$E2E_TEST_OPTS published_ports: container: 'functest-kubernetes-cnf' test: - k8s_vims - helm_vims - cnf_testsuite privileged: 'false' network: bridge uid: 1000 gid: 1000 jobs: - 'functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-{test}-run' - builder: name: functest-kubernetes-zip builders: - shell: | set +x volumes=; if [ "{volumes}" != "None" ]; then for i in $(echo {volumes} | tr -d '[]' |sed "s/, / /g" ); \ do volumes="-v $i $volumes"; done fi env=; if [ "{env}" != "None" ]; then for i in $(eval echo {env} | tr -d '[]' |sed "s/, / /g" ); \ do env="-e $i $env"; done fi published_ports=; if [ "{published_ports}" != "None" ]; then for i in $(echo {published_ports} | tr -d '[]' |sed "s/, / /g" ); \ do published_ports="-p $i $published_ports"; done fi [ ! -z "$WORKSPACE" ] && rm -rf $WORKSPACE/results || true if [ "{repo}" = "_" ]; then image={container}:{tag} elif [ "{port}" = "None" ]; then image={repo}/{container}:{tag} else image={repo}:{port}/{container}:{tag} fi mkdir -p $WORKSPACE/results chown {uid}:{gid} $WORKSPACE/results docker run --rm \ $volumes \ $env \ $published_ports \ -e S3_ENDPOINT_URL=https://storage.googleapis.com \ -e S3_DST_URL=s3://artifacts.opnfv.org/functest-kubernetes \ -e HTTP_DST_URL=http://artifacts.opnfv.org/functest-kubernetes \ -v /home/opnfv/functest-kubernetes/.boto:/etc/boto.cfg \ -e TEST_DB_URL=http://testresults.opnfv.org/test/api/v1/results \ -e TEST_DB_EXT_URL=http://testresults.opnfv.org/test/api/v1/results \ -e BUILD_TAG=$BUILD_TAG \ -v $WORKSPACE/../$JOB_NAME/results:/var/lib/xtesting/results \ $image zip_campaign - job-template: name: 'functest-kubernetes-{tag}-zip' parameters: - functest-kubernetes-slave: slave: '{slave}' - functest-kubernetes-build_tag: build_tag: '' - functest-kubernetes-DEPLOY_SCENARIO: DEPLOY_SCENARIO: k8-nosdn-nofeature-noha - functest-kubernetes-E2E_TEST_OPTS: E2E_TEST_OPTS: container-runtime:containerd builders: - functest-kubernetes-zip: <<: *functest-kubernetes-containers volumes: '{volumes}' env: '{env}' uid: '{uid}' gid: '{gid}' published_ports: '{published_ports}' - project: name: 'functest-kubernetes-{tag}-zip' <<: *functest-kubernetes-params volumes: - /home/opnfv/functest-kubernetes/config.{tag}:/root/.kube/config env: - DEPLOY_SCENARIO=$DEPLOY_SCENARIO - E2E_TEST_OPTS=$E2E_TEST_OPTS published_ports: container: 'functest-kubernetes-healthcheck' uid: 1000 gid: 1000 jobs: - 'functest-kubernetes-{tag}-zip' - job-template: name: 'functest-kubernetes-{tag}-daily' project-type: multijob triggers: - timed: '@weekly' parameters: - functest-kubernetes-slave: slave: '{slave}' - functest-kubernetes-build_tag: build_tag: '' - functest-kubernetes-DEPLOY_SCENARIO: DEPLOY_SCENARIO: k8-nosdn-nofeature-noha - functest-kubernetes-E2E_TEST_OPTS: E2E_TEST_OPTS: container-runtime:containerd # PyYAML and yamllint differ here # see https://github.com/yaml/pyyaml/issues/234 # yamllint disable rule:indentation properties: - build-blocker: blocking-jobs: - ^functest-kubernetes-(pi-)*{tag}-(daily|docker|review)$ # yamllint enable rule:indentation builders: - multijob: name: remove former images projects: - name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-{tag}-rmi' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-rmi' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-rmi' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-{tag}-rmi' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-rmi' <<: *functest-kubernetes-jobs - multijob: name: pull containers projects: - name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-{tag}-pull' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-pull' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-pull' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-{tag}-pull' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-pull' <<: *functest-kubernetes-jobs - multijob: name: opnfv/functest-kubernetes-healthcheck:{tag} projects: - name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-{tag}-k8s_quick-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-{tag}-k8s_smoke-run' <<: *functest-kubernetes-jobs - multijob: name: opnfv/functest-kubernetes-smoke:{tag} execution-type: SEQUENTIALLY projects: - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-xrally_kubernetes-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-k8s_io-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-k8s_conformance-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-k8s_conformance_serial-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_api_machinery-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_api_machinery_serial-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_apps-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_apps_serial-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_auth-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_cluster_lifecycle-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_instrumentation-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_network-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_node-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_scheduling_serial-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_storage-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_storage_serial-run' <<: *functest-kubernetes-jobs - multijob: name: opnfv/functest-kubernetes-security:{tag} projects: - name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-kube_hunter-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-kube_bench_master-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-kube_bench_node-run' <<: *functest-kubernetes-jobs - multijob: name: opnfv/functest-kubernetes-benchmarking:{tag} projects: - name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-{tag}-xrally_kubernetes_full-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-{tag}-netperf-run' <<: *functest-kubernetes-jobs - multijob: name: opnfv/functest-kubernetes-cnf:{tag} projects: - name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-k8s_vims-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-helm_vims-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-cnf_testsuite-run' <<: *functest-kubernetes-jobs - multijob: name: dump all campaign data projects: - name: 'functest-kubernetes-{tag}-zip' <<: *functest-kubernetes-jobs publishers: - email-ext: failure: false first-failure: true fixed: true recipients: cedric.ollivier@orange.com - project: name: 'functest-kubernetes-daily' <<: *functest-kubernetes-params jobs: - 'functest-kubernetes-{tag}-daily' - view: name: functest-kubernetes view-type: list columns: - status - weather - job - last-success - last-failure - last-duration regex: ^functest-kubernetes-[a-z0-9.]+-daily$ - functest-kubernetes-build-containers: &functest-kubernetes-build-containers name: 'functest-kubernetes-build-containers' <<: *functest-kubernetes-containers ref_arg: '{ref_arg}' path: '{path}' build_args: '{build_args}' from: '{from}' - builder: name: functest-kubernetes-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 [ "{build_args}" != "None" ]; then for i in $(echo {build_args} | tr -d '[]' |sed "s/, / /g" ); \ do build_args="--build-arg $i $build_args"; done 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 docker build $build_args \ --pull=false --no-cache --force-rm=true \ -t $image . - scm: name: functest-kubernetes-scm scm: - git: url: 'https://gerrit.opnfv.org/gerrit/functest-kubernetes' refspec: '+refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*' branches: - '{ref}' - functest-kubernetes-dep: &functest-kubernetes-dep name: 'functest-kubernetes-containers' repo: '{repo}' port: '{port}' tag: '{tag}' dependency: '{dependency}' - builder: name: functest-kubernetes-pull-dep-images builders: - shell: | set +x if [ "_" = "_" ]; then image=alpine:{dependency} elif [ "None" = "None" ]; then image=_/alpine:{dependency} else image=_:/alpine:{dependency} fi docker pull $image || true - builder: name: functest-kubernetes-remove-dep-images builders: - shell: | set +x if [ "_" = "_" ]; then image=alpine:{dependency} elif [ "" = "None" ]; then image=_/alpine:{dependency} else image=_:/alpine:{dependency} fi docker rmi $image || true - job-template: name: 'functest-kubernetes-{repo}-{tag}-dep-pull' parameters: - functest-kubernetes-slave: slave: '{slave}' builders: - functest-kubernetes-pull-dep-images: <<: *functest-kubernetes-dep - project: name: 'functest-kubernetes-{repo}-{tag}-dep-pull' <<: *functest-kubernetes-params jobs: - 'functest-kubernetes-{repo}-{tag}-dep-pull' - job-template: name: 'functest-kubernetes-{repo}-{tag}-dep-rmi' parameters: - functest-kubernetes-slave: slave: '{slave}' builders: - functest-kubernetes-remove-dep-images: <<: *functest-kubernetes-dep - project: name: 'functest-kubernetes-{repo}-{tag}-dep-rmi' <<: *functest-kubernetes-params jobs: - 'functest-kubernetes-{repo}-{tag}-dep-rmi' - builder: name: functest-kubernetes-tox builders: - shell: | set +x apt-get -o DPkg::Lock::Timeout=300 update && \ DEBIAN_FRONTEND=noninteractive apt-get \ -o DPkg::Lock::Timeout=300 dist-upgrade -y DEBIAN_FRONTEND=noninteractive \ apt-get -o DPkg::Lock::Timeout=300 install software-properties-common gpg -y add-apt-repository -y ppa:deadsnakes/ppa apt-get -o DPkg::Lock::Timeout=300 update && \ DEBIAN_FRONTEND=noninteractive apt-get \ -o DPkg::Lock::Timeout=300 install \ python3.9 python3.9-dev python3.9-distutils \ 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 pip3 install tox tox-pip-version tox - job-template: name: 'functest-kubernetes-{tag}-tox' scm: - functest-kubernetes-scm: ref: $GERRIT_REFSPEC triggers: - functest-kubernetes-patchset-created: branch: '{branch}' parameters: - functest-kubernetes-slave: slave: '{slave}' builders: - functest-kubernetes-tox: - project: name: functest-kubernetes-tox <<: *functest-kubernetes-params jobs: - 'functest-kubernetes-{tag}-tox' - job-template: name: 'functest-kubernetes-{repo}-{container}-{tag}-gate' parameters: - functest-kubernetes-slave: slave: '{slave}' scm: - functest-kubernetes-scm: ref: $GERRIT_REFSPEC builders: - functest-kubernetes-build-containers: <<: *functest-kubernetes-build-containers ref: $GERRIT_REFSPEC build_args: '{build_args}' - project: name: functest-kubernetes-opnfv-functest-kubernetes-core-{tag}-gate <<: *functest-kubernetes-params container: functest-kubernetes-core ref_arg: BRANCH path: docker/core jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-gate' - project: name: functest-kubernetes-opnfv-functest-kubernetes-healthcheck-{tag}-gate <<: *functest-kubernetes-params container: functest-kubernetes-healthcheck ref_arg: path: docker/healthcheck jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-gate' - project: name: functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-gate <<: *functest-kubernetes-params container: functest-kubernetes-cnf ref_arg: BRANCH path: docker/cnf jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-gate' - project: name: functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-gate <<: *functest-kubernetes-params container: functest-kubernetes-security ref_arg: BRANCH path: docker/security jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-gate' - project: name: functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-gate <<: *functest-kubernetes-params container: functest-kubernetes-smoke ref_arg: path: docker/smoke jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-gate' - project: name: functest-kubernetes-opnfv-functest-kubernetes-benchmarking-{tag}-gate <<: *functest-kubernetes-params container: functest-kubernetes-benchmarking ref_arg: path: docker/benchmarking jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-gate' - trigger: name: functest-kubernetes-patchset-created triggers: - gerrit: trigger-on: - patchset-created-event - comment-added-contains-event: comment-contains-value: 'recheck' - comment-added-contains-event: comment-contains-value: 'reverify' projects: - project-compare-type: 'ANT' project-pattern: 'functest-kubernetes' branches: - branch-compare-type: 'ANT' branch-pattern: '**/{branch}' - job-template: name: 'functest-kubernetes-{tag}-review' project-type: multijob triggers: - functest-kubernetes-patchset-created: branch: '{branch}' parameters: - functest-kubernetes-slave: slave: '{slave}' - functest-kubernetes-build_tag: build_tag: '' - functest-kubernetes-DEPLOY_SCENARIO: DEPLOY_SCENARIO: k8-nosdn-nofeature-noha - functest-kubernetes-E2E_TEST_OPTS: E2E_TEST_OPTS: container-runtime:containerd # PyYAML and yamllint differ here # see https://github.com/yaml/pyyaml/issues/234 # yamllint disable rule:indentation properties: - build-blocker: blocking-jobs: - ^functest-kubernetes-(pi-)*{tag}-(daily|docker|review)$ # yamllint enable rule:indentation builders: - multijob: name: remove former images projects: - name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-{tag}-rmi' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-rmi' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-rmi' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-{tag}-rmi' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-rmi' <<: *functest-kubernetes-jobs - multijob: name: remove dependency projects: - name: 'functest-kubernetes-{repo}-{tag}-dep-rmi' <<: *functest-kubernetes-jobs - multijob: name: pull dependency projects: - name: 'functest-kubernetes-{repo}-{tag}-dep-pull' <<: *functest-kubernetes-jobs - multijob: name: build opnfv/functest-kubernetes-core projects: - name: 'functest-kubernetes-opnfv-functest-kubernetes-core-{tag}-gate' <<: *functest-kubernetes-jobs - multijob: name: build containers projects: - name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-{tag}-gate' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-gate' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-gate' <<: *functest-kubernetes-jobs - multijob: name: build opnfv/functest-kubernetes-smoke projects: - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-gate' <<: *functest-kubernetes-jobs - multijob: name: build opnfv/functest-kubernetes-benchmarking projects: - name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-{tag}-gate' <<: *functest-kubernetes-jobs - multijob: name: opnfv/functest-kubernetes-healthcheck:{tag} projects: - name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-{tag}-k8s_quick-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-{tag}-k8s_smoke-run' <<: *functest-kubernetes-jobs - multijob: name: opnfv/functest-kubernetes-smoke:{tag} execution-type: SEQUENTIALLY projects: - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-xrally_kubernetes-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-k8s_io-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-k8s_conformance-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-k8s_conformance_serial-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_api_machinery-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_api_machinery_serial-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_apps-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_apps_serial-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_auth-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_cluster_lifecycle-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_instrumentation-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_network-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_node-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_scheduling_serial-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_storage-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-sig_storage_serial-run' <<: *functest-kubernetes-jobs - multijob: name: opnfv/functest-kubernetes-security:{tag} projects: - name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-kube_hunter-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-kube_bench_master-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-kube_bench_node-run' <<: *functest-kubernetes-jobs - multijob: name: opnfv/functest-kubernetes-benchmarking:{tag} projects: - name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-{tag}-xrally_kubernetes_full-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-{tag}-netperf-run' <<: *functest-kubernetes-jobs - multijob: name: opnfv/functest-kubernetes-cnf:{tag} projects: - name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-k8s_vims-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-helm_vims-run' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-cnf_testsuite-run' <<: *functest-kubernetes-jobs publishers: - email-ext: failure: false first-failure: true fixed: true recipients: cedric.ollivier@orange.com - project: name: 'functest-kubernetes-review' <<: *functest-kubernetes-params jobs: - 'functest-kubernetes-{tag}-review' - view: name: functest-kubernetes-review view-type: list columns: - status - weather - job - last-success - last-failure - last-duration regex: ^functest-kubernetes-[a-z0-9.]+-review$ - view: name: functest-kubernetes-tox view-type: list columns: - status - weather - job - last-success - last-failure - last-duration regex: ^functest-kubernetes-[a-z0-9.]+-tox$ - builder: name: functest-kubernetes-push-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 docker push $image - trigger: name: functest-kubernetes-commit triggers: - pollscm: cron: "*/30 * * * *" - job-template: name: 'functest-kubernetes-{repo}-{container}-{tag}-build' parameters: - functest-kubernetes-slave: slave: '{slave}' scm: - functest-kubernetes-scm: ref: '{branch}' builders: - functest-kubernetes-build-containers: <<: *functest-kubernetes-build-containers ref: '{branch}' build_args: '{build_args}' - functest-kubernetes-push-containers: <<: *functest-kubernetes-build-containers ref: '{branch}' - project: name: functest-kubernetes-opnfv-functest-kubernetes-core-{tag}-build <<: *functest-kubernetes-params container: functest-kubernetes-core ref_arg: BRANCH path: docker/core jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-build' - project: name: functest-kubernetes-opnfv-functest-kubernetes-healthcheck-{tag}-build <<: *functest-kubernetes-params container: functest-kubernetes-healthcheck ref_arg: path: docker/healthcheck jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-build' - project: name: functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-build <<: *functest-kubernetes-params container: functest-kubernetes-cnf ref_arg: BRANCH path: docker/cnf jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-build' - project: name: functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-build <<: *functest-kubernetes-params container: functest-kubernetes-security ref_arg: BRANCH path: docker/security jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-build' - project: name: functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-build <<: *functest-kubernetes-params container: functest-kubernetes-smoke ref_arg: path: docker/smoke jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-build' - project: name: functest-kubernetes-opnfv-functest-kubernetes-benchmarking-{tag}-build <<: *functest-kubernetes-params container: functest-kubernetes-benchmarking ref_arg: path: docker/benchmarking jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-build' - job-template: name: 'functest-kubernetes-{tag}-docker' project-type: multijob triggers: - functest-kubernetes-commit scm: - functest-kubernetes-scm: ref: '{branch}' parameters: - functest-kubernetes-slave: slave: '{slave}' # PyYAML and yamllint differ here # see https://github.com/yaml/pyyaml/issues/234 # yamllint disable rule:indentation properties: - build-blocker: blocking-jobs: - ^functest-kubernetes-(pi-)*{tag}-(daily|docker|review)$ # yamllint enable rule:indentation builders: - multijob: name: remove dependency projects: - name: 'functest-kubernetes-{repo}-{tag}-dep-rmi' <<: *functest-kubernetes-jobs - multijob: name: pull dependency projects: - name: 'functest-kubernetes-{repo}-{tag}-dep-pull' <<: *functest-kubernetes-jobs - multijob: name: build opnfv/functest-kubernetes-core projects: - name: 'functest-kubernetes-opnfv-functest-kubernetes-core-{tag}-build' <<: *functest-kubernetes-jobs - multijob: name: build containers projects: - name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-{tag}-build' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-{tag}-build' <<: *functest-kubernetes-jobs - name: 'functest-kubernetes-opnfv-functest-kubernetes-security-{tag}-build' <<: *functest-kubernetes-jobs - multijob: name: build opnfv/functest-kubernetes-smoke projects: - name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-{tag}-build' <<: *functest-kubernetes-jobs - multijob: name: build opnfv/functest-kubernetes-benchmarking projects: - name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-{tag}-build' <<: *functest-kubernetes-jobs publishers: - email-ext: failure: false first-failure: true fixed: true recipients: cedric.ollivier@orange.com - builder: name: functest-kubernetes-trivy builders: - shell: | apt-get -o DPkg::Lock::Timeout=300 update && \ DEBIAN_FRONTEND=noninteractive apt-get \ -o DPkg::Lock::Timeout=300 install curl -y curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b . if [ "{repo}" = "_" ]; then image={container}:{tag} elif [ "{port}" = "None" ]; then image={repo}/{container}:{tag} else image={repo}:{port}/{container}:{tag} fi ./trivy image --exit-code 1 $image - job-template: name: 'functest-kubernetes-{repo}-{container}-{tag}-trivy' triggers: - timed: '@weekly' parameters: - functest-kubernetes-slave: slave: '{slave}' builders: - functest-kubernetes-trivy: <<: *functest-kubernetes-containers publishers: - email-ext: failure: false first-failure: true fixed: true recipients: cedric.ollivier@orange.com - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-core-trivy' <<: *functest-kubernetes-params container: 'functest-kubernetes-core' jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-trivy' - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-trivy' <<: *functest-kubernetes-params container: 'functest-kubernetes-healthcheck' jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-trivy' - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-trivy' <<: *functest-kubernetes-params container: 'functest-kubernetes-cnf' jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-trivy' - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-security-trivy' <<: *functest-kubernetes-params container: 'functest-kubernetes-security' jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-trivy' - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-trivy' <<: *functest-kubernetes-params container: 'functest-kubernetes-smoke' jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-trivy' - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-trivy' <<: *functest-kubernetes-params container: 'functest-kubernetes-benchmarking' jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-trivy' - builder: name: functest-kubernetes-grype builders: - shell: | apt-get -o DPkg::Lock::Timeout=300 update && \ DEBIAN_FRONTEND=noninteractive apt-get \ -o DPkg::Lock::Timeout=300 install curl -y curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b . if [ "{repo}" = "_" ]; then image={container}:{tag} elif [ "{port}" = "None" ]; then image={repo}/{container}:{tag} else image={repo}:{port}/{container}:{tag} fi ./grype -q $image - job-template: name: 'functest-kubernetes-{repo}-{container}-{tag}-grype' triggers: - timed: '@weekly' parameters: - functest-kubernetes-slave: slave: '{slave}' builders: - functest-kubernetes-grype: <<: *functest-kubernetes-containers publishers: - email-ext: failure: false first-failure: true fixed: true recipients: cedric.ollivier@orange.com - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-core-grype' <<: *functest-kubernetes-params container: 'functest-kubernetes-core' jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-grype' - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-healthcheck-grype' <<: *functest-kubernetes-params container: 'functest-kubernetes-healthcheck' jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-grype' - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-cnf-grype' <<: *functest-kubernetes-params container: 'functest-kubernetes-cnf' jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-grype' - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-security-grype' <<: *functest-kubernetes-params container: 'functest-kubernetes-security' jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-grype' - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-smoke-grype' <<: *functest-kubernetes-params container: 'functest-kubernetes-smoke' jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-grype' - project: name: 'functest-kubernetes-opnfv-functest-kubernetes-benchmarking-grype' <<: *functest-kubernetes-params container: 'functest-kubernetes-benchmarking' jobs: - 'functest-kubernetes-{repo}-{container}-{tag}-grype' - project: name: 'functest-kubernetes' <<: *functest-kubernetes-params jobs: - 'functest-kubernetes-{tag}-docker' - view: name: functest-kubernetes-docker view-type: list columns: - status - weather - job - last-success - last-failure - last-duration regex: ^functest-kubernetes-[a-z0-9.]+-docker$ - view: name: functest-kubernetes-trivy view-type: list columns: - status - weather - job - last-success - last-failure - last-duration regex: (?!functest-kubernetes-pi)(?!functest-kubernetes-ng)^functest-kubernetes-[a-z-0-9.]+-trivy$ - view: name: functest-kubernetes-grype view-type: list columns: - status - weather - job - last-success - last-failure - last-duration regex: (?!functest-kubernetes-pi)(?!functest-kubernetes-ng)^functest-kubernetes-[a-z-0-9.]+-grype$