Skip to content

Commit ae9ecd2

Browse files
cardoeclaude
andcommitted
ci: temporary workflow to validate osh-chart-diff against real charts
To be removed once the tool is verified. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U1c2Qsc5agM715tVe96sBx
1 parent eb4eff2 commit ae9ecd2

1 file changed

Lines changed: 69 additions & 0 deletions

File tree

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
---
2+
# TEMPORARY. Exercises scripts/osh-chart-diff.py against the real
3+
# openstack-helm repository, which the development sandbox cannot reach.
4+
# Delete before this branch is proposed for merge.
5+
name: TEMP validate osh-chart-diff
6+
7+
on:
8+
push:
9+
branches:
10+
- claude/openstack-helm-chart-diff-n4pb59
11+
12+
permissions: {}
13+
14+
jobs:
15+
validate:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
steps:
20+
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6
21+
with:
22+
fetch-depth: 0
23+
24+
- uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5
25+
with:
26+
version: v3.18.4
27+
28+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
29+
with:
30+
python-version: "3.12"
31+
32+
- run: pip install pyyaml
33+
34+
# 74fddf2~1 predates both the ovn chart bump and the ovn values
35+
# override, so this covers a version change and a value file change.
36+
- name: Diff against a historical base
37+
run: |
38+
set -euo pipefail
39+
python3 scripts/osh-chart-diff.py \
40+
--base 74fddf2ee3bde50b0713c9020e446f3058e2a240~1 \
41+
--out "${RUNNER_TEMP}/osh" \
42+
--summary "${RUNNER_TEMP}/osh/comment.md" \
43+
--summary-limit 60000
44+
45+
- name: Show what was produced
46+
if: always()
47+
run: |
48+
find "${RUNNER_TEMP}/osh" -type f -printf '%10s %p\n' | sort -k2
49+
echo "--- render-inputs ---"
50+
cat "${RUNNER_TEMP}"/osh/*/render-inputs.txt
51+
52+
- name: Sanity check the render
53+
run: |
54+
set -euo pipefail
55+
test "$(cat "${RUNNER_TEMP}/osh/changed")" = "true"
56+
for app in testsite-neutron testsite-ovn; do
57+
test -s "${RUNNER_TEMP}/osh/${app}/before.yaml"
58+
test -s "${RUNNER_TEMP}/osh/${app}/after.yaml"
59+
# A real OpenStack Helm render has to contain a Deployment or
60+
# DaemonSet; an empty or error render would not.
61+
grep -qE '^kind: (Deployment|DaemonSet)' "${RUNNER_TEMP}/osh/${app}/after.yaml"
62+
done
63+
echo "render looks real"
64+
65+
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
66+
if: always()
67+
with:
68+
name: temp-osh-diff
69+
path: ${{ runner.temp }}/osh

0 commit comments

Comments
 (0)