Optimize CI pipeline: use base image and parallelize steps #69

Closed
opened 2026-06-04 00:57:58 +00:00 by ldraney · 0 comments
Owner

Type

Feature

Lineage

Standalone — identified during deploy monitoring session analyzing pipeline bottlenecks.

Repo

ldraney/landscaping-assistant

User Story

As a developer
I want the CI pipeline to use pre-built base images and run steps in parallel
So that pipeline duration is significantly reduced and I get feedback faster

Context

Current CI pipeline installs the full Ruby toolchain from scratch on every run. Both lint and test steps pull ruby:3.4.9-slim, then run apt-get update, install build packages, gem install bundler, and bundle install. This happens twice sequentially, plus a third bundle install in the Kaniko build step. The platform already maintains a ruby-rails-build image in Harbor (ldraney/base-images) with Ruby, bundler, build tools, and native headers pre-installed. Using it eliminates the redundant package installation. Additionally, lint and test have no data dependency on each other but run sequentially by default — adding depends_on: [clone] makes them parallel.

File Targets

Files the agent should modify:

  • .woodpecker.yaml — change step images, remove apt-get/gem install, add depends_on, add BUNDLE env overrides

Files the agent should NOT touch:

  • Dockerfile — production build is separate from CI steps
  • Gemfile / Gemfile.lock — no gem changes needed

Acceptance Criteria

  • Lint and test steps use harbor.harbor.svc.cluster.local/library/ruby-rails-build:latest
  • No apt-get or gem install bundler commands in lint or test steps
  • Lint and test run in parallel via depends_on: [clone]
  • BUNDLE_DEPLOYMENT and BUNDLE_WITHOUT overridden to empty strings for CI
  • Pipeline completes successfully

Test Expectations

  • Push to branch triggers pipeline with new config
  • Lint step passes with base image
  • Test step passes with base image and Postgres service container
  • Run command: push to branch and verify in Woodpecker UI

Constraints

  • Must use internal Harbor URL (harbor.harbor.svc.cluster.local) not external (harbor.tail5b443a.ts.net) for in-cluster pulls
  • Base image sets BUNDLE_DEPLOYMENT=1 and BUNDLE_WITHOUT=development — CI needs both overridden to empty
  • library Harbor project must be accessible to Woodpecker agent (should be public)

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • landscaping-assistant — project
  • ldraney/base-images — source of the ruby-rails-build image
### Type Feature ### Lineage Standalone — identified during deploy monitoring session analyzing pipeline bottlenecks. ### Repo `ldraney/landscaping-assistant` ### User Story As a developer I want the CI pipeline to use pre-built base images and run steps in parallel So that pipeline duration is significantly reduced and I get feedback faster ### Context Current CI pipeline installs the full Ruby toolchain from scratch on every run. Both lint and test steps pull `ruby:3.4.9-slim`, then run `apt-get update`, install build packages, `gem install bundler`, and `bundle install`. This happens twice sequentially, plus a third `bundle install` in the Kaniko build step. The platform already maintains a `ruby-rails-build` image in Harbor (`ldraney/base-images`) with Ruby, bundler, build tools, and native headers pre-installed. Using it eliminates the redundant package installation. Additionally, lint and test have no data dependency on each other but run sequentially by default — adding `depends_on: [clone]` makes them parallel. ### File Targets Files the agent should modify: - `.woodpecker.yaml` — change step images, remove apt-get/gem install, add depends_on, add BUNDLE env overrides Files the agent should NOT touch: - `Dockerfile` — production build is separate from CI steps - `Gemfile` / `Gemfile.lock` — no gem changes needed ### Acceptance Criteria - [ ] Lint and test steps use `harbor.harbor.svc.cluster.local/library/ruby-rails-build:latest` - [ ] No `apt-get` or `gem install bundler` commands in lint or test steps - [ ] Lint and test run in parallel via `depends_on: [clone]` - [ ] `BUNDLE_DEPLOYMENT` and `BUNDLE_WITHOUT` overridden to empty strings for CI - [ ] Pipeline completes successfully ### Test Expectations - [ ] Push to branch triggers pipeline with new config - [ ] Lint step passes with base image - [ ] Test step passes with base image and Postgres service container - Run command: push to branch and verify in Woodpecker UI ### Constraints - Must use internal Harbor URL (`harbor.harbor.svc.cluster.local`) not external (`harbor.tail5b443a.ts.net`) for in-cluster pulls - Base image sets `BUNDLE_DEPLOYMENT=1` and `BUNDLE_WITHOUT=development` — CI needs both overridden to empty - `library` Harbor project must be accessible to Woodpecker agent (should be public) ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `landscaping-assistant` — project - `ldraney/base-images` — source of the ruby-rails-build image
Sign in to join this conversation.
No labels
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
ldraney/landscaping-assistant#69
No description provided.