Optimize CI pipeline: use base image and parallelize steps #69
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Standalone — identified during deploy monitoring session analyzing pipeline bottlenecks.
Repo
ldraney/landscaping-assistantUser 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 runapt-get update, install build packages,gem install bundler, andbundle install. This happens twice sequentially, plus a thirdbundle installin the Kaniko build step. The platform already maintains aruby-rails-buildimage 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 — addingdepends_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 overridesFiles the agent should NOT touch:
Dockerfile— production build is separate from CI stepsGemfile/Gemfile.lock— no gem changes neededAcceptance Criteria
harbor.harbor.svc.cluster.local/library/ruby-rails-build:latestapt-getorgem install bundlercommands in lint or test stepsdepends_on: [clone]BUNDLE_DEPLOYMENTandBUNDLE_WITHOUToverridden to empty strings for CITest Expectations
Constraints
harbor.harbor.svc.cluster.local) not external (harbor.tail5b443a.ts.net) for in-cluster pullsBUNDLE_DEPLOYMENT=1andBUNDLE_WITHOUT=development— CI needs both overridden to emptylibraryHarbor project must be accessible to Woodpecker agent (should be public)Checklist
Related
landscaping-assistant— projectldraney/base-images— source of the ruby-rails-build image