TEST-INFRA: [ci-execution-time] Optimize CI setup by using a custom Docker image #2290

Closed
opened 2026-04-03 13:00:41 +00:00 by freemo · 2 comments
Owner

Metadata

  • Branch: chore/m8-ci-custom-docker-image
  • Commit Message: chore(ci): optimize CI setup by using a custom Docker image
  • Milestone: v3.8.0
  • Parent Epic: #1678

Background and Context

Each job in the CI pipeline repeats the same setup steps: installing Node.js, checking out the code, installing uv and nox, and caching uv packages. This adds unnecessary overhead to each job and can be optimized.

Analysis

The CI configuration file (.forgejo/workflows/ci.yml) shows that each job runs in a python:3.13-slim Docker image and then proceeds to install the same set of dependencies. This redundant setup process can be eliminated by using a custom Docker image with these dependencies pre-installed.

Expected Behavior

A custom Docker image is available that pre-installs all common CI dependencies (Python, Node.js, uv, nox, and other shared tooling), allowing each CI job to skip redundant setup steps and start executing meaningful work immediately.

Acceptance Criteria

  • A custom Docker image exists with Python, Node.js, uv, nox, and all other common CI dependencies pre-installed.
  • The CI pipeline uses the custom Docker image for all jobs.
  • Redundant per-job setup steps (Node.js install, uv install, nox install, uv cache setup) are removed from individual job definitions.
  • CI setup time per job is measurably reduced.
  • The change is documented.

Subtasks

  • Create a Dockerfile for a custom CI Docker image that includes Python 3.13, Node.js, uv, nox, and any other common CI dependencies.
  • Build and publish the custom Docker image to a container registry.
  • Modify .forgejo/workflows/ci.yml to use the custom Docker image for all jobs.
  • Remove the redundant setup steps (Node.js install, uv install, nox install, cache steps) from the individual jobs.
  • Verify all CI jobs pass with the new image.
  • Run nox (all default sessions), fix any errors.
  • Verify coverage >= 97% via nox -s coverage_report.

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A custom Docker image for the CI environment is created and available in the container registry.
  • The CI pipeline uses the custom Docker image for all jobs.
  • The setup time for each CI job is reduced.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • All nox stages pass.
  • Coverage >= 97%.

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

## Metadata - **Branch**: `chore/m8-ci-custom-docker-image` - **Commit Message**: `chore(ci): optimize CI setup by using a custom Docker image` - **Milestone**: v3.8.0 - **Parent Epic**: #1678 ## Background and Context Each job in the CI pipeline repeats the same setup steps: installing Node.js, checking out the code, installing `uv` and `nox`, and caching `uv` packages. This adds unnecessary overhead to each job and can be optimized. ## Analysis The CI configuration file (`.forgejo/workflows/ci.yml`) shows that each job runs in a `python:3.13-slim` Docker image and then proceeds to install the same set of dependencies. This redundant setup process can be eliminated by using a custom Docker image with these dependencies pre-installed. ## Expected Behavior A custom Docker image is available that pre-installs all common CI dependencies (Python, Node.js, `uv`, `nox`, and other shared tooling), allowing each CI job to skip redundant setup steps and start executing meaningful work immediately. ## Acceptance Criteria - A custom Docker image exists with Python, Node.js, `uv`, `nox`, and all other common CI dependencies pre-installed. - The CI pipeline uses the custom Docker image for all jobs. - Redundant per-job setup steps (Node.js install, `uv` install, `nox` install, `uv` cache setup) are removed from individual job definitions. - CI setup time per job is measurably reduced. - The change is documented. ## Subtasks - [ ] Create a `Dockerfile` for a custom CI Docker image that includes Python 3.13, Node.js, `uv`, `nox`, and any other common CI dependencies. - [ ] Build and publish the custom Docker image to a container registry. - [ ] Modify `.forgejo/workflows/ci.yml` to use the custom Docker image for all jobs. - [ ] Remove the redundant setup steps (Node.js install, `uv` install, `nox` install, cache steps) from the individual jobs. - [ ] Verify all CI jobs pass with the new image. - [ ] Run `nox` (all default sessions), fix any errors. - [ ] Verify coverage >= 97% via `nox -s coverage_report`. ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A custom Docker image for the CI environment is created and available in the container registry. - The CI pipeline uses the custom Docker image for all jobs. - The setup time for each CI job is reduced. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - All nox stages pass. - Coverage >= 97%. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: ca-new-issue-creator
freemo added this to the v3.8.0 milestone 2026-04-03 13:01:03 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Low (confirmed)
  • Milestone: v3.8.0 (confirmed — CI infrastructure)
  • MoSCoW: Could Have — Custom Docker image for CI is a setup optimization. Not blocking any deliverables.
  • Parent Epic: #1678 (confirmed correct)

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Low (confirmed) - **Milestone**: v3.8.0 (confirmed — CI infrastructure) - **MoSCoW**: Could Have — Custom Docker image for CI is a setup optimization. Not blocking any deliverables. - **Parent Epic**: #1678 (confirmed correct) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

Closing as duplicate of #2325.

This issue ("Optimize CI setup by using a custom Docker image") covers the same scope as #2325 ("Create a base CI image with pre-installed dependencies"). Consolidating to avoid duplicate work.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Closing as duplicate of #2325. This issue ("Optimize CI setup by using a custom Docker image") covers the same scope as #2325 ("Create a base CI image with pre-installed dependencies"). Consolidating to avoid duplicate work. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
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#2290
No description provided.