metal3: parameterize image_os

This reduces the number of job templates by almost 2 since we now use
the same template for centos and ubuntu for each job.

Note that the status checks and trigger phrases change for all ubuntu
jobs! This is beacuse they used to have centos spelled out but ubuntu
omitted (e.g. test-v1b1-centos-integration and test-v1b1-integration).
Now ubuntu will also be spelled out: test-v1b1-ubuntu-integration.

Change-Id: I885483219da1ff41227f861d7b3570debf22f022
diff --git a/jjb/metal3/projects.yml b/jjb/metal3/projects.yml
index 070c399..db6a691 100644
--- a/jjb/metal3/projects.yml
+++ b/jjb/metal3/projects.yml
@@ -39,8 +39,10 @@
     - openstack_node_image_building
     - main_openstack_ipa_and_ironic_image_building
     - metal3_ipa_and_ironic_image_building_test
-    - metal3_dev_tools_integration_test_centos
-    - metal3_dev_tools_integration_test_ubuntu
+    - metal3_dev_tools_integration_test:
+        image_os:
+          - ubuntu
+          - centos
     - artifactory_cleanup
     repo:
       org: "Nordix"
@@ -61,18 +63,28 @@
         image_os:
           - ubuntu
           - centos
-    - capm3_v1a5_integration_tests_centos
-    - capm3_v1a5_integration_tests_ubuntu
-    - capm3_v1b1_integration_tests_centos
-    - capm3_v1b1_integration_tests_ubuntu
-    - feature_tests_ubuntu
-    - feature_tests_centos
+    - capm3_v1a5_integration_tests:
+        image_os:
+          - ubuntu
+          - centos
+    - capm3_v1b1_integration_tests:
+        image_os:
+          - ubuntu
+          - centos
+    - feature_tests:
+        image_os:
+          - ubuntu
+          - centos
     - feature_tests_upgrade_ubuntu
     - bml_integration_tests_centos
-    - keep_v1b1_test_ubuntu_alive
-    - keep_v1b1_test_centos_alive
-    - keep_v1a5_test_ubuntu_alive
-    - keep_v1a5_test_centos_alive
+    - keep_v1b1_test_alive:
+        image_os:
+          - ubuntu
+          - centos
+    - keep_v1a5_test_alive:
+        image_os:
+          - ubuntu
+          - centos
 
 - project:
     name: 'project_infra_cleanup'
@@ -93,15 +105,24 @@
         image_os:
           - ubuntu
           - centos
-    - capm3_v1a5_integration_tests_centos
-    - capm3_v1a5_integration_tests_ubuntu
-    - capm3_v1b1_integration_tests_centos
-    - capm3_v1b1_integration_tests_ubuntu
-    - keep_v1b1_test_ubuntu_alive
-    - keep_v1b1_test_centos_alive
-    - keep_v1a5_test_ubuntu_alive
-    - keep_v1a5_test_centos_alive
-    - feature_tests_ubuntu
+    - capm3_v1a5_integration_tests:
+        image_os:
+          - ubuntu
+          - centos
+    - capm3_v1b1_integration_tests:
+        image_os:
+          - ubuntu
+          - centos
+    - keep_v1b1_test_alive:
+        image_os:
+          - ubuntu
+          - centos
+    - keep_v1a5_test_alive:
+        image_os:
+          - ubuntu
+          - centos
+    - feature_tests:
+        image_os: ubuntu
 
 - project:
     name: "ipam"
@@ -113,48 +134,73 @@
         image_os:
           - ubuntu
           - centos
-    - capm3_v1a5_integration_tests_centos
-    - capm3_v1a5_integration_tests_ubuntu
-    - capm3_v1b1_integration_tests_centos
-    - capm3_v1b1_integration_tests_ubuntu
-    - keep_v1b1_test_ubuntu_alive
-    - keep_v1b1_test_centos_alive
-    - keep_v1a5_test_ubuntu_alive
-    - keep_v1a5_test_centos_alive
+    - capm3_v1a5_integration_tests:
+        image_os:
+          - ubuntu
+          - centos
+    - capm3_v1b1_integration_tests:
+        image_os:
+          - ubuntu
+          - centos
+    - keep_v1b1_test_alive:
+        image_os:
+          - ubuntu
+          - centos
+    - keep_v1a5_test_alive:
+        image_os:
+          - ubuntu
+          - centos
 
 - project:
     name: "metal3_dev_env"
+    repo:
+      org: "metal3-io"
+      name: "metal3-dev-env"
     jobs:
     - capm3_v1a4_integration_tests:
         image_os:
           - ubuntu
           - centos
