Files
Vladimir Kozhukalov 7793a0526a Publish charts to quay.io/osh-charts
Add the openstack-helm-publish-charts-oci job to the post pipeline. It
pushes the charts to oci://quay.io/osh-charts/<chart>, one repository
per chart with one tag per chart version. helm push stores the version
<major>.<minor>.<patch>+<commit_sha> as the tag
<major>.<minor>.<patch>_<commit_sha>.

Like openstack-helm-publish-charts, the job does not look at the range
of the Zuul event, because the post pipeline drops queue items when
changes land faster than the job runs. The registry is the source of
truth instead. For every chart the job takes the version from
tools/chart_version.sh and asks the quay API whether a tag with the
same <major>.<minor>.<patch> exists. It builds and pushes only the
charts which are missing. So the first run publishes every chart, and
a dropped event only delays a chart until the next run.

A repository that quay.io creates implicitly on push is private, so the
job creates the missing repositories as public ones through the quay
API before pushing.

A chart which fails at any step is left for the next run and does not
hold back the other charts. The job fails at the end and lists the
charts which could not be published.

The registry credentials (username, password and an API token that can
create repositories in the osh-charts organization) are stored as the
encrypted openstack-helm_charts_registry_credentials secret. Zuul
decrypts it only in post-review pipelines.

Assisted-By: Claude Opus 5.5
Signed-off-by: Vladimir Kozhukalov <kozhukalov@gmail.com>
Change-Id: Ifff0b8021cb107dcda1d40e83ec3fa127d960a55
2026-10-27 08:14:50 -05:00

163 lines
5.0 KiB
YAML

---
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
- job:
name: openstack-helm-bandit
nodeset: openstack-helm-1node-ubuntu_noble
roles:
- zuul: openstack/openstack-helm
- zuul: zuul/zuul-jobs
required-projects:
- openstack/openstack-helm
files:
- ^.*\.py\.tpl$
- ^.*\.py$
- ^playbooks/osh-bandit.yaml$
pre-run: playbooks/prepare-hosts.yaml
post-run: playbooks/collect-logs.yaml
run: playbooks/osh-bandit.yaml
vars:
bandit_version: "1.7.1"
- job:
name: openstack-helm-deploy
abstract: true
roles:
- zuul: openstack/openstack-helm
- zuul: zuul/zuul-jobs
required-projects:
- openstack/openstack-helm
irrelevant-files:
- ^.*\.rst$
- ^.*\.rst.gotmpl$
- ^doc/.*$
- ^releasenotes/.*$
timeout: 10800
pre-run:
- playbooks/prepare-hosts.yaml
- playbooks/mount-volumes.yaml
- playbooks/use-buildset-registry.yaml
- playbooks/inject-keys.yaml
post-run: playbooks/collect-logs.yaml
vars:
overlay_network_setup: true
extra_volume:
size: 80G
type: Linux
mount_point: /opt/ext_vol
docker:
root_path: "/opt/ext_vol/docker"
containerd:
root_path: "/opt/ext_vol/containerd"
kubeadm:
pod_network_cidr: "10.244.0.0/16"
service_cidr: "10.96.0.0/16"
osh_helm_repo: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/../openstack-helm"
osh_git_repo: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}/../openstack-helm"
loopback_setup: true
loopback_device: /dev/loop100
loopback_image: "/opt/ext_vol/openstack-helm/ceph-loop.img"
ceph_osd_data_device: /dev/loop100
kube_version_repo: "v1.36"
kube_version: "1.36.4-1.1"
calico_setup: true
calico_version: "v3.32.1"
cilium_setup: false
cilium_version: "1.17.4"
flannel_setup: false
flannel_version: v0.26.7
metallb_setup: true
metallb_version: "0.16.1"
coredns_resolver_setup: false
ingress_setup: false
ingress_implementation: "haproxy"
gatewayapi_setup: true
gatewayapi_implementation: "envoy"
gatewayapi_envoy_version: "v1.9.0"
crictl_version: "v1.36.0"
floating_network_setup: true
openstack_client_image_tag: "2026.1-ubuntu_noble"
- job:
name: openstack-helm-linter
run: playbooks/lint.yaml
nodeset: openstack-helm-1node-ubuntu_noble
required-projects:
- openstack/openstack-helm
irrelevant-files:
- ^.*\.rst$
- ^releasenotes/.*$
pre-run:
- playbooks/inject-keys.yaml
- job:
name: openstack-helm-pre-commit
parent: tox-linters
# Release notes for charts are written as Changelog: git trailers and turned
# into the artifacthub.io/changes annotation at build time. This job checks
# the trailers of the change under review and renders the annotation for the
# charts it touches. It deliberately has no irrelevant-files: a change that
# touches no chart at all still has to be free of stray trailers.
- job:
name: openstack-helm-release-notes
nodeset: openstack-helm-1node-ubuntu_noble
required-projects:
- openstack/openstack-helm
run: playbooks/release-notes.yaml
- job:
name: openstack-helm-publish-charts
timeout: 10800
parent: publish-openstack-artifacts
run: playbooks/charts-publish.yaml
required-projects:
- openstack/openstack-helm
- job:
name: openstack-helm-publish-charts-oci
description: |
Build the charts whose current version is missing from the
quay.io/osh-charts/<chart> OCI repositories and push them there.
Repositories that do not exist yet are created as public ones.
timeout: 3600
nodeset: openstack-helm-1node-ubuntu_noble
roles:
- zuul: openstack/openstack-helm
- zuul: zuul/zuul-jobs
required-projects:
- openstack/openstack-helm
pre-run:
- playbooks/prepare-hosts.yaml
run: playbooks/charts-publish-oci.yaml
secrets:
- name: charts_registry_credentials
secret: openstack-helm_charts_registry_credentials
vars:
osh_charts_oci_registry: quay.io
osh_charts_oci_namespace: osh-charts
- job:
name: openstack-helm-build-charts
timeout: 10800
nodeset: openstack-helm-1node-ubuntu_noble
roles:
- zuul: openstack/openstack-helm
- zuul: zuul/zuul-jobs
required-projects:
- openstack/openstack-helm
pre-run:
- playbooks/prepare-hosts.yaml
run: playbooks/charts-build.yaml
...