+- 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}'
+ build_args: '{build_args}'
+ 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 [ "{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
+ 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}'
+ port: '{port}'
+ tag: '{tag}'
+ dependency: '{dependency}'
+
+- builder:
+ name: functest-pull-dep-images
+ builders:
+ - shell: |
+ set +x
+ if [ "_" = "_" ]; then
+ image=alpine:{dependency}
+ elif [ "None" = "None" ]; then
+ image=_/alpine:{dependency}
+ else
+ image=_:/alpine:{dependency}
+ fi
+ sudo docker pull $image || true
+
+- builder:
+ name: functest-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-{repo}-{tag}-dep-pull'
+ parameters:
+ - functest-slave:
+ slave: '{slave}'
+ builders:
+ - functest-pull-dep-images:
+ <<: *functest-dep
+
+- project:
+ name: 'functest-{repo}-{tag}-dep-pull'
+ <<: *functest-params
+ jobs:
+ - 'functest-{repo}-{tag}-dep-pull'
+
+- job-template:
+ name: 'functest-{repo}-{tag}-dep-rmi'
+ parameters:
+ - functest-slave:
+ slave: '{slave}'
+ builders:
+ - functest-remove-dep-images:
+ <<: *functest-dep
+
+- project:
+ name: 'functest-{repo}-{tag}-dep-rmi'
+ <<: *functest-params
+ jobs:
+ - 'functest-{repo}-{tag}-dep-rmi'
+
+- builder:
+ name: functest-tox
+ builders:
+ - shell: |
+ set +x
+ sudo apt-get -o DPkg::Lock::Timeout=300 update && \
+ sudo DEBIAN_FRONTEND=noninteractive apt-get \
+ -o DPkg::Lock::Timeout=300 dist-upgrade -y
+ sudo DEBIAN_FRONTEND=noninteractive \
+ apt-get -o DPkg::Lock::Timeout=300 install software-properties-common gpg -y
+ sudo add-apt-repository -y ppa:deadsnakes/ppa
+ sudo apt-get -o DPkg::Lock::Timeout=300 update && \
+ sudo 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
+ sudo pip3 install tox tox-pip-version
+
+ tox
+
+- job-template:
+ name: 'functest-{tag}-tox'
+ scm:
+ - functest-scm:
+ ref: $GERRIT_REFSPEC
+ triggers:
+ - functest-patchset-created:
+ branch: '{branch}'
+ parameters:
+ - functest-slave:
+ slave: '{slave}'
+ builders:
+ - functest-tox:
+
+- project:
+ name: functest-tox
+ <<: *functest-params
+ 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
+ build_args: '{build_args}'
+
+- project:
+ name: functest-opnfv-functest-core-{tag}-gate
+ <<: *functest-params
+ container: functest-core
+ ref_arg: BRANCH
+ path: docker/core
+ jobs: