summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2021-02-15 01:21:17 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2021-02-15 01:21:17 +0100
commitb4115573dd37fa715f42e889c667dac3dfdbd591 (patch)
treefb2e5417fec33c44ff5db7f3900f8de13075335e /jjb
parent2a0e7d31396e5cfaeb876dd1db3953817e2cdc25 (diff)
Manage build args (needed by K8s)
Change-Id: I3473fc0770edb1d74397217e0752bf6f0f98f33c Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'jjb')
-rw-r--r--jjb/functest/functest-kubernetes-ng.yaml30
-rw-r--r--jjb/functest/functest-kubernetes.yaml47
-rw-r--r--jjb/functest/functest.yaml47
-rw-r--r--jjb/functest/xtesting.yaml47
4 files changed, 104 insertions, 67 deletions
diff --git a/jjb/functest/functest-kubernetes-ng.yaml b/jjb/functest/functest-kubernetes-ng.yaml
index 4b1e4ac23..3240eeba0 100644
--- a/jjb/functest/functest-kubernetes-ng.yaml
+++ b/jjb/functest/functest-kubernetes-ng.yaml
@@ -12,45 +12,45 @@
port:
tag:
- v1.20:
+ buildargs:
branch: stable/leguer
slave: lf-virtual1
dependency: 3.12
- docker_args: [{'K8S_TAG': '1.20'}]
- v1.19:
+ buildargs:
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'}]
+ buildargs: --build-arg K8S_TAG=1.18
- v1.17:
+ buildargs:
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'}]
+ buildargs: --build-arg K8S_TAG=1.16
- v1.15:
+ buildargs:
branch: stable/iruya
slave: lf-virtual1
dependency: 3.9
- docker_args: []
- v1.14:
branch: stable/iruya
slave: lf-virtual1
dependency: 3.9
- docker_args: [{'K8S_TAG': '1.14'}]
+ buildargs: --build-arg K8S_TAG=1.14
- v1.13:
+ buildargs:
branch: stable/hunter
slave: lf-virtual1
dependency: 3.9
- docker_args: []
- functest-kubernetes-ng-jobs: &functest-kubernetes-ng-jobs
name: 'functest-kubernetes-ng-jobs'
@@ -69,6 +69,7 @@
<<: *functest-kubernetes-ng-containers
ref_arg: '{ref_arg}'
path: '{path}'
+ buildargs: '{buildargs}'
- builder:
name: functest-kubernetes-ng-build-containers
@@ -82,13 +83,15 @@
else
image={repo}:{port}/{container}:{tag}
fi
- if [ "{ref_arg}" = "None" ]; then
- build_arg=""
- else
- build_arg="--build-arg {ref_arg}={ref}"
+ build_args=""
+ if [ "{buildargs}" != "None" ]; then
+ build_args="{buildargs} "
+ fi
+ if [ "{ref_arg}" != "None" ]; then
+ build_args="--build-arg {ref_arg}={ref}"
fi
cd {path}
- sudo docker build $build_arg \
+ sudo docker build $build_args \
--pull=false --no-cache --force-rm=true \
-t $image .
@@ -199,6 +202,7 @@
- functest-kubernetes-ng-build-containers:
<<: *functest-kubernetes-ng-build-containers
ref: '{branch}'
+ buildargs: '{buildargs}'
- functest-kubernetes-ng-push-containers:
<<: *functest-kubernetes-ng-build-containers
ref: '{branch}'
diff --git a/jjb/functest/functest-kubernetes.yaml b/jjb/functest/functest-kubernetes.yaml
index 6514397df..5c840b424 100644
--- a/jjb/functest/functest-kubernetes.yaml
+++ b/jjb/functest/functest-kubernetes.yaml
@@ -12,26 +12,32 @@
port:
tag:
- latest:
+ buildargs:
branch: master
slave: lf-virtual1-6
dependency: 3.13
- leguer:
+ buildargs:
branch: stable/leguer
slave: lf-virtual1-5
dependency: 3.12
- kali:
+ buildargs:
branch: stable/kali
slave: lf-virtual1-4
dependency: 3.11
- jerma:
+ buildargs:
branch: stable/jerma
slave: lf-virtual1-3
dependency: 3.10
- iruya:
+ buildargs:
branch: stable/iruya
slave: lf-virtual1-2
dependency: 3.9
- hunter:
+ buildargs:
branch: stable/hunter
slave: lf-virtual1-1
dependency: 3.9
@@ -469,6 +475,7 @@
<<: *functest-kubernetes-containers
ref_arg: '{ref_arg}'
path: '{path}'
+ buildargs: '{buildargs}'
- builder:
name: functest-kubernetes-build-containers
@@ -482,13 +489,15 @@
else
image={repo}:{port}/{container}:{tag}
fi
- if [ "{ref_arg}" = "None" ]; then
- build_arg=""
- else
- build_arg="--build-arg {ref_arg}={ref}"
+ build_args=""
+ if [ "{buildargs}" != "None" ]; then
+ build_args="{buildargs} "
+ fi
+ if [ "{ref_arg}" != "None" ]; then
+ build_args="--build-arg {ref_arg}={ref}"
fi
cd {path}
- docker build $build_arg \
+ docker build $build_args \
--pull=false --no-cache --force-rm=true \
-t $image .
@@ -600,6 +609,20 @@
jobs:
- 'functest-kubernetes-{tag}-tox'
+- job-template:
+ name: 'functest-kubernetes-{repo}-{container}-{tag}-gate'
+ parameters:
+ - functest-kubernetes-slave:
+ slave: '{slave}'
+ scm:
+ - functest-kubernetes-scm:
+ ref: $GERRIT_REFSPEC
+ builders:
+ - functest-kubernetes-build-containers:
+ <<: *functest-kubernetes-build-containers
+ ref: $GERRIT_REFSPEC
+ buildargs: '{buildargs}'
+
- project:
name: functest-kubernetes-opnfv-functest-kubernetes-core-{tag}-gate
<<: *functest-kubernetes-params
@@ -655,19 +678,6 @@
- 'functest-kubernetes-{repo}-{container}-{tag}-gate'
-- job-template:
- name: 'functest-kubernetes-{repo}-{container}-{tag}-gate'
- parameters:
- - functest-kubernetes-slave:
- slave: '{slave}'
- scm:
- - functest-kubernetes-scm:
- ref: $GERRIT_REFSPEC
- builders:
- - functest-kubernetes-build-containers:
- <<: *functest-kubernetes-build-containers
- ref: $GERRIT_REFSPEC
-
- trigger:
name: functest-kubernetes-patchset-created
triggers:
@@ -858,6 +868,7 @@
- functest-kubernetes-build-containers:
<<: *functest-kubernetes-build-containers
ref: '{branch}'
+ buildargs: '{buildargs}'
- functest-kubernetes-push-containers:
<<: *functest-kubernetes-build-containers
ref: '{branch}'
diff --git a/jjb/functest/functest.yaml b/jjb/functest/functest.yaml
index fa416c9e7..5280d7bb3 100644
--- a/jjb/functest/functest.yaml
+++ b/jjb/functest/functest.yaml
@@ -12,31 +12,37 @@
port:
tag:
- latest:
+ buildargs:
branch: master
slave: lf-virtual9
DASHBOARD_URL: http://172.30.13.94
dependency: 3.13
- leguer:
+ buildargs:
branch: stable/leguer
slave: lf-virtual9
DASHBOARD_URL: http://172.30.13.94
dependency: 3.12
- kali:
+ buildargs:
branch: stable/kali
slave: lf-pod4-3
DASHBOARD_URL: http://172.30.12.88
dependency: 3.11
- jerma:
+ buildargs:
branch: stable/jerma
slave: lf-pod4
DASHBOARD_URL: http://172.30.12.83
dependency: 3.10
- iruya:
+ buildargs:
branch: stable/iruya
slave: lf-virtual4
DASHBOARD_URL: http://172.30.13.89
dependency: 3.9
- hunter:
+ buildargs:
branch: stable/hunter
slave: lf-virtual6
DASHBOARD_URL: http://172.30.13.91
@@ -678,6 +684,7 @@
<<: *functest-containers
ref_arg: '{ref_arg}'
path: '{path}'
+ buildargs: '{buildargs}'
- builder:
name: functest-build-containers
@@ -691,13 +698,15 @@
else
image={repo}:{port}/{container}:{tag}
fi
- if [ "{ref_arg}" = "None" ]; then
- build_arg=""
- else
- build_arg="--build-arg {ref_arg}={ref}"
+ build_args=""
+ if [ "{buildargs}" != "None" ]; then
+ build_args="{buildargs} "
+ fi
+ if [ "{ref_arg}" != "None" ]; then
+ build_args="--build-arg {ref_arg}={ref}"
fi
cd {path}
- sudo docker build $build_arg \
+ sudo docker build $build_args \
--pull=false --no-cache --force-rm=true \
-t $image .
@@ -809,6 +818,20 @@
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
+ buildargs: '{buildargs}'
+
- project:
name: functest-opnfv-functest-core-{tag}-gate
<<: *functest-params
@@ -887,19 +910,6 @@
- 'functest-{repo}-{container}-{tag}-gate'
-- 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
-
- trigger:
name: functest-patchset-created
triggers:
@@ -1183,6 +1193,7 @@
- functest-build-containers:
<<: *functest-build-containers
ref: '{branch}'
+ buildargs: '{buildargs}'
- functest-push-containers:
<<: *functest-build-containers
ref: '{branch}'
diff --git a/jjb/functest/xtesting.yaml b/jjb/functest/xtesting.yaml
index 6678b7443..c596762db 100644
--- a/jjb/functest/xtesting.yaml
+++ b/jjb/functest/xtesting.yaml
@@ -12,26 +12,32 @@
port:
tag:
- latest:
+ buildargs:
branch: master
slave: lf-virtual1
dependency: 3.13
- leguer:
+ buildargs:
branch: stable/leguer
slave: lf-virtual1
dependency: 3.12
- kali:
+ buildargs:
branch: stable/kali
slave: lf-virtual1
dependency: 3.11
- jerma:
+ buildargs:
branch: stable/jerma
slave: lf-virtual1
dependency: 3.10
- iruya:
+ buildargs:
branch: stable/iruya
slave: lf-virtual1
dependency: 3.9
- hunter:
+ buildargs:
branch: stable/hunter
slave: lf-virtual1
dependency: 3.9
@@ -323,6 +329,7 @@
<<: *xtesting-containers
ref_arg: '{ref_arg}'
path: '{path}'
+ buildargs: '{buildargs}'
- builder:
name: xtesting-build-containers
@@ -336,13 +343,15 @@
else
image={repo}:{port}/{container}:{tag}
fi
- if [ "{ref_arg}" = "None" ]; then
- build_arg=""
- else
- build_arg="--build-arg {ref_arg}={ref}"
+ build_args=""
+ if [ "{buildargs}" != "None" ]; then
+ build_args="{buildargs} "
+ fi
+ if [ "{ref_arg}" != "None" ]; then
+ build_args="--build-arg {ref_arg}={ref}"
fi
cd {path}
- sudo docker build $build_arg \
+ sudo docker build $build_args \
--pull=false --no-cache --force-rm=true \
-t $image .
@@ -454,6 +463,20 @@
jobs:
- 'xtesting-{tag}-tox'
+- job-template:
+ name: 'xtesting-{repo}-{container}-{tag}-gate'
+ parameters:
+ - xtesting-slave:
+ slave: '{slave}'
+ scm:
+ - xtesting-scm:
+ ref: $GERRIT_REFSPEC
+ builders:
+ - xtesting-build-containers:
+ <<: *xtesting-build-containers
+ ref: $GERRIT_REFSPEC
+ buildargs: '{buildargs}'
+
- project:
name: xtesting-opnfv-xtesting-{tag}-gate
<<: *xtesting-params
@@ -473,19 +496,6 @@
- 'xtesting-{repo}-{container}-{tag}-gate'
-- job-template:
- name: 'xtesting-{repo}-{container}-{tag}-gate'
- parameters:
- - xtesting-slave:
- slave: '{slave}'
- scm:
- - xtesting-scm:
- ref: $GERRIT_REFSPEC
- builders:
- - xtesting-build-containers:
- <<: *xtesting-build-containers
- ref: $GERRIT_REFSPEC
-
- trigger:
name: xtesting-patchset-created
triggers:
@@ -631,6 +641,7 @@
- xtesting-build-containers:
<<: *xtesting-build-containers
ref: '{branch}'
+ buildargs: '{buildargs}'
- xtesting-push-containers:
<<: *xtesting-build-containers
ref: '{branch}'