TEST-INFRA: [ci-pipeline-design] Use Custom Docker Image with Pre-installed Dependencies in CI #6898

Open
opened 2026-04-10 04:58:24 +00:00 by HAL9000 · 0 comments
Owner

Metadata

  • Branch: feature/ci-custom-docker-base-image
  • Commit Message: ci(pipeline): use custom Docker base image with pre-installed dependencies
  • Milestone: (none — backlog, see note below)
  • Parent Epic: #5407

Summary

Multiple jobs in the CI pipeline (.forgejo/workflows/ci.yml) repeatedly install the same system-level dependencies (e.g., nodejs, git, curl, tar, helm, kubeconform) using apt-get. This adds unnecessary overhead to each job's execution time and can introduce flakiness if package repositories are unavailable.

Creating a custom Docker base image with these dependencies pre-installed would streamline the CI process, reduce job setup times, and improve the reliability of the pipeline.

Proposed Solution

  1. Create a new Dockerfile in the repository (e.g., in a .devcontainer or ci directory) that starts from a base image (e.g., python:3.13-slim) and installs all the required system dependencies.
  2. Build this Docker image and push it to a container registry (e.g., the Forgejo container registry).
  3. Update the .forgejo/workflows/ci.yml file to use this custom image as the container.image for the relevant jobs, removing the redundant apt-get install steps.

Acceptance Criteria

  • A Dockerfile for a custom CI base image is created and added to the repository.
  • The custom Docker image is built and available in a container registry.
  • CI jobs in ci.yml are updated to use the custom image.
  • The apt-get install commands for pre-installed dependencies are removed from the CI workflow.
  • Overall CI pipeline execution time is reduced.

Duplicate Check

  • Search queries used: "custom docker image", "pre-installed dependencies", "base image"
  • Number of results found for each query: 0
  • None of the existing issues cover this specific finding.

Subtasks

  • Audit .forgejo/workflows/ci.yml to identify all repeated apt-get install steps and the packages they install
  • Create a Dockerfile (e.g., ci/Dockerfile) based on python:3.13-slim with all required system dependencies pre-installed
  • Build and push the custom Docker image to the Forgejo container registry
  • Update relevant CI jobs in .forgejo/workflows/ci.yml to use container.image pointing to the custom image
  • Remove redundant apt-get install steps from updated CI jobs
  • Verify CI pipeline runs successfully end-to-end with the new custom image
  • Measure and document reduction in CI job setup time
  • Run nox (all default sessions), fix any errors
  • Verify coverage >= 97% via nox -s coverage_report

Definition of Done

  • A Dockerfile for the custom CI base image exists in the repository
  • The custom Docker image is built and published to a container registry
  • All relevant CI jobs in ci.yml use the custom image via container.image
  • All redundant apt-get install commands for pre-installed dependencies are removed from the CI workflow
  • CI pipeline executes successfully end-to-end with the new image
  • Overall CI pipeline execution time is measurably reduced
  • All nox stages pass
  • Coverage >= 97%

Backlog note: This issue was discovered during autonomous operation
on milestone Test Infrastructure. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.


Automated by CleverAgents Bot
Supervisor: Test Infrastructure | Agent: new-issue-creator

## Metadata - **Branch**: `feature/ci-custom-docker-base-image` - **Commit Message**: `ci(pipeline): use custom Docker base image with pre-installed dependencies` - **Milestone**: *(none — backlog, see note below)* - **Parent Epic**: #5407 ## Summary Multiple jobs in the CI pipeline (`.forgejo/workflows/ci.yml`) repeatedly install the same system-level dependencies (e.g., `nodejs`, `git`, `curl`, `tar`, `helm`, `kubeconform`) using `apt-get`. This adds unnecessary overhead to each job's execution time and can introduce flakiness if package repositories are unavailable. Creating a custom Docker base image with these dependencies pre-installed would streamline the CI process, reduce job setup times, and improve the reliability of the pipeline. ## Proposed Solution 1. Create a new `Dockerfile` in the repository (e.g., in a `.devcontainer` or `ci` directory) that starts from a base image (e.g., `python:3.13-slim`) and installs all the required system dependencies. 2. Build this Docker image and push it to a container registry (e.g., the Forgejo container registry). 3. Update the `.forgejo/workflows/ci.yml` file to use this custom image as the `container.image` for the relevant jobs, removing the redundant `apt-get install` steps. ## Acceptance Criteria - A `Dockerfile` for a custom CI base image is created and added to the repository. - The custom Docker image is built and available in a container registry. - CI jobs in `ci.yml` are updated to use the custom image. - The `apt-get install` commands for pre-installed dependencies are removed from the CI workflow. - Overall CI pipeline execution time is reduced. ### Duplicate Check - Search queries used: "custom docker image", "pre-installed dependencies", "base image" - Number of results found for each query: 0 - None of the existing issues cover this specific finding. ## Subtasks - [ ] Audit `.forgejo/workflows/ci.yml` to identify all repeated `apt-get install` steps and the packages they install - [ ] Create a `Dockerfile` (e.g., `ci/Dockerfile`) based on `python:3.13-slim` with all required system dependencies pre-installed - [ ] Build and push the custom Docker image to the Forgejo container registry - [ ] Update relevant CI jobs in `.forgejo/workflows/ci.yml` to use `container.image` pointing to the custom image - [ ] Remove redundant `apt-get install` steps from updated CI jobs - [ ] Verify CI pipeline runs successfully end-to-end with the new custom image - [ ] Measure and document reduction in CI job setup time - [ ] Run `nox` (all default sessions), fix any errors - [ ] Verify coverage >= 97% via `nox -s coverage_report` ## Definition of Done - [ ] A `Dockerfile` for the custom CI base image exists in the repository - [ ] The custom Docker image is built and published to a container registry - [ ] All relevant CI jobs in `ci.yml` use the custom image via `container.image` - [ ] All redundant `apt-get install` commands for pre-installed dependencies are removed from the CI workflow - [ ] CI pipeline executes successfully end-to-end with the new image - [ ] Overall CI pipeline execution time is measurably reduced - [ ] All nox stages pass - [ ] Coverage >= 97% > **Backlog note:** This issue was discovered during autonomous operation > on milestone Test Infrastructure. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: new-issue-creator
HAL9000 self-assigned this 2026-04-10 06:16:34 +00:00
HAL9000 added this to the v3.5.0 milestone 2026-04-10 06:16:34 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#6898
No description provided.