From: Cédric Ollivier Date: Wed, 14 Nov 2018 09:35:26 +0000 (+0100) Subject: Protect vs build-args not consumed X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?p=releng.git;a=commitdiff_plain;h=a246511be00baa78736d7f72954c7884d5e1dd4d Protect vs build-args not consumed 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 --- 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