Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Bind Helm convergence to the release repository

rcourtmanb16b8e524250
diff --git a/.github/workflows/helm-pages.yml b/.github/workflows/helm-pages.yml
index e6548e3cb8..4a572ae47c 100644
--- a/.github/workflows/helm-pages.yml
+++ b/.github/workflows/helm-pages.yml
@@ -165,17 +165,20 @@ jobs:
chart_release="helm-chart-${VERSION}"
chart_release_url="https://github.com/${{ github.repository }}/releases/download/${chart_release}"
- if gh release view "${chart_release}" >/dev/null 2>&1; then
- gh release upload "${chart_release}" "${chart_path}" --clobber
+ if gh release view "${chart_release}" --repo "${GITHUB_REPOSITORY}" >/dev/null 2>&1; then
+ gh release upload "${chart_release}" "${chart_path}" --clobber \
+ --repo "${GITHUB_REPOSITORY}"
else
gh release create "${chart_release}" "${chart_path}" \
+ --repo "${GITHUB_REPOSITORY}" \
--target "${TARGET_COMMITISH}" \
--title "Helm chart ${VERSION}" \
--notes "Helm chart for Pulse ${VERSION}." \
--prerelease \
--latest=false
fi
- gh release edit "${chart_release}" --prerelease --latest=false
+ gh release edit "${chart_release}" --prerelease --latest=false \
+ --repo "${GITHUB_REPOSITORY}"
git -C gh-pages config user.name "$GITHUB_ACTOR"
git -C gh-pages config user.email "[email protected]"
diff --git a/docs/release-control/v6/internal/subsystems/deployment-installability.md b/docs/release-control/v6/internal/subsystems/deployment-installability.md
index 1d71cc7c2d..a15908d76e 100644
--- a/docs/release-control/v6/internal/subsystems/deployment-installability.md
+++ b/docs/release-control/v6/internal/subsystems/deployment-installability.md
@@ -1180,6 +1180,10 @@ upgrade, update, release, or artifact-selection behavior.
resumed. Checkout-free activation jobs must also pass the repository
explicitly to `gh release upload`; local git discovery is not a valid
dependency at the irreversible marker boundary.
+ The same explicit-repository rule applies to reusable convergence jobs that
+ check out only a nested mutation branch such as `gh-pages`: every `gh
+ release` read or write must pass `--repo "${GITHUB_REPOSITORY}"` rather than
+ depending on current-directory repository discovery.
A failed activation after immutable readiness has passed may use the
activation-only recovery workflow. Recovery must accept only a completed
failed `create-release.yml` run whose failures are confined to activation,
diff --git a/scripts/installtests/build_release_assets_test.go b/scripts/installtests/build_release_assets_test.go
index e37d0e5543..a887c74d28 100644
--- a/scripts/installtests/build_release_assets_test.go
+++ b/scripts/installtests/build_release_assets_test.go
@@ -1547,6 +1547,7 @@ func TestDeploymentDefaultsPinVersionedImagesAndHelmDocsChecksum(t *testing.T) {
`qualified chart metadata does not match the activated release`,
`name: Publish chart release and merge Pages index`,
`gh release create "${chart_release}" "${chart_path}"`,
+ `--repo "${GITHUB_REPOSITORY}"`,
`helm repo index "${index_work}"`,
`git -C gh-pages push origin HEAD:gh-pages`,
`grep -q "version: ${VERSION}"`,
diff --git a/scripts/release_control/release_promotion_policy_test.py b/scripts/release_control/release_promotion_policy_test.py
index e7d1fdf51c..cb205e4df1 100644
--- a/scripts/release_control/release_promotion_policy_test.py
+++ b/scripts/release_control/release_promotion_policy_test.py
@@ -471,6 +471,12 @@ class ReleasePromotionPolicyTest(unittest.TestCase):
self.assertIn("release-activation.json", helm_pages)
self.assertIn("source_release_run_id", helm_pages)
self.assertIn("Helm Pages refuses to advertise inactive", helm_pages)
+ for command in ("view", "upload", "create", "edit"):
+ with self.subTest(command=command):
+ self.assertRegex(
+ helm_pages,
+ rf'gh release {command} .*?(?:\\\n\s*)?--repo "\$\{{GITHUB_REPOSITORY\}}"',
+ )
floating_tags = read(".github/workflows/promote-floating-tags.yml")
self.assertIn("Require activated GitHub release", floating_tags)