Gather macros used by jobs in same file 20/920/1
authorFatih Degirmenci <fdegir@gmail.com>
Tue, 9 Apr 2019 06:39:51 +0000 (08:39 +0200)
committerFatih Degirmenci <fdegir@gmail.com>
Tue, 9 Apr 2019 06:39:51 +0000 (08:39 +0200)
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 [new file with mode: 0644]
jjb/cloud-infra/cloud-infra-periodic-engine.yaml
jjb/cloud-infra/cloud-infra-verify-engine.yaml
jjb/cloud-infra/cloud-infra-verify-testfw.yaml

diff --git a/jjb/cloud-infra/cloud-infra-macros.yaml b/jjb/cloud-infra/cloud-infra-macros.yaml
new file mode 100644 (file)
index 0000000..d5df7fc
--- /dev/null
@@ -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:
index cbf2f14cd9dae32b24d3af542f93a1dc56a5ea85..253cc862162b4a3eec8f6556d28187a6b6abe1f9 100644 (file)
           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:
index 932d478d96405575ba773df949af3d51d288c531..ff36fae1a93055af281f298954e842fa0a68bebe 100644 (file)
           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:
index c4c26cdf25a4d997bcaf83624cfb9508bcd8c30c..fbad9e8b2dcbb45187eb4f321f89d181dae7394b 100644 (file)
           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: