summaryrefslogtreecommitdiffstats
path: root/jjb/functest
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-08-17 15:27:26 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-08-17 15:30:07 +0200
commit5451f40e4124c749de66f54c2daaab11534e20cb (patch)
treef3403664c85311dc336bad57bff1b6fd9dc15506 /jjb/functest
parentbf726569249b773c69c26d0ec8defdd223720c3e (diff)
Build arm images and publish manifests
It mainly follows the Functest docker jjb. Change-Id: Ia86082cfd5d2f19496e7801441e005ffc88595a3 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'jjb/functest')
-rw-r--r--jjb/functest/functest-kubernetes-docker.yaml103
1 files changed, 97 insertions, 6 deletions
diff --git a/jjb/functest/functest-kubernetes-docker.yaml b/jjb/functest/functest-kubernetes-docker.yaml
index 2085251c6..5fbb3be7e 100644
--- a/jjb/functest/functest-kubernetes-docker.yaml
+++ b/jjb/functest/functest-kubernetes-docker.yaml
@@ -19,13 +19,15 @@
arch_tag:
- 'amd64':
slave_label: 'opnfv-build-ubuntu'
+ - 'arm64':
+ slave_label: 'opnfv-build-ubuntu-arm'
# yamllint disable rule:key-duplicates
image:
- 'core'
- 'healthcheck'
- - 'smoke'
- 'features'
+ - 'smoke'
# settings for jobs run in multijob phases
build-job-settings: &build-job-settings
@@ -53,6 +55,7 @@
jobs:
- "functest-kubernetes-docker-{stream}"
- "functest-kubernetes-{image}-docker-build-{arch_tag}-{stream}"
+ - "functest-kubernetes-{image}-docker-manifest-{stream}"
########################
# job templates
@@ -92,23 +95,54 @@
projects:
- name: 'functest-kubernetes-core-docker-build-amd64-{stream}'
<<: *build-job-settings
+ - name: 'functest-kubernetes-core-docker-build-arm64-{stream}'
+ <<: *build-job-settings
- multijob:
- name: 'build functest-kubernetes-[healthcheck,features] image'
+ name: 'publish functest-kubernetes-core manifests'
+ execution-type: PARALLEL
+ projects:
+ - name: 'functest-kubernetes-core-docker-manifest-{stream}'
+ <<: *manifest-job-settings
+ - multijob:
+ name: 'build functest-kubernetes-healthcheck images'
execution-type: PARALLEL
projects:
- name: 'functest-kubernetes-healthcheck-docker-build-amd64-{stream}'
<<: *build-job-settings
- - name: 'functest-kubernetes-features-docker-build-amd64-{stream}'
+ - name: 'functest-kubernetes-healthcheck-docker-build-arm64-{stream}'
<<: *build-job-settings
- multijob:
- name: 'build functest-kubernetes-smoke image'
+ name: 'publish functest-kubernetes-healthcheck manifests'
execution-type: PARALLEL
projects:
+ - name: 'functest-kubernetes-healthcheck-docker-manifest-{stream}'
+ <<: *manifest-job-settings
+ - multijob:
+ name: 'build all functest-kubernetes images'
+ condition: SUCCESSFUL
+ execution-type: PARALLEL
+ projects:
+ - name: 'functest-kubernetes-features-docker-build-amd64-{stream}'
+ <<: *build-job-settings
+ - name: 'functest-kubernetes-features-docker-build-arm64-{stream}'
+ <<: *build-job-settings
- name: 'functest-kubernetes-smoke-docker-build-amd64-{stream}'
<<: *build-job-settings
+ - name: 'functest-kubernetes-smoke-docker-build-arm64-{stream}'
+ <<: *build-job-settings
+ - multijob:
+ name: 'publish all manifests'
+ condition: SUCCESSFUL
+ execution-type: PARALLEL
+ projects:
+ - name: 'functest-kubernetes-features-docker-manifest-{stream}'
+ <<: *manifest-job-settings
+ - name: 'functest-kubernetes-smoke-docker-manifest-{stream}'
+ <<: *manifest-job-settings
publishers:
- 'functest-kubernetes-amd64-recipients'
+ - 'functest-kubernetes-arm64-recipients'
- job-template:
name: 'functest-kubernetes-{image}-docker-build-{arch_tag}-{stream}'
@@ -124,7 +158,54 @@
builders:
- shell: |
#!/bin/bash -ex
- sudo amd64_dirs=docker/{image} bash ./build.sh
+ 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-kubernetes-{image}-docker-manifest-{stream}'
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ branch: '{branch}'
+ - label:
+ name: SLAVE_LABEL
+ default: 'opnfv-build-ubuntu'
+ description: 'Slave label on Jenkins'
+ - string:
+ name: PROJECT
+ default: "{project}"
+ description: "Project name used to enable job conditions"
+ - string:
+ name: GIT_BASE
+ default: https://gerrit.opnfv.org/gerrit/$PROJECT
+ description: 'Git URL to use on this Jenkins Slave'
+ - string:
+ name: REPO
+ default: "opnfv"
+ description: "Repository name for functest-kubernetes images"
+
+
+ disabled: '{obj:disabled}'
+
+ builders:
+ - shell: |
+ #!/bin/bash -ex
+ case "{stream}" in
+ "master")
+ tag="latest" ;;
+ *)
+ tag="{stream}" ;;
+ esac
+ sudo manifest-tool push from-args \
+ --platforms linux/amd64,linux/arm64 \
+ --template $REPO/functest-kubernetes-{image}:ARCH-$tag \
+ --target $REPO/functest-kubernetes-{image}:$tag
exit $?
# parameter macro
@@ -169,7 +250,17 @@
- string:
name: REPO
default: "opnfv"
- description: "Repository name for functest images"
+ description: "Repository name for functest-kubernetes images"
+
+# publisher macros
+- publisher:
+ name: 'functest-kubernetes-arm64-recipients'
+ publishers:
+ - email:
+ recipients: >
+ cristina.pauna@enea.com
+ alexandru.avadanii@enea.com
+ delia.popescu@enea.com
- publisher:
name: 'functest-kubernetes-amd64-recipients'