Merge "add kubernetes upgrade tests for releases"
diff --git a/jjb/metal3/job_capm3_e2e_k8s_upgrade_tests.yml b/jjb/metal3/job_capm3_e2e_k8s_upgrade_tests.yml
index 7bc5fc8..13f418d 100644
--- a/jjb/metal3/job_capm3_e2e_k8s_upgrade_tests.yml
+++ b/jjb/metal3/job_capm3_e2e_k8s_upgrade_tests.yml
@@ -26,7 +26,7 @@
 
 - job-template:
     id: capm3_e2e_k8s_upgrade_tests
-    name: '{job_prefix}_{proj}_main_e2e_{k8s_versions}_upgrade_test_{image_os}'
+    name: '{job_prefix}_{proj}_{capm3_target_branch}_e2e_{k8s_versions}_upgrade_test_{image_os}'
     description: "CAPM3 e2e k8s upgrade tests for {org}/{repo} on {image_os}."
     project-type: pipeline
     defaults: global
@@ -59,7 +59,7 @@
         description: 'Distribution to use for the target host as well as source and target cluster. Can be ubuntu or centos'
     - string:
         name: capm3_release_branch
-        default: 'main'
+        default: '{capm3_release_branch}'
         description: 'The target branch of CAPM3 to be used for this test'
     - string:
         name: CAPI_VERSION
@@ -106,16 +106,15 @@
         org-list: "{ci_github_whitelist_org}"
         cron: 'H/5 * * * *'
         auth-id: "{ci_ghprb_auth_id}"
-        trigger-phrase: '((.|\n)*\s)?/test-e2e-{k8s_versions}-upgrade-main(\s(.|\n)*)?'
+        trigger-phrase: '((.|\n)*\s)?/test-e2e-{k8s_versions}-upgrade-{capm3_target_branch}(\s(.|\n)*)?'
         skip-build-phrase: '/skip-test'
         only-trigger-phrase: True
         github-hooks: True
         permit-all: False
         auto-close-on-fail: False
         allow-whitelist-orgs-as-admins: True
-        white-list-target-branches:
-          - 'main'
-        status-context: "test-e2e-{k8s_versions}-upgrade-main"
+        white-list-target-branches: "{target_branches}"
+        status-context: "test-e2e-{k8s_versions}-upgrade-{capm3_target_branch}"
         success-status: "Passed"
         failure-status: "Failed"
         error-status: "Error"
diff --git a/jjb/metal3/job_capm3_main_e2e_k8s_upgrade_tests.yml b/jjb/metal3/job_capm3_main_e2e_k8s_upgrade_tests.yml
index eb7c1e3..c3518fb 100644
--- a/jjb/metal3/job_capm3_main_e2e_k8s_upgrade_tests.yml
+++ b/jjb/metal3/job_capm3_main_e2e_k8s_upgrade_tests.yml
@@ -26,7 +26,7 @@
 
 - job-template:
     id: capm3_main_e2e_k8s_upgrade_tests
-    name: '{job_prefix}_daily_main_e2e_{k8s_versions}_upgrade_test_{image_os}'
+    name: '{job_prefix}_daily_{capm3_target_branch}_e2e_{k8s_versions}_upgrade_test_{image_os}'
     description: "CAPM3 e2e k8s upgrade tests for {repo[org]}/{repo[name]} on ubuntu."
     project-type: pipeline
     defaults: global
@@ -59,7 +59,7 @@
         description: 'Distribution to use for the target host as well as source and target cluster. Can be ubuntu or centos'
     - string:
         name: capm3_release_branch
-        default: 'main'
+        default: '{capm3_release_branch}'
         description: 'The target branch of CAPM3 to be used for this test'
     - string:
         name: CAPI_VERSION
diff --git a/jjb/metal3/job_keep_capm3_e2e_k8s_upgrade_tests.yml b/jjb/metal3/job_keep_capm3_e2e_k8s_upgrade_tests.yml
index c88c0a7..34293df 100644
--- a/jjb/metal3/job_keep_capm3_e2e_k8s_upgrade_tests.yml
+++ b/jjb/metal3/job_keep_capm3_e2e_k8s_upgrade_tests.yml
@@ -26,7 +26,7 @@
 
 - job-template:
     id: keep_capm3_e2e_k8s_upgrade_tests
