From a246511be00baa78736d7f72954c7884d5e1dd4d Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Wed, 14 Nov 2018 10:35:26 +0100 Subject: Protect vs build-args not consumed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit BRANCH is useless in case of components which only inherits from tempest. The build could simply fail depending on the docker version [1]. [1] https://build.opnfv.org/ci/job/opnfv-functest-components-latest-build/1/console Change-Id: I8ced7282c77463de9684904d141b2f18ae45d3c9 Signed-off-by: Cédric Ollivier --- jjb/functest/functest-virtual.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/jjb/functest/functest-virtual.yaml b/jjb/functest/functest-virtual.yaml index 7ec0cad6d..df027661f 100644 --- a/jjb/functest/functest-virtual.yaml +++ b/jjb/functest/functest-virtual.yaml @@ -222,10 +222,15 @@ - functest-gerrit builders: - shell: | + case "{container}" in + "components") + args="" ;; + *) + args="--build-arg BRANCH=${{branch}}" ;; + esac cd docker/$(echo {container} |cut -d\- -f 2) sudo docker build \ - --pull=false --no-cache --force-rm=true \ - --build-arg BRANCH=${{branch}} \ + ${{args}} --pull=false --no-cache --force-rm=true \ -t {repo}/functest-{container}:{tag} . - project: @@ -250,8 +255,7 @@ - job-template: name: '{repo}-functest-{tag}-gate' project-type: multijob - functest-buildparameters: *functest-buildparameters - functest-defaultparameters: *functest-defaultparameters + <<: *functest-buildparameters builders: - multijob: name: build functest-core -- cgit 1.2.3-korg