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-kubernetes-pi.yaml | 22 ++++---- jjb/functest/functest-kubernetes.yaml | 95 ++++++++++++++++---------------- jjb/functest/functest-pi.yaml | 22 ++++---- jjb/functest/functest.yaml | 95 ++++++++++++++++---------------- jjb/functest/xtesting-pi.yaml | 22 ++++---- jjb/functest/xtesting.yaml | 95 ++++++++++++++++---------------- 6 files changed, 177 insertions(+), 174 deletions(-) diff --git a/jjb/functest/functest-kubernetes-pi.yaml b/jjb/functest/functest-kubernetes-pi.yaml index 72da72232..b4100a26d 100644 --- a/jjb/functest/functest-kubernetes-pi.yaml +++ b/jjb/functest/functest-kubernetes-pi.yaml @@ -1,7 +1,10 @@ --- -- functest-kubernetes-pi-jobs: &functest-kubernetes-pi-jobs - name: 'functest-kubernetes-pi-jobs' - current-parameters: true +- functest-kubernetes-pi-containers: &functest-kubernetes-pi-containers + name: 'functest-kubernetes-pi-containers' + repo: '{repo}' + port: '{port}' + container: '{container}' + tag: '{tag}' - functest-kubernetes-pi-params: &functest-kubernetes-pi-params name: 'functest-kubernetes-pi-params' @@ -45,6 +48,10 @@ - arm64-hunter: slave: lf-virtual1-1 +- functest-kubernetes-pi-jobs: &functest-kubernetes-pi-jobs + name: 'functest-kubernetes-pi-jobs' + current-parameters: true + - parameter: name: functest-kubernetes-pi-slave parameters: @@ -65,13 +72,6 @@ name: DEPLOY_SCENARIO default: k8-nosdn-nofeature-noha -- functest-kubernetes-pi-containers: &functest-kubernetes-pi-containers - name: 'functest-kubernetes-pi-containers' - repo: '{repo}' - port: '{port}' - container: '{container}' - tag: '{tag}' - - functest-kubernetes-pi-run-containers: &functest-kubernetes-pi-run-containers name: 'functest-kubernetes-pi-run-containers' <<: *functest-kubernetes-pi-containers @@ -136,7 +136,6 @@ fi docker rmi $image || true - - job-template: name: 'functest-kubernetes-pi-{repo}-{container}-{tag}-pull' parameters: @@ -354,6 +353,7 @@ builders: - shell: | set +x + [ ! -z "$WORKSPACE" ] && rm -rf $WORKSPACE/results || true if [ "{repo}" = "_" ]; then image={container}:{tag} elif [ "{port}" = "None" ]; then diff --git a/jjb/functest/functest-kubernetes.yaml b/jjb/functest/functest-kubernetes.yaml index ffd3cf7be..faa3a6dff 100644 --- a/jjb/functest/functest-kubernetes.yaml +++ b/jjb/functest/functest-kubernetes.yaml @@ -1,7 +1,10 @@ --- -- functest-kubernetes-jobs: &functest-kubernetes-jobs - name: 'functest-kubernetes-jobs' - current-parameters: true +- functest-kubernetes-containers: &functest-kubernetes-containers + name: 'functest-kubernetes-containers' + repo: '{repo}' + port: '{port}' + container: '{container}' + tag: '{tag}' - functest-kubernetes-params: &functest-kubernetes-params name: 'functest-kubernetes-params' @@ -33,6 +36,10 @@ slave: lf-virtual1-1 dependency: 3.9 +- functest-kubernetes-jobs: &functest-kubernetes-jobs + name: 'functest-kubernetes-jobs' + current-parameters: true + - parameter: name: functest-kubernetes-slave parameters: @@ -53,13 +60,6 @@ name: DEPLOY_SCENARIO default: k8-nosdn-nofeature-noha -- functest-kubernetes-containers: &functest-kubernetes-containers - name: 'functest-kubernetes-containers' - repo: '{repo}' - port: '{port}' - container: '{container}' - tag: '{tag}' - - functest-kubernetes-run-containers: &functest-kubernetes-run-containers name: 'functest-kubernetes-run-containers' <<: *functest-kubernetes-containers @@ -124,43 +124,6 @@ fi docker rmi $image || true -- functest-kubernetes-build-containers: &functest-kubernetes-build-containers - name: 'functest-kubernetes-build-containers' - <<: *functest-kubernetes-containers - ref_arg: '{ref_arg}' - path: '{path}' - -- builder: - name: functest-kubernetes-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} - docker build $build_arg \ - --pull=false --no-cache --force-rm=true \ - -t $image . - -- scm: - name: functest-kubernetes-scm - scm: - - git: - url: 'https://gerrit.opnfv.org/gerrit/functest-kubernetes' - refspec: '+refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*' - branches: - - '{ref}' - - job-template: name: 'functest-kubernetes-{repo}-{container}-{tag}-pull' parameters: @@ -348,6 +311,7 @@ builders: - shell: | set +x + [ ! -z "$WORKSPACE" ] && rm -rf $WORKSPACE/results || true if [ "{repo}" = "_" ]; then image={container}:{tag} elif [ "{port}" = "None" ]; then @@ -500,6 +464,43 @@ - last-duration regex: ^functest-kubernetes-[a-z0-9]+-daily$ +- functest-kubernetes-build-containers: &functest-kubernetes-build-containers + name: 'functest-kubernetes-build-containers' + <<: *functest-kubernetes-containers + ref_arg: '{ref_arg}' + path: '{path}' + +- builder: + name: functest-kubernetes-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} + docker build $build_arg \ + --pull=false --no-cache --force-rm=true \ + -t $image . + +- scm: + name: functest-kubernetes-scm + scm: + - git: + url: 'https://gerrit.opnfv.org/gerrit/functest-kubernetes' + refspec: '+refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*' + branches: + - '{ref}' + - functest-kubernetes-dep: &functest-kubernetes-dep name: 'functest-kubernetes-containers' repo: '{repo}' diff --git a/jjb/functest/functest-pi.yaml b/jjb/functest/functest-pi.yaml index 09fef45f8..cd47047f9 100644 --- a/jjb/functest/functest-pi.yaml +++ b/jjb/functest/functest-pi.yaml @@ -1,7 +1,10 @@ --- -- functest-pi-jobs: &functest-pi-jobs - name: 'functest-pi-jobs' - current-parameters: true +- functest-pi-containers: &functest-pi-containers + name: 'functest-pi-containers' + repo: '{repo}' + port: '{port}' + container: '{container}' + tag: '{tag}' - functest-pi-params: &functest-pi-params name: 'functest-pi-params' @@ -63,6 +66,10 @@ slave: lf-virtual6 DASHBOARD_URL: http://172.30.13.91 +- functest-pi-jobs: &functest-pi-jobs + name: 'functest-pi-jobs' + current-parameters: true + - parameter: name: functest-pi-slave parameters: @@ -95,13 +102,6 @@ name: IMAGE_PROPERTIES default: hw_scsi_model:virtio-scsi,hw_disk_bus:scsi -- functest-pi-containers: &functest-pi-containers - name: 'functest-pi-containers' - repo: '{repo}' - port: '{port}' - container: '{container}' - tag: '{tag}' - - functest-pi-run-containers: &functest-pi-run-containers name: 'functest-pi-run-containers' <<: *functest-pi-containers @@ -171,7 +171,6 @@ fi sudo docker rmi $image || true - - job-template: name: 'functest-pi-{repo}-{container}-{tag}-pull' parameters: @@ -517,6 +516,7 @@ builders: - shell: | set +x + [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true if [ "{repo}" = "_" ]; then image={container}:{tag} elif [ "{port}" = "None" ]; then 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}' diff --git a/jjb/functest/xtesting-pi.yaml b/jjb/functest/xtesting-pi.yaml index 8f9236bb3..2ed3d00be 100644 --- a/jjb/functest/xtesting-pi.yaml +++ b/jjb/functest/xtesting-pi.yaml @@ -1,7 +1,10 @@ --- -- xtesting-pi-jobs: &xtesting-pi-jobs - name: 'xtesting-pi-jobs' - current-parameters: true +- xtesting-pi-containers: &xtesting-pi-containers + name: 'xtesting-pi-containers' + repo: '{repo}' + port: '{port}' + container: '{container}' + tag: '{tag}' - xtesting-pi-params: &xtesting-pi-params name: 'xtesting-pi-params' @@ -45,6 +48,10 @@ - arm64-hunter: slave: lf-virtual1 +- xtesting-pi-jobs: &xtesting-pi-jobs + name: 'xtesting-pi-jobs' + current-parameters: true + - parameter: name: xtesting-pi-slave parameters: @@ -59,13 +66,6 @@ name: build_tag -- xtesting-pi-containers: &xtesting-pi-containers - name: 'xtesting-pi-containers' - repo: '{repo}' - port: '{port}' - container: '{container}' - tag: '{tag}' - - xtesting-pi-run-containers: &xtesting-pi-run-containers name: 'xtesting-pi-run-containers' <<: *xtesting-pi-containers @@ -128,7 +128,6 @@ fi sudo docker rmi $image || true - - job-template: name: 'xtesting-pi-{repo}-{container}-{tag}-pull' parameters: @@ -219,6 +218,7 @@ builders: - shell: | set +x + [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true if [ "{repo}" = "_" ]; then image={container}:{tag} elif [ "{port}" = "None" ]; then diff --git a/jjb/functest/xtesting.yaml b/jjb/functest/xtesting.yaml index f96a5a8d1..d581bb9d4 100644 --- a/jjb/functest/xtesting.yaml +++ b/jjb/functest/xtesting.yaml @@ -1,7 +1,10 @@ --- -- xtesting-jobs: &xtesting-jobs - name: 'xtesting-jobs' - current-parameters: true +- xtesting-containers: &xtesting-containers + name: 'xtesting-containers' + repo: '{repo}' + port: '{port}' + container: '{container}' + tag: '{tag}' - xtesting-params: &xtesting-params name: 'xtesting-params' @@ -33,6 +36,10 @@ slave: lf-virtual1 dependency: 3.9 +- xtesting-jobs: &xtesting-jobs + name: 'xtesting-jobs' + current-parameters: true + - parameter: name: xtesting-slave parameters: @@ -47,13 +54,6 @@ name: build_tag -- xtesting-containers: &xtesting-containers - name: 'xtesting-containers' - repo: '{repo}' - port: '{port}' - container: '{container}' - tag: '{tag}' - - xtesting-run-containers: &xtesting-run-containers name: 'xtesting-run-containers' <<: *xtesting-containers @@ -116,43 +116,6 @@ 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: - - git: - url: 'https://gerrit.opnfv.org/gerrit/functest-xtesting' - refspec: '+refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*' - branches: - - '{ref}' - - job-template: name: 'xtesting-{repo}-{container}-{tag}-pull' parameters: @@ -243,6 +206,7 @@ builders: - shell: | set +x + [ ! -z "$WORKSPACE" ] && sudo rm -rf $WORKSPACE/results || true if [ "{repo}" = "_" ]; then image={container}:{tag} elif [ "{port}" = "None" ]; then @@ -354,6 +318,43 @@ - last-duration regex: ^xtesting-[a-z0-9]+-daily$ +- 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: + - git: + url: 'https://gerrit.opnfv.org/gerrit/functest-xtesting' + refspec: '+refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*' + branches: + - '{ref}' + - xtesting-dep: &xtesting-dep name: 'xtesting-containers' repo: '{repo}' -- cgit 1.2.3-korg