-    name: '{job_prefix}_keep_{proj}_main_e2e_{k8s_versions}_upgrade_test_{image_os}'
+    name: '{job_prefix}_keep_{proj}_{capm3_target_branch}_e2e_{k8s_versions}_upgrade_test_{image_os}'
     description: "Keep CAPM3 e2e k8s upgrade tests for {org}/{repo} on {image_os}."
     project-type: pipeline
     defaults: global
@@ -59,7 +59,7 @@
         description: 'Distribution to use for the target host as well as source and target cluster. Can be ubuntu or centos'
     - string:
         name: capm3_release_branch
-        default: 'main'
+        default: '{capm3_release_branch}'
         description: 'The target branch of CAPM3 to be used for this test'
     - string:
         name: CAPI_VERSION
@@ -117,8 +117,7 @@
         permit-all: False
         auto-close-on-fail: False
         allow-whitelist-orgs-as-admins: True
-        white-list-target-branches:
-          - 'main'
+        white-list-target-branches: "{target_branches}"
         status-context: "keep-test-e2e-{k8s_versions}-upgrade-main"
         success-status: "Passed"
         failure-status: "Failed"
diff --git a/jjb/metal3/projects.yml b/jjb/metal3/projects.yml
index bd2d978..437e25a 100644
--- a/jjb/metal3/projects.yml
+++ b/jjb/metal3/projects.yml
@@ -241,31 +241,6 @@
     image_os:
       - ubuntu
       - centos
-    capm3_target_branch:
-      - main:
-          capi_version: v1beta1
-          capm3_version: v1beta1
-          capm3_release_branch: main
-          target_branches:
-            - 'main'
-      - release-1-4:
-          capi_version: v1beta1
-          capm3_version: v1beta1
-          capm3_release_branch: release-1.4
-          target_branches:
-            - 'release-1.4'
-      - release-1-3:
-          capi_version: v1beta1
-          capm3_version: v1beta1
-          capm3_release_branch: release-1.3
-          target_branches:
-            - 'release-1.3'
-      - release-1-2:
-          capi_version: v1beta1
-          capm3_version: v1beta1
-          capm3_release_branch: release-1.2
-          target_branches:
-            - 'release-1.2'
     jobs:
       - capm3_e2e_clusterctl_upgrade_tests:
           upgrade_from_release:
@@ -284,6 +259,45 @@
             - 1-26-1-27:
                 k8s_version_upgrade_from: v1.26.4
                 k8s_version_upgrade_to: v1.27.1
+                capm3_release_branch: main
+                capm3_target_branch: main
+                target_branches:
+                  - 'main'
+            - 1-25-1-26:
+                k8s_version_upgrade_from: v1.25.5
+                k8s_version_upgrade_to: v1.26.4
+                capm3_release_branch: main
+                capm3_target_branch: main
+                target_branches:
+                  - 'main'
+            - 1-24-1-25:
+                k8s_version_upgrade_from: v1.24.9
+                k8s_version_upgrade_to: v1.25.5
+                capm3_release_branch: main
+                capm3_target_branch: main
+                target_branches:
+                  - 'main'
+            - 1-26-1-27:
+                k8s_version_upgrade_from: v1.26.4
+                k8s_version_upgrade_to: v1.27.1
+                capm3_release_branch: release-1.4
+                capm3_target_branch: release-1-4
+                target_branches:
+                  - 'release-1.4'
+            - 1-25-1-26:
+                k8s_version_upgrade_from: v1.25.5
+                k8s_version_upgrade_to: v1.26.4
+                capm3_release_branch: release-1.3
+                capm3_target_branch: release-1-3
+                target_branches:
+                  - 'release-1.3'
+            - 1-25-1-26:
+                k8s_version_upgrade_from: v1.25.5
+                k8s_version_upgrade_to: v1.26.4
+                capm3_release_branch: release-1.2
+                capm3_target_branch: release-1-2
+                target_branches:
+                  - 'release-1.2'
           exclude:
               - image_os: centos
       - capm3_e2e_integration_tests:
@@ -302,6 +316,31 @@
                   - 'main'
                   - 'release-1.4'
       - capm3_e2e_feature_tests:
+          capm3_target_branch:
+            - main:
+                capi_version: v1beta1
+                capm3_version: v1beta1
+                capm3_release_branch: main
+                target_branches:
+                  - 'main'
+            - release-1-4:
+                capi_version: v1beta1
+                capm3_version: v1beta1
+                capm3_release_branch: release-1.4
+                target_branches:
+                  - 'release-1.4'
+            - release-1-3:
+                capi_version: v1beta1
+                capm3_version: v1beta1
+                capm3_release_branch: release-1.3
+                target_branches:
+                  - 'release-1.3'
+            - release-1-2:
+                capi_version: v1beta1
+                capm3_version: v1beta1
+                capm3_release_branch: release-1.2
+                target_branches:
+                  - 'release-1.2'
       - keep_capm3_e2e_integration_tests:
           capm3_target_branch:
             - main:
