From 522c6ebb10424381e9c46ba21c38338ceccec658 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Wed, 29 Apr 2020 11:07:06 +0200 Subject: Publish Functest K8s Kali dockers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iaf8840167133917b50668edf8f6f36abaecbac62 Signed-off-by: Cédric Ollivier --- .travis.yml | 20 ++++++++++---------- ansible/site.yml | 3 +++ build.sh | 32 ++++++++++++++++---------------- docker/cnf/Dockerfile | 2 +- docker/core/Dockerfile | 4 ++-- docker/healthcheck/Dockerfile | 2 +- docker/security/Dockerfile | 2 +- docker/smoke/Dockerfile | 2 +- 8 files changed, 35 insertions(+), 32 deletions(-) diff --git a/.travis.yml b/.travis.yml index b2996055..a75441f9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,8 +32,8 @@ jobs: script: > sudo manifest-tool push from-args \ --platforms linux/amd64 \ - --template ${DOCKER_USERNAME}/functest-kubernetes-core:ARCH-latest \ - --target ${DOCKER_USERNAME}/functest-kubernetes-core:latest + --template ${DOCKER_USERNAME}/functest-kubernetes-core:ARCH-kali \ + --target ${DOCKER_USERNAME}/functest-kubernetes-core:kali - stage: build functest-kubernetes-[healthcheck,cnf,security] images script: sudo -E bash build.sh env: @@ -57,19 +57,19 @@ jobs: sudo manifest-tool push from-args \ --platforms linux/amd64 \ --template \ - ${DOCKER_USERNAME}/functest-kubernetes-healthcheck:ARCH-latest \ - --target ${DOCKER_USERNAME}/functest-kubernetes-healthcheck:latest + ${DOCKER_USERNAME}/functest-kubernetes-healthcheck:ARCH-kali \ + --target ${DOCKER_USERNAME}/functest-kubernetes-healthcheck:kali - script: > sudo manifest-tool push from-args \ --platforms linux/amd64 \ - --template ${DOCKER_USERNAME}/functest-kubernetes-cnf:ARCH-latest \ - --target ${DOCKER_USERNAME}/functest-kubernetes-cnf:latest + --template ${DOCKER_USERNAME}/functest-kubernetes-cnf:ARCH-kali \ + --target ${DOCKER_USERNAME}/functest-kubernetes-cnf:kali - script: > sudo manifest-tool push from-args \ --platforms linux/amd64 \ --template \ - ${DOCKER_USERNAME}/functest-kubernetes-security:ARCH-latest \ - --target ${DOCKER_USERNAME}/functest-kubernetes-security:latest + ${DOCKER_USERNAME}/functest-kubernetes-security:ARCH-kali \ + --target ${DOCKER_USERNAME}/functest-kubernetes-security:kali - stage: build functest-kubernetes-smoke image script: sudo -E bash build.sh env: @@ -80,5 +80,5 @@ jobs: script: > sudo manifest-tool push from-args \ --platforms linux/amd64 \ - --template ${DOCKER_USERNAME}/functest-kubernetes-smoke:ARCH-latest \ - --target ${DOCKER_USERNAME}/functest-kubernetes-smoke:latest + --template ${DOCKER_USERNAME}/functest-kubernetes-smoke:ARCH-kali \ + --target ${DOCKER_USERNAME}/functest-kubernetes-smoke:kali diff --git a/ansible/site.yml b/ansible/site.yml index 829f51a2..4f69efb4 100644 --- a/ansible/site.yml +++ b/ansible/site.yml @@ -5,6 +5,9 @@ project: functest-kubernetes db_project: functest gerrit_project: functest-kubernetes + docker_tags: + - jerma: + branch: stable/kali builds: dependencies: - repo: _ diff --git a/build.sh b/build.sh index a61ecb75..4a66ddf8 100644 --- a/build.sh +++ b/build.sh @@ -13,44 +13,44 @@ arm64_dirs=${arm64_dirs-${amd64_dirs}} build_opts=(--pull=true --no-cache --force-rm=true) find . -name Dockerfile -exec sed -i \ - -e "s|opnfv/functest-kubernetes-core|\ -${repo}/functest-kubernetes-core:amd64-latest|g" {} + + -e "s|opnfv/functest-kubernetes-core:kali|\ +${repo}/functest-kubernetes-core:amd64-kali|g" {} + find . -name Dockerfile -exec sed -i \ - -e "s|opnfv/functest-kubernetes-healthcheck|\ -${repo}/functest-kubernetes-healthcheck:amd64-latest|g" {} + + -e "s|opnfv/functest-kubernetes-healthcheck:kali|\ +${repo}/functest-kubernetes-healthcheck:amd64-kali|g" {} + for dir in ${amd64_dirs}; do (cd "${dir}" && docker build "${build_opts[@]}" \ - -t "${repo}/functest-kubernetes-${dir##**/}:amd64-latest" .) - docker push "${repo}/functest-kubernetes-${dir##**/}:amd64-latest" + -t "${repo}/functest-kubernetes-${dir##**/}:amd64-kali" .) + docker push "${repo}/functest-kubernetes-${dir##**/}:amd64-kali" [ "${dir}" != "docker/core" ] && (docker rmi \ - "${repo}/functest-kubernetes-${dir##**/}:amd64-latest" || true) + "${repo}/functest-kubernetes-${dir##**/}:amd64-kali" || true) done [ ! -z "${amd64_dirs}" ] && (docker rmi \ - "${repo}/functest-kubernetes-core:amd64-latest" \ + "${repo}/functest-kubernetes-core:amd64-kali" \ golang:1.13-alpine3.11 || true) find . -name Dockerfile -exec git checkout {} + find . -name Dockerfile -exec sed -i \ -e "s|golang:1.13-alpine3.11|arm64v8/golang:1.13-alpine3.11|g" {} + find . -name Dockerfile -exec sed -i \ - -e "s|opnfv/functest-kubernetes-core|\ -${repo}/functest-kubernetes-core:arm64-latest|g" {} + + -e "s|opnfv/functest-kubernetes-core:kali|\ +${repo}/functest-kubernetes-core:arm64-kali|g" {} + find . -name Dockerfile -exec sed -i \ - -e "s|opnfv/functest-kubernetes-healthcheck|\ -${repo}/functest-kubernetes-healthcheck:arm64-latest|g" {} + + -e "s|opnfv/functest-kubernetes-healthcheck:kali|\ +${repo}/functest-kubernetes-healthcheck:arm64-kali|g" {} + for dir in ${arm64_dirs}; do (cd "${dir}" && docker build "${build_opts[@]}" \ - -t "${repo}/functest-kubernetes-${dir##**/}:arm64-latest" .) - docker push "${repo}/functest-kubernetes-${dir##**/}:arm64-latest" + -t "${repo}/functest-kubernetes-${dir##**/}:arm64-kali" .) + docker push "${repo}/functest-kubernetes-${dir##**/}:arm64-kali" [ "${dir}" != "docker/core" ] && (docker rmi \ - "${repo}/functest-kubernetes-${dir##**/}:arm64-latest" || true) + "${repo}/functest-kubernetes-${dir##**/}:arm64-kali" || true) done [ ! -z "${arm64_dirs}" ] && - (docker rmi "${repo}/functest-kubernetes-core:arm64-latest" \ + (docker rmi "${repo}/functest-kubernetes-core:arm64-kali" \ arm64v8/golang:1.13-alpine3.11 || true) find . -name Dockerfile -exec git checkout {} + diff --git a/docker/cnf/Dockerfile b/docker/cnf/Dockerfile index bc8a6fe7..a01f4425 100644 --- a/docker/cnf/Dockerfile +++ b/docker/cnf/Dockerfile @@ -1,4 +1,4 @@ -FROM opnfv/functest-kubernetes-core +FROM opnfv/functest-kubernetes-core:kali COPY testcases.yaml /usr/lib/python3.8/site-packages/xtesting/ci/testcases.yaml CMD ["run_tests", "-t", "all"] diff --git a/docker/core/Dockerfile b/docker/core/Dockerfile index 7c468040..7b37e046 100644 --- a/docker/core/Dockerfile +++ b/docker/core/Dockerfile @@ -1,8 +1,8 @@ FROM golang:1.13-alpine3.11 -ARG BRANCH=master +ARG BRANCH=stable/kali ARG OPENSTACK_TAG=master -ARG OPNFV_TAG=master +ARG OPNFV_TAG=stable/kali RUN apk --no-cache add --update python3 bash git grep libffi openssl mailcap && \ apk --no-cache add --virtual .build-deps --update \ diff --git a/docker/healthcheck/Dockerfile b/docker/healthcheck/Dockerfile index 1467f857..19df6086 100644 --- a/docker/healthcheck/Dockerfile +++ b/docker/healthcheck/Dockerfile @@ -1,4 +1,4 @@ -FROM opnfv/functest-kubernetes-core +FROM opnfv/functest-kubernetes-core:kali ARG K8S_TAG=master diff --git a/docker/security/Dockerfile b/docker/security/Dockerfile index 915ebd65..91febf65 100644 --- a/docker/security/Dockerfile +++ b/docker/security/Dockerfile @@ -1,3 +1,3 @@ -FROM opnfv/functest-kubernetes-core +FROM opnfv/functest-kubernetes-core:kali COPY testcases.yaml /usr/lib/python3.8/site-packages/xtesting/ci/testcases.yaml diff --git a/docker/smoke/Dockerfile b/docker/smoke/Dockerfile index 72ad2e6e..2d529300 100644 --- a/docker/smoke/Dockerfile +++ b/docker/smoke/Dockerfile @@ -1,4 +1,4 @@ -FROM opnfv/functest-kubernetes-healthcheck +FROM opnfv/functest-kubernetes-healthcheck:kali COPY testcases.yaml /usr/lib/python3.8/site-packages/xtesting/ci/testcases.yaml CMD ["run_tests", "-t", "all"] -- cgit 1.2.3-korg