From 876cd53e23632d587dc1229fa29ade3352ccae7c Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Sun, 14 Feb 2021 15:07:44 +0100 Subject: Reorder jjb to allow us to only build containers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It's required for the new Functest K8s tags. Change-Id: I5a924077e10bef703a946ea952d04c8fa0981329 Signed-off-by: Cédric Ollivier --- jjb/functest/functest.yaml | 95 +++++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 47 deletions(-) (limited to 'jjb/functest/functest.yaml') diff --git a/jjb/functest/functest.yaml b/jjb/functest/functest.yaml index 5a3077f34..8fa1b00f6 100644 --- a/jjb/functest/functest.yaml +++ b/jjb/functest/functest.yaml @@ -1,7 +1,10 @@ --- -- functest-jobs: &functest-jobs - name: 'functest-jobs' - current-parameters: true +- functest-containers: &functest-containers + name: 'functest-containers' + repo: '{repo}' + port: '{port}' + container: '{container}' + tag: '{tag}' - functest-params: &functest-params name: 'functest-params' @@ -39,6 +42,10 @@ DASHBOARD_URL: http://172.30.13.91 dependency: 3.9 +- functest-jobs: &functest-jobs + name: 'functest-jobs' + current-parameters: true + - parameter: name: functest-slave parameters: @@ -71,13 +78,6 @@ name: IMAGE_PROPERTIES default: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi -- functest-containers: &functest-containers - name: 'functest-containers' - repo: '{repo}' - port: '{port}' - container: '{container}' - tag: '{tag}' - - functest-run-containers: &functest-run-containers name: 'functest-run-containers' <<: *functest-containers @@ -147,43 +147,6 @@ fi sudo docker rmi $image || true -- functest-build-containers: &functest-build-containers - name: 'functest-build-containers' - <<: *functest-containers - ref_arg: '{ref_arg}' - path: '{path}' - -- builder: - name: functest-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: functest-scm - scm: - - git: - url: 'https://gerrit.opnfv.org/gerrit/functest' - refspec: '+refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*' - branches: - - '{ref}' - - job-template: name: 'functest-{repo}-{container}-{tag}-pull' parameters: @@ -459,6 +422,7 @@ builders: - shell: | set +x + [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true if [ "{repo}" = "_" ]; then image={container}:{tag} elif [ "{port}" = "None" ]; then @@ -709,6 +673,43 @@ - last-duration regex: ^functest-[a-z0-9]+-daily$ +- functest-build-containers: &functest-build-containers + name: 'functest-build-containers' + <<: *functest-containers + ref_arg: '{ref_arg}' + path: '{path}' + +- builder: + name: functest-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: functest-scm + scm: + - git: + url: 'https://gerrit.opnfv.org/gerrit/functest' + refspec: '+refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*' + branches: + - '{ref}' + - functest-dep: &functest-dep name: 'functest-containers' repo: '{repo}' -- cgit 1.2.3-korg