Metal3: Fix BMO e2e jobs 88/19488/1
authorLennart Jern <lennart.jern@est.tech>
Thu, 28 Sep 2023 08:16:15 +0000 (11:16 +0300)
committerLennart Jern <lennart.jern@est.tech>
Thu, 28 Sep 2023 08:16:15 +0000 (11:16 +0300)
- Fix github URL
- Change trigger phrase, name, status context to have dashes instead of
  underscores.
- Separate periodic and pull jobs to make it easy to filter.

Change-Id: I351f2cf51610a7109ace317d878226f370cbf6ce

jjb/metal3/baremetal-operator/jjb-bmo-e2e.yaml

index b431b956f2e73decb8f0148cb007f95e7c2e27cd..e8e8cd439a18bb5b3616cd4a016f7a2d9068718b 100644 (file)
@@ -1,34 +1,16 @@
 - project:
-    name: baremetal-operator
-
-    jobs:
-    - "{job_prefix}_{name}_e2e_tests"
-
-- job-template:
-    name: "{job_prefix}_{name}_e2e_tests"
-    project-type: pipeline
-    defaults: global
-    disabled: False
-    concurrent: True
-
-    properties:
-    - build-discarder:
-        days-to-keep: 30
-        num-to-keep: 300
-        artifact-days-to-keep: -1
-        artifact-num-to-keep: -1
-    - github:
-        url: https://github.com/metal3-io/baremetal-operator.git
-
+    name: bmo
+    # Default "type" of job is "pull", as in pull request
+    # and the default trigger is then also for PR comments.
+    type: pull
     triggers:
-    # Run at 02:45 (UTC) every day
-    - timed: "45 2 * * *"
+    # Trigger the job based on comments on a GH pull request.
     - github-pull-request:
         admin-list:
         - "{ci_github_admin_user}"
         org-list: "{ci_github_whitelist_org}"
         auth-id: "{ci_ghprb_auth_id}"
-        trigger-phrase: '((.|\n)*\s)?/{job_prefix}_{name}_e2e_tests(\s(.|\n)*)?'
+        trigger-phrase: '((.|\n)*\s)?/{job_prefix}-{name}-e2e-test(\s(.|\n)*)?'
         skip-build-phrase: '/skip-test'
         only-trigger-phrase: True
         github-hooks: True
         allow-whitelist-orgs-as-admins: True
         white-list-target-branches:
         - 'main'
-        status-context: "{job_prefix}_{name}_e2e_tests"
+        status-context: "{job_prefix}-{name}-e2e-test"
         success-status: "Passed"
         failure-status: "Failed"
         error-status: "Error"
         cancel-builds-on-update: True
 
+    jobs:
+    - "{job_prefix}-{name}-e2e-test-{type}"
+    - "{job_prefix}-{name}-e2e-test-{type}":
+        type: periodic
+        triggers:
+        # Run at 02:45 (UTC) every day
+        - timed: "45 2 * * *"
+
+- job-template:
+    name: "{job_prefix}-{name}-e2e-test-{type}"
+    project-type: pipeline
+    defaults: global
+    disabled: False
+    concurrent: True
+
+    properties:
+    - build-discarder:
+        days-to-keep: 30
+        num-to-keep: 300
+        artifact-days-to-keep: -1
+        artifact-num-to-keep: -1
+    - github:
+        url: https://github.com/metal3-io/baremetal-operator
+
+    triggers: "{triggers}"
+
     pipeline-scm:
       scm:
       - git: