Commit 7bf7056
committed
feat(aws-ami): add test result reporting to ami-build test-ami jobs
Mirrors the per-image-test report format used by the Azure / OCI /
GenericCloud / OpenNebula test workflows.
- Capture the full `/etc/almalinux-release` line (including code name)
and the rpm-reported system arch into `ALMA_RELEASE` / `SYSTEM_ARCH`
env vars during the existing Test AMI step. The original validation
greps (release prefix, AMI_ARCH match, dnf check-update) are
preserved verbatim.
- New `Get AMI Name` step fetches the AMI's Name tag via
`aws ec2 describe-images` so the report headline shows the canonical
AlmaLinux image name instead of a bare `ami-...` id. Falls back to
the AMI ID if the tag is empty.
- New `Job summary` step writes a Markdown block to
`$GITHUB_STEP_SUMMARY`:
## AMI Image Test
- **AMI Name**: `...`
- **AMI ID**: `ami-...`
- **Instance Type**: `t3.medium` / `t4g.medium`
- **AlmaLinux release**: `AlmaLinux release X.Y (Codename)`
- **System architecture**: `x86_64` / `aarch64`
- **Test**: passed ✅ / failed ❌
- New `Send notification to Mattermost` step pushes the same fields
through `mattermost/action-mattermost-notify@master`, gated on
`inputs.notify_mattermost && env.AMI_ID != ''`. Wiring matches the
existing build-ami job's Mattermost step
(`secrets.MATTERMOST_WEBHOOK_URL` / `vars.MATTERMOST_CHANNEL`).
All three new steps run under `if: always()`, so a failing test
(release grep, arch grep, or dnf check-update) still produces a
report with `failed ❌` and a Mattermost notification. The
passed/failed signal comes from `${{ job.status }}`, so it accurately
reflects what happened upstream in the same job.1 parent 699be3d commit 7bf7056
1 file changed
Lines changed: 58 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
241 | 247 | | |
242 | | - | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
243 | 253 | | |
244 | 254 | | |
245 | 255 | | |
| |||
249 | 259 | | |
250 | 260 | | |
251 | 261 | | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
0 commit comments