From e0a1df3d32c8562195c80369c3f545be9cd27bd4 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Thu, 2 Jan 2020 16:06:03 +0100 Subject: Reorder build operations in xtesting jjbs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It eases conditional instructions (they are useless if only daily jjbs are setup). Change-Id: I270dcdddc12a1621cb40505bd5ba21e569810627 Signed-off-by: Cédric Ollivier --- jjb/functest/xtesting.yaml | 56 +++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/jjb/functest/xtesting.yaml b/jjb/functest/xtesting.yaml index bc797cfce..ab2d58e1e 100644 --- a/jjb/functest/xtesting.yaml +++ b/jjb/functest/xtesting.yaml @@ -60,12 +60,6 @@ <<: *xtesting-containers test: '{test}' -- xtesting-build-containers: &xtesting-build-containers - name: 'xtesting-build-containers' - <<: *xtesting-containers - ref_arg: '{ref_arg}' - path: '{path}' - - builder: name: xtesting-pull-containers builders: @@ -80,28 +74,6 @@ fi sudo docker pull $image -- builder: - name: xtesting-build-containers - builders: - - shell: | - set +x - if [ "{repo}" = "_" ]; then - image={container}:{tag} - elif [ "{port}" = "None" ]; then - image={repo}/{container}:{tag} - else - image={repo}:{port}/{container}:{tag} - fi - if [ "{ref_arg}" = "None" ]; then - build_arg="" - else - build_arg="--build-arg {ref_arg}={ref}" - fi - cd {path} - sudo docker build $build_arg \ - --pull=false --no-cache --force-rm=true \ - -t $image . - - builder: name: xtesting-run-containers builders: @@ -142,6 +114,34 @@ fi sudo docker rmi $image || true +- xtesting-build-containers: &xtesting-build-containers + name: 'xtesting-build-containers' + <<: *xtesting-containers + ref_arg: '{ref_arg}' + path: '{path}' + +- builder: + name: xtesting-build-containers + builders: + - shell: | + set +x + if [ "{repo}" = "_" ]; then + image={container}:{tag} + elif [ "{port}" = "None" ]; then + image={repo}/{container}:{tag} + else + image={repo}:{port}/{container}:{tag} + fi + if [ "{ref_arg}" = "None" ]; then + build_arg="" + else + build_arg="--build-arg {ref_arg}={ref}" + fi + cd {path} + sudo docker build $build_arg \ + --pull=false --no-cache --force-rm=true \ + -t $image . + - scm: name: xtesting-scm scm: -- cgit 1.2.3-korg