-    - capm3_v1a4_main_integration_tests_centos
-    - capm3_v1a4_main_integration_tests_ubuntu
-    - capm3_v1a5_integration_tests_centos
-    - capm3_v1a5_integration_tests_ubuntu
-    - capm3_v1a5_main_integration_tests_centos
-    - capm3_v1a5_main_integration_tests_ubuntu
-    - capm3_v1b1_integration_tests_centos
-    - capm3_v1b1_integration_tests_ubuntu
-    - capm3_v1b1_main_integration_tests_centos
-    - capm3_v1b1_main_integration_tests_ubuntu
-    - feature_tests_ubuntu
-    - feature_tests_centos
+    - capm3_v1a4_main_integration_tests:
+        image_os:
+          - ubuntu
+          - centos
+    - capm3_v1a5_integration_tests:
+        image_os:
+          - ubuntu
+          - centos
+    - capm3_v1a5_main_integration_tests:
+        image_os:
+          - ubuntu
+          - centos
+    - capm3_v1b1_integration_tests:
+        image_os:
+          - ubuntu
+          - centos
+    - capm3_v1b1_main_integration_tests:
+        image_os:
+          - ubuntu
+          - centos
+    - feature_tests:
+        image_os:
+          - ubuntu
+          - centos
     - feature_tests_upgrade_ubuntu
-    - main_feature_tests_ubuntu
-    - main_feature_tests_centos
+    - main_feature_tests:
+        image_os:
+          - ubuntu
+          - centos
     - main_feature_tests_upgrade_ubuntu
     - bml_integration_tests_centos
     - bml_main_integration_tests_centos
-    - keep_v1b1_test_ubuntu_alive
-    - keep_v1b1_test_centos_alive
-    - keep_v1a5_test_ubuntu_alive
-    - keep_v1a5_test_centos_alive
-
-    repo:
-      org: "metal3-io"
-      name: "metal3-dev-env"
+    - keep_v1b1_test_alive:
+        image_os:
+          - ubuntu
+          - centos
+    - keep_v1a5_test_alive:
+        image_os:
+          - ubuntu
+          - centos
 
 - project:
     name: "capm3"
@@ -166,23 +212,39 @@
         image_os:
           - ubuntu
           - centos
-    - capm3_v1a5_integration_tests_centos
-    - capm3_v1a5_integration_tests_ubuntu
-    - capm3_v1a5_e2e_tests_ubuntu
-    - capm3_v1a5_e2e_tests_centos
-    - capm3_v1a5_main_e2e_tests_ubuntu
-    - capm3_v1a5_main_e2e_tests_centos
-    - capm3_v1b1_integration_tests_centos
-    - capm3_v1b1_integration_tests_ubuntu
-    - capm3_v1b1_e2e_tests_centos
-    - capm3_v1b1_e2e_tests_ubuntu
+    - capm3_v1a5_integration_tests:
+        image_os:
+          - ubuntu
+          - centos
+    - capm3_v1a5_e2e_tests:
+        image_os:
+          - ubuntu
+          - centos
+    - capm3_v1a5_main_e2e_tests:
+        image_os:
+          - ubuntu
+          - centos
+    - capm3_v1b1_integration_tests:
+        image_os:
+          - ubuntu
+          - centos
+    - capm3_v1b1_e2e_tests:
+        image_os:
+          - ubuntu
+          - centos
     - capm3_v1b1_e2e_upgrade_tests_ubuntu
-    - capm3_v1b1_main_e2e_tests_centos
-    - capm3_v1b1_main_e2e_tests_ubuntu
-    - keep_v1b1_test_ubuntu_alive
-    - keep_v1b1_test_centos_alive
-    - keep_v1a5_test_ubuntu_alive
-    - keep_v1a5_test_centos_alive
+    - capm3_v1b1_main_e2e_tests:
+        image_os:
+          - ubuntu
+          - centos
+    - keep_v1b1_test_alive:
+        image_os:
+          - ubuntu
+          - centos
+    - keep_v1a5_test_alive:
+        image_os:
+          - ubuntu
+          - centos
 
 
 - project:
@@ -195,14 +257,22 @@
         image_os:
           - ubuntu
           - centos
-    - capm3_v1a5_integration_tests_centos
-    - capm3_v1a5_integration_tests_ubuntu
-    - capm3_v1b1_integration_tests_centos
-    - capm3_v1b1_integration_tests_ubuntu
-    - keep_v1b1_test_ubuntu_alive
-    - keep_v1b1_test_centos_alive
-    - keep_v1a5_test_ubuntu_alive
-    - keep_v1a5_test_centos_alive
+    - capm3_v1a5_integration_tests:
+        image_os:
+          - ubuntu
+          - centos
+    - capm3_v1b1_integration_tests:
+        image_os:
+          - ubuntu
+          - centos
+    - keep_v1b1_test_alive:
+        image_os:
+          - ubuntu
+          - centos
+    - keep_v1a5_test_alive:
+        image_os:
+          - ubuntu
+          - centos
 
 - project:
     name: "ironic_ipa_downloader"
@@ -212,6 +282,9 @@
     jobs:
     - capm3_v1a4_integration_tests:
         image_os: ubuntu
-    - capm3_v1a5_integration_tests_ubuntu
-    - capm3_v1b1_integration_tests_centos
-    - capm3_v1b1_integration_tests_ubuntu
+    - capm3_v1a5_integration_tests:
+        image_os: ubuntu
+    - capm3_v1b1_integration_tests:
+        image_os:
+          - ubuntu
+          - centos