@@ -318,6 +357,31 @@
                   - 'main'
                   - 'release-1.4'
       - keep_capm3_e2e_feature_tests:
+          capm3_target_branch:
+            - main:
+                capi_version: v1beta1
+                capm3_version: v1beta1
+                capm3_release_branch: main
+                target_branches:
+                  - 'main'
+            - release-1-4:
+                capi_version: v1beta1
+                capm3_version: v1beta1
+                capm3_release_branch: release-1.4
+                target_branches:
+                  - 'release-1.4'
+            - release-1-3:
+                capi_version: v1beta1
+                capm3_version: v1beta1
+                capm3_release_branch: release-1.3
+                target_branches:
+                  - 'release-1.3'
+            - release-1-2:
+                capi_version: v1beta1
+                capm3_version: v1beta1
+                capm3_release_branch: release-1.2
+                target_branches:
+                  - 'release-1.2'
       - keep_capm3_e2e_clusterctl_upgrade_tests:
           upgrade_from_release:
             - from-release-1-4:
@@ -335,6 +399,45 @@
             - 1-26-1-27:
                 k8s_version_upgrade_from: v1.26.4
                 k8s_version_upgrade_to: v1.27.1
+                capm3_release_branch: main
+                capm3_target_branch: main
+                target_branches:
+                  - 'main'
+            - 1-25-1-26:
+                k8s_version_upgrade_from: v1.25.5
+                k8s_version_upgrade_to: v1.26.4
+                capm3_release_branch: main
+                capm3_target_branch: main
+                target_branches:
+                  - 'main'
+            - 1-24-1-25:
+                k8s_version_upgrade_from: v1.24.9
+                k8s_version_upgrade_to: v1.25.5
+                capm3_release_branch: main
+                capm3_target_branch: main
+                target_branches:
+                  - 'main'
+            - 1-26-1-27:
+                k8s_version_upgrade_from: v1.26.4
+                k8s_version_upgrade_to: v1.27.1
+                capm3_release_branch: release-1.4
+                capm3_target_branch: release-1-4
+                target_branches:
+                  - 'release-1.4'
+            - 1-25-1-26:
+                k8s_version_upgrade_from: v1.25.5
+                k8s_version_upgrade_to: v1.26.4
+                capm3_release_branch: release-1.3
+                capm3_target_branch: release-1-3
+                target_branches:
+                  - 'release-1.3'
+            - 1-25-1-26:
+                k8s_version_upgrade_from: v1.25.5
+                k8s_version_upgrade_to: v1.26.4
+                capm3_release_branch: release-1.2
+                capm3_target_branch: release-1-2
+                target_branches:
+                  - 'release-1.2'
           exclude:
             - image_os: centos
 
@@ -364,6 +467,33 @@
             - 1-26-1-27:
                 k8s_version_upgrade_from: v1.26.4
                 k8s_version_upgrade_to: v1.27.1
+                capm3_release_branch: main
+                capm3_target_branch: main
+            - 1-25-1-26:
+                k8s_version_upgrade_from: v1.25.5
+                k8s_version_upgrade_to: v1.26.4
+                capm3_release_branch: main
+                capm3_target_branch: main
+            - 1-24-1-25:
+                k8s_version_upgrade_from: v1.24.9
+                k8s_version_upgrade_to: v1.25.5
+                capm3_release_branch: main
+                capm3_target_branch: main
+            - 1-26-1-27:
+                k8s_version_upgrade_from: v1.26.4
+                k8s_version_upgrade_to: v1.27.1
+                capm3_release_branch: release-1.4
+                capm3_target_branch: release-1-4
+            - 1-25-1-26:
+                k8s_version_upgrade_from: v1.25.5
+                k8s_version_upgrade_to: v1.26.4
+                capm3_release_branch: release-1.3
+                capm3_target_branch: release-1-3
+            - 1-25-1-26:
+                k8s_version_upgrade_from: v1.25.5
+                k8s_version_upgrade_to: v1.26.4
+                capm3_release_branch: release-1.2
+                capm3_target_branch: release-1-2
           exclude:
               - image_os: centos
       - capm3_main_e2e_ephemeral_tests: