154f2b1ad59cee087653fdc3f8b0628b1d87fa66
[infra/cicd.git] / jjb / metal3 / baremetal-operator / jjb-bmo-e2e.yaml
1 - project:
2     name: bmo
3     # Default "type" of job is "pull", as in pull request with the default set (all tests required in BMO PRs) the default trigger is then also for PR comments,
4     # and the default GINKGO_FOCUS is empty
5     type: pull
6     GINKGO_FOCUS: " "
7     triggers:
8     # Trigger the job based on comments on a GH pull request.
9     - github-pull-request:
10         admin-list:
11         - "{ci_github_admin_user}"
12         org-list: "{ci_github_whitelist_org}"
13         auth-id: "{ci_ghprb_auth_id}"
14         trigger-phrase: '((.|\n)*\s)?/{job_prefix}-{name}-e2e-test(\s(.|\n)*)?'
15         skip-build-phrase: '/skip-test'
16         only-trigger-phrase: True
17         github-hooks: True
18         permit-all: False
19         auto-close-on-fail: False
20         allow-whitelist-orgs-as-admins: True
21         white-list-target-branches:
22         - 'main'
23         - 'release-0.5'
24         status-context: "{job_prefix}-{name}-e2e-test"
25         success-status: "Passed"
26         failure-status: "Failed"
27         error-status: "Error"
28         cancel-builds-on-update: True
29
30     jobs:
31     - "{job_prefix}-{name}-e2e-test-{type}"
32     # This job runs the "optional" set, which currently includes only "upgrade" tests
33     - "{job_prefix}-{name}-e2e-test-{type}":
34         type: optional-pull
35         GINKGO_FOCUS: "upgrade"
36         triggers:
37         - github-pull-request:
38             admin-list:
39             - "{ci_github_admin_user}"
40             org-list: "{ci_github_whitelist_org}"
41             auth-id: "{ci_ghprb_auth_id}"
42             trigger-phrase: '((.|\n)*\s)?/{job_prefix}-{name}-e2e-optional-test(\s(.|\n)*)?'
43             skip-build-phrase: '/skip-test'
44             only-trigger-phrase: True
45             github-hooks: True
46             permit-all: False
47             auto-close-on-fail: False
48             allow-whitelist-orgs-as-admins: True
49             white-list-target-branches:
50             - 'main'
51             - 'release-0.5'
52             status-context: "{job_prefix}-{name}-e2e-optional-test"
53             success-status: "Passed"
54             failure-status: "Failed"
55             error-status: "Error"
56             cancel-builds-on-update: True
57     - "{job_prefix}-{name}-e2e-test-{type}":
58         type: periodic
59         triggers:
60         # Run at 02:45 (UTC) every day
61         - timed: "45 2 * * *"
62
63 - job-template:
64     name: "{job_prefix}-{name}-e2e-test-{type}"
65     project-type: pipeline
66     defaults: global
67     disabled: False
68     concurrent: True
69
70     parameters:
71     # Parameters set by Prow
72     - string:
73         name: BUILD_ID
74         description: 'Used by Prow when triggering jobs'
75     - string:
76         name: PROW_JOB_ID
77         description: 'Used by Prow when triggering jobs'
78     - string:
79         name: REPO_OWNER
80         description: 'Project github repo org name'
81     - string:
82         name: REPO_NAME
83         description: 'Project github repo name'
84     - string:
85         name: PULL_BASE_REF
86         default: 'main'
87         description: 'Ref name of the base branch'
88     - string:
89         name: PULL_PULL_SHA
90         description: 'Pull request head SHA'
91     # End of Prow parameters
92     - string:
93         name: GINKGO_FOCUS
94         default: '{GINKGO_FOCUS}'
95         description: 'The focus test to run'
96
97     properties:
98     - build-discarder:
99         days-to-keep: 30
100         num-to-keep: 300
101         artifact-days-to-keep: -1
102         artifact-num-to-keep: -1
103     - github:
104         url: https://github.com/metal3-io/baremetal-operator
105
106     triggers: "{triggers}"
107
108     pipeline-scm:
109       scm:
110       - git:
111           url: "{ci_github_repo}"
112           credentials-id: "{ci_github_jenkins_credentials_id}"
113           branches:
114           - "{branch|main}"
115           name: 'origin'
116           refspec: "+refs/heads/*:refs/remotes/origin/*"
117           wipe-workspace: True
118           honor-refspec: True
119           shallow-clone: False
120       script-path: "jenkins/jobs/bmo_e2e_tests.pipeline"
121       lightweight-checkout: False