From 510e38e4a832afb96885f9d21156ef095519cd23 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Sat, 2 Sep 2017 23:11:36 +0200 Subject: [PATCH] installers: Use global macro 'clean-workspace' Change-Id: I34a555697d963efc38064a7b53f25191d6bf1382 Signed-off-by: Alexandru Avadanii --- jjb/apex/apex-workspace-cleanup.sh | 7 ------- jjb/apex/apex.yml | 9 +-------- jjb/apex/apex.yml.j2 | 9 +-------- jjb/compass4nfv/compass-project-jobs.yml | 3 +-- jjb/compass4nfv/compass-workspace-cleanup.sh | 7 ------- jjb/daisy4nfv/daisy-project-jobs.yml | 3 +-- jjb/daisy4nfv/daisy4nfv-merge-jobs.yml | 6 ++---- jjb/daisy4nfv/daisy4nfv-verify-jobs.yml | 3 +-- jjb/daisy4nfv/daisy4nfv-workspace-cleanup.sh | 16 ---------------- jjb/fuel/fuel-workspace-cleanup.sh | 15 --------------- jjb/global/releng-macros.yml | 10 ++++++++++ 11 files changed, 17 insertions(+), 71 deletions(-) delete mode 100755 jjb/apex/apex-workspace-cleanup.sh delete mode 100644 jjb/compass4nfv/compass-workspace-cleanup.sh delete mode 100755 jjb/daisy4nfv/daisy4nfv-workspace-cleanup.sh delete mode 100755 jjb/fuel/fuel-workspace-cleanup.sh diff --git a/jjb/apex/apex-workspace-cleanup.sh b/jjb/apex/apex-workspace-cleanup.sh deleted file mode 100755 index d2f71a562..000000000 --- a/jjb/apex/apex-workspace-cleanup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -set -o errexit -set -o nounset -set -o pipefail - -# delete everything that is in $WORKSPACE -sudo /bin/rm -rf $WORKSPACE diff --git a/jjb/apex/apex.yml b/jjb/apex/apex.yml index b794181e3..c71bee1d0 100644 --- a/jjb/apex/apex.yml +++ b/jjb/apex/apex.yml @@ -602,7 +602,7 @@ description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" - 'apex-download-artifact' - 'apex-deploy' - - 'apex-workspace-cleanup' + - 'clean-workspace' # Baremetal Deploy and Test @@ -1705,13 +1705,6 @@ - shell: !include-raw: ./apex-unit-test.sh -- builder: - name: 'apex-workspace-cleanup' - builders: - - shell: - !include-raw: ./apex-workspace-cleanup.sh - - - builder: name: 'apex-upload-artifact' builders: diff --git a/jjb/apex/apex.yml.j2 b/jjb/apex/apex.yml.j2 index 4e6452746..356c718d5 100644 --- a/jjb/apex/apex.yml.j2 +++ b/jjb/apex/apex.yml.j2 @@ -514,7 +514,7 @@ description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO" - 'apex-download-artifact' - 'apex-deploy' - - 'apex-workspace-cleanup' + - 'clean-workspace' # Baremetal Deploy and Test @@ -1132,13 +1132,6 @@ - shell: !include-raw: ./apex-unit-test.sh -- builder: - name: 'apex-workspace-cleanup' - builders: - - shell: - !include-raw: ./apex-workspace-cleanup.sh - - - builder: name: 'apex-upload-artifact' builders: diff --git a/jjb/compass4nfv/compass-project-jobs.yml b/jjb/compass4nfv/compass-project-jobs.yml index 691e76278..e612ef65f 100644 --- a/jjb/compass4nfv/compass-project-jobs.yml +++ b/jjb/compass4nfv/compass-project-jobs.yml @@ -64,8 +64,7 @@ !include-raw-escape: ./compass-build.sh - shell: !include-raw-escape: ./compass-upload-artifact.sh - - shell: - !include-raw-escape: ./compass-workspace-cleanup.sh + - 'clean-workspace' - job-template: name: 'compass-build-ppa-{stream}' diff --git a/jjb/compass4nfv/compass-workspace-cleanup.sh b/jjb/compass4nfv/compass-workspace-cleanup.sh deleted file mode 100644 index 98201af9b..000000000 --- a/jjb/compass4nfv/compass-workspace-cleanup.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash -set -o errexit -set -o nounset -set -o pipefail - -# delete everything that is in $WORKSPACE -/bin/rm -rf $WORKSPACE \ No newline at end of file diff --git a/jjb/daisy4nfv/daisy-project-jobs.yml b/jjb/daisy4nfv/daisy-project-jobs.yml index 09b0bc2e1..bcb89105e 100644 --- a/jjb/daisy4nfv/daisy-project-jobs.yml +++ b/jjb/daisy4nfv/daisy-project-jobs.yml @@ -185,8 +185,7 @@ !include-raw: ./daisy4nfv-build.sh - shell: !include-raw: ./daisy4nfv-upload-artifact.sh - - shell: - !include-raw: ./daisy4nfv-workspace-cleanup.sh + - 'clean-workspace' - builder: name: 'daisy-deploy-daily-macro' diff --git a/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml b/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml index f7a6c1363..97d830f9f 100644 --- a/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml +++ b/jjb/daisy4nfv/daisy4nfv-merge-jobs.yml @@ -192,8 +192,7 @@ !include-raw: ./daisy4nfv-build.sh - shell: !include-raw: ./daisy4nfv-upload-artifact.sh - - shell: - !include-raw: ./daisy4nfv-workspace-cleanup.sh + - 'clean-workspace' - builder: name: 'daisy-merge-deploy-virtual-macro' @@ -202,8 +201,7 @@ !include-raw: ./daisy4nfv-download-artifact.sh - shell: !include-raw: ./daisy-deploy.sh - - shell: - !include-raw: ./daisy4nfv-workspace-cleanup.sh + - 'clean-workspace' ##################################### # parameter macros diff --git a/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml b/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml index 6f6ab0fb0..1828ce459 100644 --- a/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml +++ b/jjb/daisy4nfv/daisy4nfv-verify-jobs.yml @@ -183,8 +183,7 @@ !include-raw: ./daisy4nfv-basic.sh - shell: !include-raw: ./daisy4nfv-build.sh - - shell: - !include-raw: ./daisy4nfv-workspace-cleanup.sh + - 'clean-workspace' - builder: name: daisy-verify-unit-macro diff --git a/jjb/daisy4nfv/daisy4nfv-workspace-cleanup.sh b/jjb/daisy4nfv/daisy4nfv-workspace-cleanup.sh deleted file mode 100755 index 26f7e9a01..000000000 --- a/jjb/daisy4nfv/daisy4nfv-workspace-cleanup.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -############################################################################## -# Copyright (c) 2016 ZTE Coreporation and others. -# hu.zhijiang@zte.com.cn -# sun.jing22@zte.com.cn -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## -set -o errexit -set -o nounset -set -o pipefail - -# delete the $WORKSPACE to open some space -/bin/rm -rf $WORKSPACE diff --git a/jjb/fuel/fuel-workspace-cleanup.sh b/jjb/fuel/fuel-workspace-cleanup.sh deleted file mode 100755 index d8948c7a0..000000000 --- a/jjb/fuel/fuel-workspace-cleanup.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -# SPDX-license-identifier: Apache-2.0 -############################################################################## -# Copyright (c) 2016 Ericsson AB and others. -# All rights reserved. This program and the accompanying materials -# are made available under the terms of the Apache License, Version 2.0 -# which accompanies this distribution, and is available at -# http://www.apache.org/licenses/LICENSE-2.0 -############################################################################## -set -o errexit -set -o nounset -set -o pipefail - -# delete the $WORKSPACE to open some space -/bin/rm -rf $WORKSPACE diff --git a/jjb/global/releng-macros.yml b/jjb/global/releng-macros.yml index 20b13b8be..59415f5ca 100644 --- a/jjb/global/releng-macros.yml +++ b/jjb/global/releng-macros.yml @@ -467,6 +467,16 @@ sed -r -i '4,$s/^/ /g' lint.log fi +- builder: + name: clean-workspace + builders: + - shell: | + #!/bin/bash + set -o errexit + set -o nounset + set -o pipefail + sudo /bin/rm -rf "$WORKSPACE" + - builder: name: clean-workspace-log builders: -- 2.16.6