|
1 |
| -This Dockerfile creates an image to be used by the IBM Cloud pipelines |
| 1 | +# RHDH e2e Runner - OpenShift CI Integration |
2 | 2 |
|
3 |
| -Currently this image is built by hand at intervals and pushed to https://quay.io/repository/rhdh-community/rhdh-e2e-runner?tab=tags when in need of an update. |
| 3 | +## Overview |
| 4 | +The `rhdh-e2e-runner` is a container image used in **OpenShift CI**, where it is deployed via a **mirror** that fetches the image from the Quay repository. |
4 | 5 |
|
5 |
| -``` |
6 |
| -SHA="$(git rev-parse --short=8 HEAD)" |
7 |
| -# main or release-1.y |
8 |
| -branch="$(git rev-parse --abbrev-ref HEAD)" |
9 |
| -image="quay.io/rhdh-community/rhdh-e2e-runner:${branch}" |
| 6 | +## Workflow for Updating the Image |
10 | 7 |
|
11 |
| -# build and push |
12 |
| -podman build . -f Dockerfile -t "${image}-${SHA}" && podman push "${image}-${SHA}" |
| 8 | +### **Main Branch Workflow** |
| 9 | +For changes to the image in `.ibm/images/Dockerfile`, follow these steps: |
| 10 | +1. **Perform a Local Test:** |
| 11 | + - Before updating the `Dockerfile`, perform a local test by running the e2e tests to ensure the changes are stable. |
13 | 12 |
|
14 |
| -# update the floating (branch-named) tag too |
15 |
| -skopeo --insecure-policy copy --all docker://${image}-${SHA} docker://${image} |
16 |
| -``` |
| 13 | +2. **Update the Dockerfile:** |
| 14 | + - Once validated, update `.ibm/images/Dockerfile` with the required changes. |
17 | 15 |
|
18 |
| -In future this might be automated so that if the contents of this folder changes, a new image is pushed automatically. |
| 16 | +3. **GitHub Actions Build & Push:** |
| 17 | + - The **GitHub Actions workflow** automatically builds and pushes the updated image to **Quay.io**. |
| 18 | + - This only happens **after all tests are completed successfully**. |
19 | 19 |
|
20 |
| -See also: |
| 20 | +4. **Propagation to OpenShift CI Mirror:** |
| 21 | + - After the image is pushed to Quay, OpenShift CI **does not** immediately use the new image. |
| 22 | + - There is a delay while OpenShift updates its **mirror** with the new version. |
21 | 23 |
|
22 |
| -* https://quay.io/repository/rhdh-community/rhdh-e2e-runner?tab=info |
23 |
| -* https://issues.redhat.com/browse/RHIDP-6244 |
| 24 | +5. **Merge to Main Branch:** |
| 25 | + - The image update process happens **before merging into `main`**. |
| 26 | + - Ensure that the updated image has been successfully used in e2e tests before merging. |
| 27 | + |
| 28 | +### **Other Branches Workflow** |
| 29 | +For branches **other than `main`**, OpenShift CI does **not** fetch from Quay: |
| 30 | +- Instead, **OpenShift CI builds the image directly** from `.ibm/images/Dockerfile`. |
| 31 | +- Any changes made to the file will **immediately reflect** in the test execution. |
| 32 | +- There is no need to wait for an image update in the mirror. |
| 33 | + |
| 34 | +## Key Considerations |
| 35 | +- **Local testing is mandatory** before making any modifications. |
| 36 | +- **GitHub Actions automates the push process** only for `main` branch updates. |
| 37 | +- **OpenShift CI mirror has a delay** in updating the image after it is pushed to Quay. |
| 38 | +- **Other branches build the image directly**, so changes take effect immediately. |
0 commit comments