Summary
The base-oss-google-ubuntu-stemcell GCS resource in ci/pipeline-template.yml uses an invalid regexp pattern that will fail to match uploaded raw stemcell artifacts.
Problem
- name: base-oss-google-ubuntu-stemcell
source:
bucket: bosh-gce-raw-stemcells-new
json_key: ((gcp_json_key))
regexp: bosh-stemcell-([0-9\.]+)-google-kvm-ubuntu-*-raw.tar.gz
type: gcs-resource
In regex syntax, ubuntu-* means "the literal string ubuntu followed by zero or more hyphens". It does not act as a glob wildcard. Artifacts uploaded by the pipeline look like bosh-stemcell-1.2-google-kvm-ubuntu-jammy-raw.tar.gz (or ubuntu-noble-raw.tar.gz), which this pattern cannot match, breaking GCS version extraction.
Additionally, [0-9\.] is redundant since . inside a character class is a literal dot, but using [0-9.] is more conventional.
Suggested Fix
Replace the pattern with a proper regex that matches the OS codename:
- regexp: bosh-stemcell-([0-9\.]+)-google-kvm-ubuntu-*-raw.tar.gz
+ regexp: bosh-stemcell-([0-9.]+)-google-kvm-ubuntu-[a-z]+-raw\.tar\.gz
Or, if ytt template variables are available at this point in the file, use the existing data.values.stemcell_details.os_name variable for consistency with the rest of the pipeline:
- regexp: bosh-stemcell-([0-9\.]+)-google-kvm-ubuntu-*-raw.tar.gz
+ regexp: bosh-stemcell-([0-9.]+)-google-kvm-(@= data.values.stemcell_details.os_name @)-raw\.tar\.gz
References
Branch
This fix should be applied to the ubuntu-jammy branch (and merged forward as appropriate).
Summary
The
base-oss-google-ubuntu-stemcellGCS resource inci/pipeline-template.ymluses an invalid regexp pattern that will fail to match uploaded raw stemcell artifacts.Problem
In regex syntax,
ubuntu-*means "the literal stringubuntufollowed by zero or more hyphens". It does not act as a glob wildcard. Artifacts uploaded by the pipeline look likebosh-stemcell-1.2-google-kvm-ubuntu-jammy-raw.tar.gz(orubuntu-noble-raw.tar.gz), which this pattern cannot match, breaking GCS version extraction.Additionally,
[0-9\.]is redundant since.inside a character class is a literal dot, but using[0-9.]is more conventional.Suggested Fix
Replace the pattern with a proper regex that matches the OS codename:
Or, if ytt template variables are available at this point in the file, use the existing
data.values.stemcell_details.os_namevariable for consistency with the rest of the pipeline:References
ubuntu-jammybranchBranch
This fix should be applied to the
ubuntu-jammybranch (and merged forward as appropriate).