diff options
author | 2020-01-02 16:06:03 +0100 | |
---|---|---|
committer | 2020-01-02 16:07:31 +0100 | |
commit | e0a1df3d32c8562195c80369c3f545be9cd27bd4 (patch) | |
tree | af1603cf802da1e37a3e3baa7914a1e688421fe6 /jjb | |
parent | bee7998f04076a61672e3c25df68466ca8bf8ba5 (diff) |
Reorder build operations in xtesting jjbs
It eases conditional instructions (they are useless if only daily jjbs
are setup).
Change-Id: I270dcdddc12a1621cb40505bd5ba21e569810627
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'jjb')
-rw-r--r-- | jjb/functest/xtesting.yaml | 56 |
1 files 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: @@ -81,28 +75,6 @@ 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: - shell: | @@ -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: |