Add speculative build support: auto-detect and source staging - #91
Add speculative build support: auto-detect and source staging#91rebtoor wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
14823b1 to
77dfb5b
Compare
77dfb5b to
fd37ed7
Compare
|
Merge Failed. This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. |
|
recheck |
fd37ed7 to
7ecf7e8
Compare
36e58a3 to
9e3951d
Compare
Enable the s2i content provider to automatically determine which images to build based on the triggering Zuul project, and to stage patched source checkouts from the Zuul workspace into container build contexts. This is a lightweight alternative to the OIB Python package from PR openstack-k8s-operators#49, implementing only the two features needed for RHOSRFE-466 (speculative testing of upstream OpenStack changes): 1. `build.sh auto-detect <project> [stream]` — scans sources.txt files to find which container images reference a given upstream project. Uses exact URL-path matching to avoid false positives (e.g., openstack/watcher does not match openstack/watcher-tempest-plugin). 2. Ansible playbooks for Zuul integration: - resolve-auto-images.yaml: resolves `s2i_ci_images: auto` by running auto-detect for each changed project in the Zuul queue. - stage-zuul-sources.yaml: copies Zuul-checked-out source repos into container src/ directories for speculative builds. Related-Issue: RHOSRFE-466 Co-Authored-By: Sean Mooney <work@seanmooney.info> Assisted-By: Claude (Anthropic) Co-authored-by: Cursor <cursoragent@cursor.com>
9e3951d to
aac5d56
Compare
Summary
build.sh auto-detect <project> [stream]command that scanssources.txtfiles to determine which container images are affected by a given upstream OpenStack project.resolve-auto-images.yaml) and source staging (stage-zuul-sources.yaml).sources.txtfiles).This is a lightweight alternative to the OIB Python package from PR #49, implementing only the two features required for speculative testing of upstream OpenStack changes (RHOSRFE-466):
openstack/tempest), determine which images need rebuilding by parsingsources.txtmanifests. Uses exact URL-path matching to avoid false positives.src/directories so builds use the speculative code instead of pinned hashes.How it works
When the content provider runs with
s2i_ci_images: auto:resolve-auto-images.yamlinspects the Zuul queue to find which external projects triggered the build.build.sh auto-detectto find affected images.stage-zuul-sources.yamlcopies Zuul's patched checkouts into the container build contexts.Note
This PR includes the content provider infrastructure from PR #85 and is intended to supersede it once validated.