diff options
Diffstat (limited to 'jjb/functest/functest-kubernetes-ng.yaml')
-rw-r--r-- | jjb/functest/functest-kubernetes-ng.yaml | 381 |
1 files changed, 381 insertions, 0 deletions
diff --git a/jjb/functest/functest-kubernetes-ng.yaml b/jjb/functest/functest-kubernetes-ng.yaml new file mode 100644 index 000000000..7946f4300 --- /dev/null +++ b/jjb/functest/functest-kubernetes-ng.yaml @@ -0,0 +1,381 @@ +--- +- functest-kubernetes-ng-containers: &functest-kubernetes-ng-containers + name: 'functest-kubernetes-ng-containers' + repo: '{repo}' + port: '{port}' + container: '{container}' + tag: '{tag}' + +- functest-kubernetes-ng-params: &functest-kubernetes-ng-params + name: 'functest-kubernetes-ng-params' + repo: 'opnfv' + port: + tag: + - v1.20: + branch: stable/leguer + slave: lf-virtual1 + dependency: 3.12 + docker_args: [{'K8S_TAG': '1.20'}] + - v1.19: + branch: stable/kali + slave: lf-virtual1 + dependency: 3.11 + docker_args: [] + - v1.18: + branch: stable/kali + slave: lf-virtual1 + dependency: 3.11 + docker_args: [{'K8S_TAG': '1.18'}] + - v1.17: + branch: stable/jerma + slave: lf-virtual1 + dependency: 3.10 + docker_args: [] + - v1.16: + branch: stable/jerma + slave: lf-virtual1 + dependency: 3.10 + docker_args: [{'K8S_TAG': '1.16'}] + - v1.15: + branch: stable/iruya + slave: lf-virtual1 + dependency: 3.10 + docker_args: [] + - v1.14: + branch: stable/iruya + slave: lf-virtual1 + dependency: 3.10 + docker_args: [{'K8S_TAG': '1.14'}] + - v1.13: + branch: stable/hunter + slave: lf-virtual1 + dependency: 3.9 + docker_args: [] + +- functest-kubernetes-ng-jobs: &functest-kubernetes-ng-jobs + name: 'functest-kubernetes-ng-jobs' + current-parameters: true + +- parameter: + name: functest-kubernetes-ng-slave + parameters: + - label: + name: slave + default: '{slave}' + + +- functest-kubernetes-ng-build-containers: &functest-kubernetes-ng-build-containers + name: 'functest-kubernetes-ng-build-containers' + <<: *functest-kubernetes-ng-containers + ref_arg: '{ref_arg}' + path: '{path}' + +- builder: + name: functest-kubernetes-ng-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-kubernetes-ng-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-ng-dep: &functest-kubernetes-ng-dep + name: 'functest-kubernetes-ng-containers' + repo: '{repo}' + port: '{port}' + tag: '{tag}' + dependency: '{dependency}' + +- builder: + name: functest-kubernetes-ng-pull-dep-images + builders: + - shell: | + set +x + if [ "_" = "_" ]; then + image=alpine:{dependency} + elif [ "_" = "None" ]; then + image=_/alpine:{dependency} + else + image=_:/alpine{dependency} + fi + sudo docker pull $image || true + +- builder: + name: functest-kubernetes-ng-remove-dep-images + builders: + - shell: | + set +x + if [ "_" = "_" ]; then + image=alpine:{dependency} + elif [ "_" = "None" ]; then + image=_/alpine:{dependency} + else + image=_:/alpine{dependency} + fi + sudo docker rmi $image || true + +- job-template: + name: 'functest-kubernetes-ng-{repo}-{tag}-dep-pull' + parameters: + - functest-kubernetes-ng-slave: + slave: '{slave}' + builders: + - functest-kubernetes-ng-pull-dep-images: + <<: *functest-kubernetes-ng-dep + +- project: + name: 'functest-kubernetes-ng-{repo}-{tag}-dep-pull' + <<: *functest-kubernetes-ng-params + jobs: + - 'functest-kubernetes-ng-{repo}-{tag}-dep-pull' + +- job-template: + name: 'functest-kubernetes-ng-{repo}-{tag}-dep-rmi' + parameters: + - functest-kubernetes-ng-slave: + slave: '{slave}' + builders: + - functest-kubernetes-ng-remove-dep-images: + <<: *functest-kubernetes-ng-dep + +- project: + name: 'functest-kubernetes-ng-{repo}-{tag}-dep-rmi' + <<: *functest-kubernetes-ng-params + jobs: + - 'functest-kubernetes-ng-{repo}-{tag}-dep-rmi' + + +- builder: + name: functest-kubernetes-ng-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 + sudo docker push $image + +- trigger: + name: functest-kubernetes-ng-commit + triggers: + - pollscm: + cron: "*/30 * * * *" + +- job-template: + name: 'functest-kubernetes-ng-{repo}-{container}-{tag}-build' + parameters: + - functest-kubernetes-ng-slave: + slave: '{slave}' + scm: + - functest-kubernetes-ng-scm: + ref: '{branch}' + builders: + - functest-kubernetes-ng-build-containers: + <<: *functest-kubernetes-ng-build-containers + ref: '{branch}' + - functest-kubernetes-ng-push-containers: + <<: *functest-kubernetes-ng-build-containers + ref: '{branch}' + +- project: + name: functest-kubernetes-ng-opnfv-functest-kubernetes-core-{tag}-build + <<: *functest-kubernetes-ng-params + container: functest-kubernetes-core + ref_arg: BRANCH + path: docker/core + jobs: + - 'functest-kubernetes-ng-{repo}-{container}-{tag}-build' + +- project: + name: functest-kubernetes-ng-opnfv-functest-kubernetes-healthcheck-{tag}-build + <<: *functest-kubernetes-ng-params + container: functest-kubernetes-healthcheck + ref_arg: + path: docker/healthcheck + jobs: + - 'functest-kubernetes-ng-{repo}-{container}-{tag}-build' + +- project: + name: functest-kubernetes-ng-opnfv-functest-kubernetes-cnf-{tag}-build + <<: *functest-kubernetes-ng-params + container: functest-kubernetes-cnf + ref_arg: BRANCH + path: docker/cnf + jobs: + - 'functest-kubernetes-ng-{repo}-{container}-{tag}-build' + +- project: + name: functest-kubernetes-ng-opnfv-functest-kubernetes-security-{tag}-build + <<: *functest-kubernetes-ng-params + container: functest-kubernetes-security + ref_arg: BRANCH + path: docker/security + jobs: + - 'functest-kubernetes-ng-{repo}-{container}-{tag}-build' + +- project: + name: functest-kubernetes-ng-opnfv-functest-kubernetes-smoke-{tag}-build + <<: *functest-kubernetes-ng-params + container: functest-kubernetes-smoke + ref_arg: + path: docker/smoke + jobs: + - 'functest-kubernetes-ng-{repo}-{container}-{tag}-build' + +- project: + name: functest-kubernetes-ng-opnfv-functest-kubernetes-benchmarking-{tag}-build + <<: *functest-kubernetes-ng-params + container: functest-kubernetes-benchmarking + ref_arg: + path: docker/benchmarking + jobs: + - 'functest-kubernetes-ng-{repo}-{container}-{tag}-build' + + +- job-template: + name: 'functest-kubernetes-ng-{tag}-docker' + project-type: multijob + triggers: + - functest-kubernetes-ng-commit + scm: + - functest-kubernetes-ng-scm: + ref: '{branch}' + parameters: + - functest-kubernetes-ng-slave: + slave: '{slave}' + properties: + - build-blocker: + use-build-blocker: true + blocking-level: 'NODE' + blocking-jobs: + - '^functest-kubernetes-ng-{tag}-(daily|docker|review)$' + builders: + - multijob: + name: remove dependency + projects: + - name: 'functest-kubernetes-ng-{repo}-{tag}-dep-rmi' + <<: *functest-kubernetes-ng-jobs + - multijob: + name: pull dependency + projects: + - name: 'functest-kubernetes-ng-{repo}-{tag}-dep-pull' + <<: *functest-kubernetes-ng-jobs + - multijob: + name: build opnfv/functest-kubernetes-core + projects: + - name: 'functest-kubernetes-ng-opnfv-functest-kubernetes-core-{tag}-build' + <<: *functest-kubernetes-ng-jobs + - multijob: + name: build containers + projects: + - name: 'functest-kubernetes-ng-opnfv-functest-kubernetes-healthcheck-{tag}-build' + <<: *functest-kubernetes-ng-jobs + - name: 'functest-kubernetes-ng-opnfv-functest-kubernetes-cnf-{tag}-build' + <<: *functest-kubernetes-ng-jobs + - name: 'functest-kubernetes-ng-opnfv-functest-kubernetes-security-{tag}-build' + <<: *functest-kubernetes-ng-jobs + - multijob: + name: build opnfv/functest-kubernetes-smoke + projects: + - name: 'functest-kubernetes-ng-opnfv-functest-kubernetes-smoke-{tag}-build' + <<: *functest-kubernetes-ng-jobs + - multijob: + name: build opnfv/functest-kubernetes-benchmarking + projects: + - name: 'functest-kubernetes-ng-opnfv-functest-kubernetes-benchmarking-{tag}-build' + <<: *functest-kubernetes-ng-jobs + +- builder: + name: functest-kubernetes-ng-trivy + builders: + - shell: | + 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} + elif [ "{port}" = "None" ]; then + image={repo}/{container}:{tag} + else + image={repo}:{port}/{container}:{tag} + fi + ./trivy --exit-code 1 $image + +- job-template: + name: 'functest-kubernetes-ng-{repo}-{container}-{tag}-trivy' + triggers: + - timed: '@daily' + parameters: + - functest-kubernetes-ng-slave: + slave: '{slave}' + builders: + - functest-kubernetes-ng-trivy: + <<: *functest-kubernetes-ng-containers + +- project: + name: 'functest-kubernetes-ng-opnfv-xtesting-trivy' + <<: *functest-kubernetes-ng-params + container: 'xtesting' + jobs: + - 'functest-kubernetes-ng-{repo}-{container}-{tag}-trivy' +- project: + name: 'functest-kubernetes-ng-opnfv-xtesting-mts-trivy' + <<: *functest-kubernetes-ng-params + container: 'xtesting-mts' + jobs: + - 'functest-kubernetes-ng-{repo}-{container}-{tag}-trivy' + +- project: + name: 'functest-kubernetes-ng' + <<: *functest-kubernetes-ng-params + jobs: + - 'functest-kubernetes-ng-{tag}-docker' + +- view: + name: functest-kubernetes-ng-docker + view-type: list + columns: + - status + - weather + - job + - last-success + - last-failure + - last-duration + regex: ^functest-kubernetes-ng-[a-z0-9.]+-docker$ + +- view: + name: functest-kubernetes-ng-trivy + view-type: list + columns: + - status + - weather + - job + - last-success + - last-failure + - last-duration + regex: ^functest-kubernetes-ng-[a-z0-9-.]+-trivy$ |