Skip to content

Commit 9ed17e2

Browse files
HYPERFLEET-488 - test: Add hyperfleet e2e CI job doc
1 parent 754e0d1 commit 9ed17e2

File tree

1 file changed

+165
-0
lines changed

1 file changed

+165
-0
lines changed
Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
# Add Hyperfleet E2E CI Job in Prow
2+
3+
4+
**Metadata**
5+
- **Date:** 2026-01-27
6+
- **Authors:** Ying Zhang
7+
8+
9+
## Overview
10+
11+
This document provides a comprehensive guide for adding and managing Hyperfleet Continuous Integration (CI) jobs in Prow. It covers job configuration, step registry setup, monitoring, triggering, and debugging procedures specific to HyperFleet E2E CI test workflows.
12+
13+
## Implementation Steps
14+
15+
### Job Configuration
16+
17+
#### Init the job configuration in Prow
18+
19+
For detailed instructions on initializing job configuration in Prow, please refer to the [Initial Setup](add-job-configuration-in-prow.md#initial-setup) section.
20+
21+
#### Adding Step Registry Content
22+
23+
According to the description in the [Test Step Registry](add-job-configuration-in-prow.md#test-step-registry) section, it needs to add the following files.
24+
25+
For the Hyperfleet E2E test, create a new folder **e2e** under [openshift-hyperfleet](https://github.com/openshift/release/tree/master/ci-operator/step-registry/openshift-hyperfleet). The step files should be:
26+
```text
27+
- openshift-hyperfleet-e2e-commands.sh
28+
- openshift-hyperfleet-e2e-ref.yaml
29+
- openshift-hyperfleet-e2e-ref.metadata.json
30+
- OWNERS
31+
```
32+
33+
#### Step Parameters Configuration
34+
35+
**openshift-hyperfleet-e2e-ref.yaml**
36+
- Declaring step parameters: More detailed usage can refer to the [official doc](https://docs.ci.openshift.org/docs/architecture/step-registry/#declaring-step-parameters)
37+
- Credentials config: The secret has been added according to the [doc](prow-vault-access-management.md). For CI job, it requires gcloud credential to get the GKE cluster credential to deploy. We prepared a SA **hyperfleet-e2e** for it and store the credential under hyperfleet-e2e folder in Vault, so please don't delete it.
38+
- Image: **hyperfleet-e2e** that is built from [Dockerfile](https://github.com/openshift/release/blob/master/ci-operator/config/openshift-hyperfleet/hyperfleet-e2e/openshift-hyperfleet-hyperfleet-e2e-main__e2e.yaml)
39+
40+
```yaml
41+
ref:
42+
as: openshift-hyperfleet-e2e
43+
from: hyperfleet-e2e
44+
grace_period: 10m
45+
commands: openshift-hyperfleet-e2e-commands.sh
46+
resources:
47+
requests:
48+
cpu: 100m
49+
memory: 300Mi
50+
timeout: 1h0m0s
51+
env:
52+
- name: # environment variable name
53+
default: # (optional) the value assigned if none is provided
54+
documentation: # (optional) a textual description of the parameter. Markdown supported.
55+
credentials:
56+
- collection: ""
57+
namespace: test-credentials
58+
name: hyperfleet-e2e
59+
mount_path: /var/run/hyperfleet-e2e
60+
```
61+
62+
**openshift-hyperfleet-e2e-commands.sh**
63+
- Define the shell script for the job. It depends on different business logic.
64+
- In above step, it mounts the volume for credential. And the hcm-hyperfleet-e2e.json secret has been added in Vault, so it can get the value directly in the shell script
65+
66+
```bash
67+
<Other steps>
68+
# HYPERFLEET_E2E_PATH is defined in above environment variable
69+
GCP_CREDENTIALS_FILE="${HYPERFLEET_E2E_PATH}/hcm-hyperfleet-e2e.json"
70+
71+
```
72+
73+
**openshift-hyperfleet-e2e-ref.metadata.json**
74+
- Store the owners and path
75+
76+
```json
77+
{
78+
"path": "openshift-hyperfleet/e2e/openshift-hyperfleet-e2e-ref.yaml",
79+
"owners": {
80+
"approvers": [
81+
"..."
82+
],
83+
"reviewers": [
84+
"..."
85+
]
86+
}
87+
}
88+
```
89+
90+
### Job URLs and Monitoring
91+
92+
#### Finding Running Jobs
93+
94+
To find and monitor running jobs on Prow:
95+
1. Navigate to the [Prow dashboard](https://prow.ci.openshift.org/).
96+
2. Use the filter bar to search for specific jobs:
97+
- By job name: `*-hyperfleet-hyperfleet-e2e-main-e2e-*`
98+
- By status: Add `&state=pending` or `&state=success` or `&state=failure` to the URL
99+
3. Click on any job to view detailed logs and execution information
100+
101+
### Triggering Jobs
102+
103+
#### Manual Trigger in Prow Dashboard
104+
105+
According to the above step, find the job, then click the button under **Rerun** to trigger the job.
106+
107+
#### Manual Trigger in a PR via GitHub Comment
108+
109+
If you want to add some new code for the CI workflow, you can prepare a PR and trigger the job in the PR with the changed code via comment:
110+
111+
```text
112+
/pj-rehearse <job_name>
113+
```
114+
115+
### Creating Additional Jobs
116+
117+
To add another job based on the existing CLM CI job:
118+
119+
1. **Copy the existing job configuration**: Update the following:
120+
```yaml
121+
- as: hyperfleet-e2e-nightly # job name
122+
cron: 30 9 * * * # cron time
123+
steps:
124+
env:
125+
<key>: <value>
126+
test:
127+
- ref: openshift-hyperfleet-e2e # step/chain/workflow name
128+
```
129+
130+
2. **Modify the job name and parameters**
131+
- Update the `as` field
132+
- Adjust `cron` schedule (for periodic jobs)
133+
- Modify environment variables as needed
134+
- Update step registry references if different
135+
136+
3. **Add the new job**
137+
138+
Run the command to generate and update the job configuration:
139+
```bash
140+
make jobs
141+
```
142+
143+
4. **Submit a PR with the new job configuration**
144+
145+
### Debugging
146+
147+
#### Viewing Job Logs
148+
149+
1. Follow the [Finding Running Jobs](#finding-running-jobs) steps to locate the job
150+
2. Click the job link to jump to the detailed job page
151+
3. Click **Artifacts** to jump to the log page
152+
4. Navigate to the folder: **artifacts/hyperfleet-e2e-nightly/openshift-hyperfleet-e2e/**
153+
5. You can find the detailed logs under the **artifacts** folder
154+
155+
156+
## CI Jobs Example PRs
157+
158+
- Initial CI jobs structure: [PR #73127](https://github.com/openshift/release/pull/73127)
159+
- Added hyperfleet-e2e test steps to CI Prow job: [PR #73973](https://github.com/openshift/release/pull/73973)
160+
161+
## References
162+
163+
- [Prow Documentation](https://docs.ci.openshift.org/)
164+
- [Step Registry Documentation](https://docs.ci.openshift.org/docs/architecture/step-registry/)
165+
- [OpenShift HyperFleet Repository](https://github.com/openshift/release/tree/master/ci-operator/step-registry/openshift-hyperfleet)

0 commit comments

Comments
 (0)