summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-11-14 10:52:38 +0100
committerCédric Ollivier <cedric.ollivier@orange.com>2018-11-14 10:54:32 +0100
commit47a8ae15ddd0ea59043c116f8152b466b0edfedf (patch)
tree0230da2386bbc49b7c3ae8102e161a5d35c08cd1
parent899f9438b7bbd7e1d6b7f17a2176e56ef0b14ea2 (diff)
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: I7fe0c5bf8373e61a658153fda3d3a4bd233f6bc0 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit 284e30415fdec9c1a17c7f0b0b023fb0bbf045ce)
-rw-r--r--ci/gate.yaml11
1 files changed, 8 insertions, 3 deletions
diff --git a/ci/gate.yaml b/ci/gate.yaml
index 58f1fd6b5..fa872c90a 100644
--- a/ci/gate.yaml
+++ b/ci/gate.yaml
@@ -26,10 +26,15 @@
- functest-gerrit
builders:
- shell: |
+ case "{container}" in
+ "components")
+ args="" ;;
+ *)
+ args="--build-arg BRANCH=${{branch}}" ;;
+ esac
cd docker/$(echo {container} |cut -d\- -f 2)
- docker build \
- --pull=false --no-cache --force-rm=true \
- --build-arg BRANCH=${{branch}} \
+ sudo docker build \
+ ${{args}} --pull=false --no-cache --force-rm=true \
-t {repo}/functest-{container}:{tag} .
- project: