set default values for PULL_PULL_SHA and PULL_BASE_REF to
[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,
4     # and the default GINKGO_FOCUS is empty (all tests required in BMO PRs)
5     type: pull
6     GINKGO_FOCUS: " "
7     # These jobs are triggered by prow for PRs (empty trigger here) or by timer (see below)
8     triggers: []
9
10     jobs:
11     - "{job_prefix}-{name}-e2e-test-{type}"
12     # This job runs the "optional" set, which currently includes only "upgrade" tests
13     - "{job_prefix}-{name}-e2e-test-{type}":
14         type: optional-pull
15         GINKGO_FOCUS: "upgrade"
16     - "{job_prefix}-{name}-e2e-test-{type}":
17         type: periodic
18         triggers:
19         # Run at 02:45 (UTC) every day
20         - timed: "45 2 * * *"
21     - "{job_prefix}-{name}-e2e-test-{type}":
22         type: optional-periodic
23         GINKGO_FOCUS: "upgrade"
24         triggers:
25         # Run at 03:45 (UTC) every day
26         - timed: "45 3 * * *"
27
28 - job-template:
29     name: "{job_prefix}-{name}-e2e-test-{type}"
30     project-type: pipeline
31     defaults: global
32     disabled: False
33     concurrent: True
34
35     parameters:
36     # Parameters set by Prow
37     - string:
38         name: BUILD_ID
39         description: 'Used by Prow when triggering jobs'
40     - string:
41         name: PROW_JOB_ID
42         description: 'Used by Prow when triggering jobs'
43     - string:
44         name: REPO_OWNER
45         description: 'Project github repo org name'
46     - string:
47         name: REPO_NAME
48         description: 'Project github repo name'
49     - string:
50         name: PULL_BASE_REF
51         default: 'main'
52         description: 'Ref name of the base branch'
53     - string:
54         name: PULL_PULL_SHA
55         description: 'Pull request head SHA'
56     # End of Prow parameters
57     - string:
58         name: GINKGO_FOCUS
59         default: '{GINKGO_FOCUS}'
60         description: 'The focus test to run'
61
62     properties:
63     - build-discarder:
64         days-to-keep: 30
65         num-to-keep: 300
66         artifact-days-to-keep: -1
67         artifact-num-to-keep: -1
68     - github:
69         url: https://github.com/metal3-io/baremetal-operator
70
71     triggers: "{triggers}"
72
73     pipeline-scm:
74       scm:
75       - git:
76           url: "{ci_github_repo}"
77           credentials-id: "{ci_github_jenkins_credentials_id}"
78           branches:
79           - "{branch|main}"
80           name: 'origin'
81           refspec: "+refs/heads/*:refs/remotes/origin/*"
82           wipe-workspace: True
83           honor-refspec: True
84           shallow-clone: False
85       script-path: "jenkins/jobs/bmo_e2e_tests.pipeline"
86       lightweight-checkout: False