From 0c0e67aaf375e2e26e3cfa97037d628e4a96c122 Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Tue, 9 Apr 2019 08:39:51 +0200 Subject: [PATCH] Gather macros used by jobs in same file Nearly all the jobs use same macros so it is better to move them to a file to ease the handling of them. Change-Id: I46a9b1f7f1894b8994332f7dc42d7676043faf3b --- jjb/cloud-infra/cloud-infra-macros.yaml | 52 +++++++++++++++++++ .../cloud-infra-periodic-engine.yaml | 30 +---------- .../cloud-infra-verify-engine.yaml | 22 +------- .../cloud-infra-verify-testfw.yaml | 12 +---- 4 files changed, 55 insertions(+), 61 deletions(-) create mode 100644 jjb/cloud-infra/cloud-infra-macros.yaml diff --git a/jjb/cloud-infra/cloud-infra-macros.yaml b/jjb/cloud-infra/cloud-infra-macros.yaml new file mode 100644 index 000000000..d5df7fc3b --- /dev/null +++ b/jjb/cloud-infra/cloud-infra-macros.yaml @@ -0,0 +1,52 @@ +--- +# +# ============LICENSE_START======================================================= +# Copyright (C) 2019 Nordix Foundation. +# ================================================================================ +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# ============LICENSE_END========================================================= + +# macros used by all job types +- builder: + name: 'cloud-infra-deploy-macro' + builders: + - shell: + !include-raw: ./wait-for-pkg-manager.sh + - shell: + !include-raw: ./cloud-infra-deploy.sh + +- builder: + name: 'cloud-infra-functest-macro' + builders: + - shell: + !include-raw: ./prepare-for-test.sh + - shell: + !include-raw: ./cloud-infra-test.sh + +- builder: + name: 'cloud-infra-yardstick-macro' + builders: + - shell: + !include-raw: ./prepare-for-test.sh + - shell: + !include-raw: ./cloud-infra-test.sh + +- builder: + name: 'cloud-infra-testfw-macro' + builders: + - shell: + !include-raw: ./cloud-infra-test.sh + +# vim: set ts=2 sw=2 expandtab: diff --git a/jjb/cloud-infra/cloud-infra-periodic-engine.yaml b/jjb/cloud-infra/cloud-infra-periodic-engine.yaml index cbf2f14cd..253cc8621 100644 --- a/jjb/cloud-infra/cloud-infra-periodic-engine.yaml +++ b/jjb/cloud-infra/cloud-infra-periodic-engine.yaml @@ -267,34 +267,6 @@ refspec: '' builders: - - 'cloud-infra-periodic-{phase}-macro' - -# ------------------------------- -# builder macros -# ------------------------------- - -- builder: - name: 'cloud-infra-periodic-deploy-macro' - builders: - - shell: - !include-raw: ./wait-for-pkg-manager.sh - - shell: - !include-raw: ./cloud-infra-deploy.sh - -- builder: - name: 'cloud-infra-periodic-functest-macro' - builders: - - shell: - !include-raw: ./prepare-for-test.sh - - shell: - !include-raw: ./cloud-infra-test.sh - -- builder: - name: 'cloud-infra-periodic-yardstick-macro' - builders: - - shell: - !include-raw: ./prepare-for-test.sh - - shell: - !include-raw: ./cloud-infra-test.sh + - 'cloud-infra-{phase}-macro' # vim: set ts=2 sw=2 expandtab: diff --git a/jjb/cloud-infra/cloud-infra-verify-engine.yaml b/jjb/cloud-infra/cloud-infra-verify-engine.yaml index 932d478d9..ff36fae1a 100644 --- a/jjb/cloud-infra/cloud-infra-verify-engine.yaml +++ b/jjb/cloud-infra/cloud-infra-verify-engine.yaml @@ -274,26 +274,6 @@ refspec: $GERRIT_REFSPEC builders: - - 'cloud-infra-verify-{phase}-macro' - -# ------------------------------- -# builder macros -# ------------------------------- - -- builder: - name: 'cloud-infra-verify-deploy-macro' - builders: - - shell: - !include-raw: ./wait-for-pkg-manager.sh - - shell: - !include-raw: ./cloud-infra-deploy.sh - -- builder: - name: 'cloud-infra-verify-functest-macro' - builders: - - shell: - !include-raw: ./prepare-for-test.sh - - shell: - !include-raw: ./cloud-infra-test.sh + - 'cloud-infra-{phase}-macro' # vim: set ts=2 sw=2 expandtab: diff --git a/jjb/cloud-infra/cloud-infra-verify-testfw.yaml b/jjb/cloud-infra/cloud-infra-verify-testfw.yaml index c4c26cdf2..fbad9e8b2 100644 --- a/jjb/cloud-infra/cloud-infra-verify-testfw.yaml +++ b/jjb/cloud-infra/cloud-infra-verify-testfw.yaml @@ -225,16 +225,6 @@ refspec: $GERRIT_REFSPEC builders: - - 'cloud-infra-verify-testfw-macro' - -# ------------------------------- -# builder macros -# ------------------------------- - -- builder: - name: 'cloud-infra-verify-testfw-macro' - builders: - - shell: - !include-raw: ./cloud-infra-test.sh + - 'cloud-infra-testfw-macro' # vim: set ts=2 sw=2 expandtab: -- 2.25.1