[AUTO-INF-6] CI Optimization: Use a Custom Docker Image to Speed Up Jobs #8069

Open
opened 2026-04-13 02:31:26 +00:00 by HAL9000 · 0 comments
Owner

Metadata

  • Commit message: chore(ci): use custom docker image to pre-install dependencies and tools
  • Branch name: chore/ci-custom-docker-image

Background and Context

Currently, each job in the CI pipeline (.forgejo/workflows/ci.yml) installs system dependencies (like nodejs, git, curl, tar) and tools (like Helm and Kubeconform) from scratch. This is done using apt-get update and apt-get install, and by downloading and installing tools from the internet. This process is repeated for almost every job, which is inefficient and adds significant time to the CI pipeline.

Expected Behavior

A custom Docker image exists that pre-installs all necessary system dependencies and tools. All CI jobs use this image as their base, eliminating repetitive setup steps. The CI pipeline runs faster and more reliably as a result.

Acceptance Criteria

  • A Dockerfile is created (e.g., at .forgejo/docker/Dockerfile) based on python:3.13-slim
  • The Dockerfile installs nodejs, git, curl, and tar via apt-get
  • The Dockerfile downloads and installs the specific versions of helm and kubeconform used in the pipeline
  • The image is pushed to a container registry (e.g., the Forgejo container registry at git.cleverthis.com)
  • All CI jobs in .forgejo/workflows/ci.yml are updated to use the custom image instead of python:3.13-slim
  • Repetitive apt-get install, Helm install, and Kubeconform install steps are removed from individual CI jobs
  • The CI pipeline passes end-to-end with the new image

Subtasks

  • Audit .forgejo/workflows/ci.yml to identify all jobs that install dependencies/tools
  • Identify the exact versions of helm and kubeconform currently used in the pipeline
  • Write the Dockerfile based on python:3.13-slim with all required dependencies pre-installed
  • Add a CI workflow (or job) to build and push the custom image to the Forgejo container registry
  • Update all affected CI jobs to reference the new custom image
  • Remove now-redundant installation steps from individual CI jobs
  • Test the updated pipeline end-to-end to confirm correctness and measure speed improvement
  • Document the custom image and update any relevant developer docs

Definition of Done

This issue should be closed when:

  • The custom Docker image is built, published, and in active use by all CI jobs
  • No CI job installs nodejs, git, curl, tar, helm, or kubeconform at runtime
  • The CI pipeline passes fully with the new image
  • The image build/push workflow is automated (triggered on Dockerfile changes)

Duplicate Check

  • Keyword search in open issues: Searched for docker, image, CI, pipeline, and dependency in open issues. No duplicates found.
  • Cross-area search for similar proposals: Searched all issues (open and closed) for the same keywords. No duplicates found.
  • Closed issues search: Searched closed issues for the same keywords. No duplicates found.
  • Include a ### Duplicate Check section in every issue body: This section is included.
  • If uncertain, do not file: I am confident this is a valid and non-duplicate proposal.

This issue was automatically generated by the test-infra-worker with session tag [AUTO-INF-6].


Automated by CleverAgents Bot
Agent: new-issue-creator

## Metadata - **Commit message:** `chore(ci): use custom docker image to pre-install dependencies and tools` - **Branch name:** `chore/ci-custom-docker-image` ## Background and Context Currently, each job in the CI pipeline (`.forgejo/workflows/ci.yml`) installs system dependencies (like `nodejs`, `git`, `curl`, `tar`) and tools (like Helm and Kubeconform) from scratch. This is done using `apt-get update` and `apt-get install`, and by downloading and installing tools from the internet. This process is repeated for almost every job, which is inefficient and adds significant time to the CI pipeline. ## Expected Behavior A custom Docker image exists that pre-installs all necessary system dependencies and tools. All CI jobs use this image as their base, eliminating repetitive setup steps. The CI pipeline runs faster and more reliably as a result. ## Acceptance Criteria - [ ] A `Dockerfile` is created (e.g., at `.forgejo/docker/Dockerfile`) based on `python:3.13-slim` - [ ] The Dockerfile installs `nodejs`, `git`, `curl`, and `tar` via `apt-get` - [ ] The Dockerfile downloads and installs the specific versions of `helm` and `kubeconform` used in the pipeline - [ ] The image is pushed to a container registry (e.g., the Forgejo container registry at `git.cleverthis.com`) - [ ] All CI jobs in `.forgejo/workflows/ci.yml` are updated to use the custom image instead of `python:3.13-slim` - [ ] Repetitive `apt-get install`, Helm install, and Kubeconform install steps are removed from individual CI jobs - [ ] The CI pipeline passes end-to-end with the new image ## Subtasks - [ ] Audit `.forgejo/workflows/ci.yml` to identify all jobs that install dependencies/tools - [ ] Identify the exact versions of `helm` and `kubeconform` currently used in the pipeline - [ ] Write the `Dockerfile` based on `python:3.13-slim` with all required dependencies pre-installed - [ ] Add a CI workflow (or job) to build and push the custom image to the Forgejo container registry - [ ] Update all affected CI jobs to reference the new custom image - [ ] Remove now-redundant installation steps from individual CI jobs - [ ] Test the updated pipeline end-to-end to confirm correctness and measure speed improvement - [ ] Document the custom image and update any relevant developer docs ## Definition of Done This issue should be closed when: - The custom Docker image is built, published, and in active use by all CI jobs - No CI job installs `nodejs`, `git`, `curl`, `tar`, `helm`, or `kubeconform` at runtime - The CI pipeline passes fully with the new image - The image build/push workflow is automated (triggered on Dockerfile changes) ### Duplicate Check - [x] **Keyword search in open issues:** Searched for `docker`, `image`, `CI`, `pipeline`, and `dependency` in open issues. No duplicates found. - [x] **Cross-area search for similar proposals:** Searched all issues (open and closed) for the same keywords. No duplicates found. - [x] **Closed issues search:** Searched closed issues for the same keywords. No duplicates found. - [x] **Include a `### Duplicate Check` section in every issue body:** This section is included. - [x] **If uncertain, do not file:** I am confident this is a valid and non-duplicate proposal. --- *This issue was automatically generated by the `test-infra-worker` with session tag `[AUTO-INF-6]`.* --- **Automated by CleverAgents Bot** Agent: new-issue-creator
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.

Dependencies

No dependencies set.

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