summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJose Lausuch <jalausuch@suse.com>2017-11-14 08:44:27 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-11-14 08:44:27 +0000
commit8f2f9ca8772147b10e0386299876a97d833cc00e (patch)
tree79b610da66fd06d739f79a80e2048ba51a126d79
parent9f7a3ac83c62035d0b8f1e0adc27296db8a3e31c (diff)
parent6b64bb67585b8b88145054f11b9c8b4914dd7aff (diff)
Merge "Set Functest MultiJob as arch independent"
-rw-r--r--jjb/releng/functest-docker.yml150
-rwxr-xr-xjjb/releng/opnfv-manifest.sh42
2 files changed, 77 insertions, 115 deletions
diff --git a/jjb/releng/functest-docker.yml b/jjb/releng/functest-docker.yml
index 6c131604b..b90f029d3 100644
--- a/jjb/releng/functest-docker.yml
+++ b/jjb/releng/functest-docker.yml
@@ -59,14 +59,15 @@
# yamllint enable rule:key-duplicates
jobs:
- - "functest-docker-build-push-{arch_tag}-{stream}"
- - "functest-{image}-build-push-{arch_tag}-{stream}"
- - "functest-{image}-create-manifest-{arch_tag}-{stream}"
+ - "functest-docker-{stream}"
+ - "functest-{image}-build-{arch_tag}-{stream}"
+ - "functest-{image}-manifest-{stream}"
+
########################
# job templates
########################
- job-template:
- name: 'functest-docker-build-push-{arch_tag}-{stream}'
+ name: 'functest-docker-{stream}'
project-type: multijob
@@ -76,8 +77,8 @@
- job-parameters:
project: '{project}'
branch: '{branch}'
- slave_label: '{slave_label}'
- arch_tag: '{arch_tag}'
+ slave_label: 'opnfv-build-ubuntu'
+ arch_tag: 'amd64'
- string:
name: ARCH_TAG
default: "{arch_tag}"
@@ -97,116 +98,119 @@
builders:
- multijob:
- name: 'build-base-img-create-manifest'
- execution-type: SEQUENTIAL
+ name: 'build functest-core images'
+ execution-type: PARALLEL
projects:
- - name: 'functest-core-build-push-{arch_tag}-{stream}'
+ - name: 'functest-core-build-amd64-{stream}'
<<: *build-job-settings
- - name: 'functest-core-create-manifest-{arch_tag}-{stream}'
+ - name: 'functest-core-build-arm64-{stream}'
+ <<: *build-job-settings
+ - multijob:
+ name: 'publish functest-core manifests'
+ execution-type: PARALLEL
+ projects:
+ - name: 'functest-core-manifest-{stream}'
<<: *manifest-job-settings
- multijob:
- name: 'build-child-img'
+ name: 'build all functest images'
condition: SUCCESSFUL
execution-type: PARALLEL
projects:
- - name: 'functest-healthcheck-build-push-{arch_tag}-{stream}'
+ - name: 'functest-healthcheck-build-amd64-{stream}'
+ <<: *build-job-settings
+ - name: 'functest-healthcheck-build-arm64-{stream}'
<<: *build-job-settings
- - name: 'functest-features-build-push-{arch_tag}-{stream}'
+ - name: 'functest-features-build-amd64-{stream}'
<<: *build-job-settings
- - name: 'functest-components-build-push-{arch_tag}-{stream}'
+ - name: 'functest-features-build-arm64-{stream}'
<<: *build-job-settings
- - name: 'functest-parser-build-push-{arch_tag}-{stream}'
+ - name: 'functest-components-build-amd64-{stream}'
<<: *build-job-settings
- - name: 'functest-smoke-build-push-{arch_tag}-{stream}'
+ - name: 'functest-components-build-arm64-{stream}'
<<: *build-job-settings
- - name: 'functest-vnf-build-push-{arch_tag}-{stream}'
+ - name: 'functest-parser-build-amd64-{stream}'
<<: *build-job-settings
- - name: 'functest-restapi-build-push-{arch_tag}-{stream}'
+ - name: 'functest-parser-build-arm64-{stream}'
+ <<: *build-job-settings
+ - name: 'functest-smoke-build-amd64-{stream}'
+ <<: *build-job-settings
+ - name: 'functest-smoke-build-arm64-{stream}'
+ <<: *build-job-settings
+ - name: 'functest-vnf-build-amd64-{stream}'
+ <<: *build-job-settings
+ - name: 'functest-restapi-build-amd64-{stream}'
<<: *build-job-settings
- multijob:
- name: 'create-img-manifest'
+ name: 'publish all manifests'
condition: SUCCESSFUL
execution-type: PARALLEL
projects:
- - name: 'functest-healthcheck-create-manifest-{arch_tag}-{stream}'
+ - name: 'functest-healthcheck-manifest-{stream}'
<<: *manifest-job-settings
- - name: 'functest-features-create-manifest-{arch_tag}-{stream}'
+ - name: 'functest-features-manifest-{stream}'
<<: *manifest-job-settings
- - name: 'functest-components-create-manifest-{arch_tag}-{stream}'
+ - name: 'functest-components-manifest-{stream}'
<<: *manifest-job-settings
- - name: 'functest-parser-create-manifest-{arch_tag}-{stream}'
+ - name: 'functest-parser-manifest-{stream}'
<<: *manifest-job-settings
- - name: 'functest-smoke-create-manifest-{arch_tag}-{stream}'
+ - name: 'functest-smoke-manifest-{stream}'
<<: *manifest-job-settings
- - name: 'functest-vnf-create-manifest-{arch_tag}-{stream}'
+ - name: 'functest-vnf-manifest-{stream}'
<<: *manifest-job-settings
- - name: 'functest-restapi-create-manifest-{arch_tag}-{stream}'
+ - name: 'functest-restapi-manifest-{stream}'
<<: *manifest-job-settings
publishers:
- - 'functest-{arch_tag}-recipients'
+ - 'functest-amd64-recipients'
+ - 'functest-arm64-recipients'
- job-template:
-
- name: 'functest-{image}-build-push-{arch_tag}-{stream}'
-
+ name: 'functest-{image}-build-{arch_tag}-{stream}'
disabled: '{obj:disabled}'
-
parameters:
- job-parameters:
project: '{project}'
branch: '{branch}'
slave_label: '{slave_label}'
arch_tag: '{arch_tag}'
- - string:
- name: DOCKER_REPO_NAME
- default: "opnfv/functest-{image}"
- description: "Dockerhub repo to be pushed to."
- - string:
- name: DOCKER_DIR
- default: "docker/{image}"
- description: "Directory containing files needed by the Dockerfile"
-
scm:
- git-scm
-
- publishers:
- - 'functest-{arch_tag}-recipients'
-
builders:
- - shell:
- !include-raw-escape: ./opnfv-docker.sh
+ - shell: |
+ #!/bin/bash -ex
+ case "{arch_tag}" in
+ "arm64")
+ sudo amd64_dirs= arm64_dirs=docker/{image} bash ./build.sh ;;
+ *)
+ sudo amd64_dirs=docker/{image} arm64_dirs= bash ./build.sh ;;
+ esac
+ exit $?
- job-template:
-
- name: 'functest-{image}-create-manifest-{arch_tag}-{stream}'
-
+ name: 'functest-{image}-manifest-{stream}'
disabled: '{obj:disabled}'
-
- parameters:
- - job-parameters:
- project: '{project}'
- branch: '{branch}'
- slave_label: '{slave_label}'
- arch_tag: '{arch_tag}'
- - string:
- name: DOCKER_REPO_NAME
- default: "opnfv/functest-{image}"
- description: "Dockerhub repo to be pushed to."
- - string:
- name: DOCKER_DIR
- default: "docker/{image}"
- description: "Directory containing files needed by the Dockerfile"
-
builders:
- - shell:
- !include-raw-escape: ./opnfv-manifest.sh
-
- scm:
- - git-scm
-
- publishers:
- - 'functest-{arch_tag}-recipients'
+ - shell: |
+ #!/bin/bash -ex
+ case "{stream}" in
+ "master")
+ tag="latest" ;;
+ "*")
+ tag="{stream}" ;;
+ esac
+ case "{image}" in
+ "vnf"|"restapi")
+ sudo manifest-tool push from-args \
+ --platforms linux/amd64 \
+ --template opnfv/functest-{image}:ARCH-$tag \
+ --target opnfv/functest-{image}:$tag ;;
+ *)
+ sudo manifest-tool push from-args \
+ --platforms linux/amd64,linux/arm64 \
+ --template opnfv/functest-{image}:ARCH-$tag \
+ --target opnfv/functest-{image}:$tag ;;
+ esac
+ exit $?
# parameter macro
- parameter:
diff --git a/jjb/releng/opnfv-manifest.sh b/jjb/releng/opnfv-manifest.sh
deleted file mode 100755
index a740491c2..000000000
--- a/jjb/releng/opnfv-manifest.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#!/bin/bash
-# SPDX-license-identifier: Apache-2.0
-##############################################################################
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-
-set -o errexit
-set -o nounset
-set -o pipefail
-
-# Starting creating manifest image for $DOCKER_REPO_NAME
-
-ARCH=(amd64 arm64)
-DOCKER_REPO_NAME=${DOCKER_REPO_NAME-}
-RELEASE_VERSION=${RELEASE_VERSION-}
-BRANCH=${BRANCH-}
-ARCH_TAG=${ARCH_TAG-}
-
-# Before script install manifest-tool:
-# cd .. && git clone https://github.com/estesp/manifest-tool
-# cd ../manifest-tool && sudo -E make && sudo -E make install
-
-if [[ "$BRANCH" == "master" ]]; then
- DOCKER_TAG="latest"
-elif [[ "$BRANCH" == "euphrates" ]]; then
- DOCKER_TAG="euphrates"
-elif [[ -n "${RELEASE_VERSION}" ]]; then
- DOCKER_TAG="${RELEASE_VERSION}"
-else
- DOCKER_TAG="stable"
-fi
-if [[ "${ARCH_TAG}" =~ "arm64" || "${ARCH_TAG}" =~ "amd64" ]]; then
- sudo manifest-tool push from-args --platforms linux/amd64,linux/arm64 \
- --template "${DOCKER_REPO_NAME}":"${ARCH[0]}"-"${DOCKER_TAG}" \
- --template "${DOCKER_REPO_NAME}":"${ARCH[1]}"-"${DOCKER_TAG}" \
- --target "${DOCKER_REPO_NAME}":"${DOCKER_TAG}"
-fi
-