Commit Graph

69 Commits

Author SHA1 Message Date
privilegedescalation-ceo[bot] 9487c402b3 Merge pull request #54 from privilegedescalation/fix/pnpm-package-manager-conflict
ci: handle packageManager field to avoid pnpm version conflict
2026-03-22 05:24:29 +00:00
privilegedescalation-ceo[bot] c400a2fe59 Merge pull request #55 from privilegedescalation/fix/dual-approval-bot-suffix
fix(ci): match [bot] suffix in dual-approval-check reviewer usernames
2026-03-22 05:24:20 +00:00
Hugh Hackman cede9322dc fix(ci): match [bot] suffix in dual-approval-check reviewer usernames
GitHub App reviews are submitted as `privilegedescalation-cto[bot]`
and `privilegedescalation-qa[bot]`, not the bare usernames used in the
workflow defaults. The jq filter now accepts both the plain username and
the `[bot]`-suffixed form, so the check passes regardless of whether the
review was submitted via the GitHub App or a regular account.

Fixes: https://github.com/privilegedescalation/.github/issues/51

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-22 05:12:50 +00:00
Hugh Hackman 4d42db2e52 ci: handle packageManager field in plugin-ci to avoid pnpm version conflict
pnpm/action-setup@v4 errors when both the `version` input and a
`packageManager` field in package.json are specified. Detect the
packageManager field during the package-manager detection step and
conditionally omit `version: latest` when it is present.

Fixes CI failures on repos using Corepack-style pnpm version pinning
(e.g. headlamp-polaris-plugin PR #103).

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-22 04:56:42 +00:00
Hugh Hackman 950af300bf fix: replace gh api with curl in dual-approval-check workflow
The gh CLI is not installed on the self-hosted ARC runners
(runners-privilegedescalation). Replace the gh api call with
curl + GitHub token, which is available on all runners.

Fixes: https://github.com/privilegedescalation/.github/issues/50
Unblocks: headlamp-polaris-plugin PR #98 and v1.0.0 release pipeline
2026-03-22 04:45:20 +00:00
privilegedescalation-ceo[bot] 97cb944a53 Merge pull request #47 from privilegedescalation/feat/dual-approval-status-check
ci: add reusable dual-approval-check workflow
2026-03-22 04:12:20 +00:00
privilegedescalation-ceo[bot] 191e302a16 Merge pull request #48 from privilegedescalation/fix/pnpm-setup-version-fallback
fix: add pnpm version fallback to plugin-ci shared workflow
2026-03-22 04:12:12 +00:00
Hugh Hackman 1c5eb52490 fix(ci): check last review state per user in dual-approval workflow
Previously the jq logic checked if *any* review from CTO/QA had
state == APPROVED. This allowed a PR to pass dual-approval even if
the reviewer subsequently requested changes — because the earlier
approval was still in the review history.

Fix: filter reviews by user, take the last one, and check its state.
This ensures a CHANGES_REQUESTED review after an approval correctly
blocks the check.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-22 00:11:01 +00:00
Hugh Hackman 1fd7a7ecf0 fix: add pnpm version fallback to plugin-ci shared workflow
pnpm/action-setup@v4 requires either a version input or a packageManager
field in package.json. Repos with pnpm-lock.yaml but no packageManager
field were failing with "No pnpm version is specified."

Adding version: latest as a fallback allows the action to install the
latest stable pnpm when packageManager is not set. Repos that do specify
packageManager in package.json continue to use their pinned version.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-21 23:58:29 +00:00
Hugh Hackman fbb4dfcfc3 ci: add reusable dual-approval-check workflow
Adds a shared reusable workflow that plugin repos can call to enforce
the dual CTO+QA approval policy as a GitHub required status check.

The workflow queries the GitHub API for PR reviews and fails unless
both privilegedescalation-cto and privilegedescalation-qa have approved.
Triggered via pull_request and pull_request_review events in calling
repos, producing a clear "Dual Approval (CTO + QA)" status check.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-21 23:54:57 +00:00
privilegedescalation-ceo[bot] b7ec5e69b6 Merge pull request #46 from privilegedescalation/feat/pnpm-support-in-ci
ci: add pnpm auto-detection to shared plugin CI workflow
2026-03-21 23:51:24 +00:00
privilegedescalation-ceo[bot] d369b8bdbf Merge branch 'main' into feat/pnpm-support-in-ci 2026-03-21 23:50:01 +00:00
privilegedescalation-ceo[bot] edf7b7d849 Merge pull request #45 from privilegedescalation/fix/release-pr-cc-cpfarhood
fix: add cc @cpfarhood to release PR body per org policy
2026-03-21 23:49:46 +00:00
Hugh Hackman f564499a79 fix: use printf to avoid multi-line YAML literal block break
The multi-line --body string had cc @cpfarhood at column 0, which
terminated the YAML literal block scalar prematurely and caused
actionlint to reject the workflow file. Use printf to construct
the body string without embedding a literal newline in the YAML.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-21 23:09:49 +00:00
Hugh Hackman 23c86bf2d9 ci: add pnpm auto-detection to shared plugin CI workflow
When pnpm-lock.yaml is present, use pnpm for install, lint, type-check,
format check, tests, and security audit instead of npm. Repos using npm
are unaffected (falls back to existing npm behavior).

This fixes the npm/pnpm inconsistency in headlamp-polaris-plugin where
local development uses pnpm but CI used npm, causing:
- Different transitive dependency resolution (TypeScript not hoisted)
- Different audit results (pnpm audit vs npm audit)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 23:07:19 +00:00
github-actions[bot] 494a8051af fix: add cc @cpfarhood to release PR body per org policy
All PRs must include cc @cpfarhood. The automated release PR
body generated by plugin-release.yaml was missing this.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-21 22:57:47 +00:00
privilegedescalation-ceo[bot] b74e5b5b47 Merge pull request #41 from privilegedescalation/ci/e2e-health-check
ci: track E2E test failures separately in CI health check
2026-03-21 14:07:11 +00:00
privilegedescalation-ceo[bot] d5ad15c494 Merge branch 'main' into ci/e2e-health-check 2026-03-21 14:06:10 +00:00
privilegedescalation-engineer[bot] 6110cd8085 chore: add headlamp-plugin-template to CI health check (#40)
Co-authored-by: privilegedescalation-engineer[bot] <privilegedescalation-engineer[bot]@users.noreply.github.com>
2026-03-21 12:54:10 +00:00
Hugh Hackman 8e1e06f9a7 ci: track E2E test failures separately in CI health check
- Exclude E2E Tests from CI failure count (keeps CI/CD noise separate)
- Add dedicated E2E warning line for main branch failures (PRI-494)
- Move Release failure warning outside the else block — always report it
- Update Release warning comment: graceful skip is now in place, so
  failures are real errors not just missing-secrets noise

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-21 12:44:10 +00:00
privilegedescalation-ceo[bot] 5068017ced Merge pull request #39 from privilegedescalation/fix/ci-health-check-app-token
fix: use GitHub App token in ci-health-check for cross-repo access
2026-03-21 01:26:03 +00:00
github-actions[bot] 1221080ec5 fix: use GitHub App token in ci-health-check for cross-repo access
The CI/CD health check uses GITHUB_TOKEN which only has access to
the .github repo. Listing workflow runs across the 6 plugin repos
requires org-wide access, causing all repos to show "WARNING: No
workflow runs found".

Fix: generate a GitHub App token (using RELEASE_APP_ID/RELEASE_APP_PRIVATE_KEY,
same as the release workflow) scoped to the org before running the
health check script. Falls back to GITHUB_TOKEN gracefully via
continue-on-error if the secrets are not yet configured.

Once RELEASE_APP_ID is configured as an org secret (tracked separately),
the health check will produce accurate cross-repo CI data.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-21 01:15:00 +00:00
privilegedescalation-ceo[bot] e4848e0963 Merge pull request #38 from privilegedescalation/fix/release-skip-missing-secrets
fix: skip release gracefully when RELEASE_APP_ID is not configured
2026-03-21 00:49:28 +00:00
privilegedescalation-ceo[bot] ad401563b4 Merge branch 'main' into fix/release-skip-missing-secrets 2026-03-21 00:48:53 +00:00
privilegedescalation-ceo[bot] 911c94a11d Merge pull request #37 from privilegedescalation/fix/ci-health-check-improvements
fix: improve ci-health-check signal and replace node with jq
2026-03-21 00:43:54 +00:00
privilegedescalation-engineer[bot] 3d7e7d1dff fix: skip release gracefully when RELEASE_APP_ID is not configured
Adds a check-secrets job that runs before any expensive work. When
RELEASE_APP_ID is empty (org secret not yet set, tracked in PRI-380),
the workflow exits cleanly with a notice instead of running the full
build and failing at the GitHub App token step.

Previously this left dangling state: a pushed tag, a GitHub Release,
and a release branch — but no version-bump PR. Now the workflow skips
all of that and exits clean.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-21 00:31:37 +00:00
Hugh Hackman 2df48640bb fix: improve ci-health-check signal and replace node with jq
- Replace node -e JSON parsing with jq (available on our runners)
- Exclude Release workflow failures from FAIL count — these fail at
  the post-release PR-creation step due to missing RELEASE_APP org
  secrets (tracked in PRI-380), not actual CI breakage
- Demote Release failures to WARN so the health check exits 0 when
  only Release is broken, giving clean signal for real CI problems
- Increase run limit from 5 to 10 for better intermittent failure detection
- Remove unnecessary Node.js setup step from the workflow

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-21 00:17:29 +00:00
privilegedescalation-engineer[bot] e453bee9df fix: reduce Renovate prConcurrentLimit to 5
PR .github#32 proposed adding a new renovate.json scoped to github-actions
with prConcurrentLimit: 5, but that would override the existing
renovate-config.json and silently drop npm dependency updates.

Instead, incorporate the limit change directly into the canonical
renovate-config.json which already covers both npm and github-actions.

Co-authored-by: Gandalf the Greybeard <gandalf@privilegedescalation.ai>
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-03-20 22:33:32 +00:00
privilegedescalation-ceo[bot] 507e8633eb fix: skip duplicate release gracefully when tag already exists
* fix: skip duplicate release gracefully when tag already exists

Replace inline exit-1 tag check with a dedicated check-tag job that uses
the GitHub API. When the tag already exists, check-tag outputs skip=true
and the release job is conditionally skipped via if: condition. Workflow
now reports success (not failure) for duplicate release attempts.

Fixes #30 (partial) — resolves the tag-already-exists failure mode.

Co-Authored-By: Hugh Hackman <hugh@privilegedescalation.io>

* fix: use curl instead of gh CLI in check-tag job for portability

gh CLI may not be pre-installed on ARC runners. curl is always available
in container images. Avoids potential startup failure if gh binary is absent.

Co-Authored-By: Paperclip <noreply@paperclip.ing>

* fix: drop -f flag from curl in check-tag to avoid exit on 404

With -f, curl exits non-zero when the tag does not exist (404). In GitHub
Actions bash steps (set -e), this could cause the step to fail before the
if-block runs. Using -s alone: curl always exits 0 on network success,
HTTP_CODE is captured correctly for both 200 and 404 cases.

Co-Authored-By: Paperclip <noreply@paperclip.ing>

---------

Co-authored-by: Hugh Hackman <hugh@privilegedescalation.io>
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-03-20 22:33:28 +00:00
privilegedescalation-paperclip[bot] 453e320f35 fix: use GitHub App token for release PR creation (#31)
The org blocks GITHUB_TOKEN from creating pull requests
("Write permissions for workflows are disabled by the organization").
Switch to a GitHub App installation token generated via
actions/create-github-app-token for the PR creation step.

Requires org-level secrets RELEASE_APP_ID and RELEASE_APP_PRIVATE_KEY
to be configured. Calling workflows must pass these secrets.

Closes #30

Co-authored-by: Hugh Hackman <hugh@privilegedescalation.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 13:24:28 +00:00
privilegedescalation-paperclip[bot] d733a720af fix: install gh CLI to user-writable path on ARC runners (#29)
ARC runner containers run as non-root, so `mv` to /usr/local/bin fails
with permission denied. Install to $HOME/.local/bin instead and add to
GITHUB_PATH.

Co-authored-by: Hugh Hackman [bot] <hugh-hackman[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 21:32:56 +00:00
Chris Farhood b5dd846ca3 Merge pull request #28 from privilegedescalation/fix/runner-label-local-to-arc
fix: update runner label from local-ubuntu-latest to runners-privilegedescalation
2026-03-19 17:14:26 -04:00
Hugh Hackman bff9014cf8 fix: update runner label from local-ubuntu-latest to runners-privilegedescalation
ARC runner scale set was recreated on 2026-03-19 with label
`runners-privilegedescalation` but all shared workflows still referenced
`local-ubuntu-latest`. This label mismatch caused startup_failure on
every Release workflow and queued CI jobs with no runner to pick them up.

Updates all 4 workflows and the actionlint config to match the current
ARC runner scale set label.

Closes #27
2026-03-19 20:11:51 +00:00
null-pointer-nancy[bot] 7fa962ec0f Merge pull request #26 from privilegedescalation/fix/kube-vip-ah-badge
fix: add kube-vip ArtifactHub badge to org profile
2026-03-19 00:25:16 +00:00
addison-addington[bot] af599af33b fix: add kube-vip ArtifactHub badge to org profile README
The kube-vip plugin has been on ArtifactHub but the org profile
still showed "—" for its badge. All 6 plugins now have badges.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 00:23:43 +00:00
null-pointer-nancy[bot] 57766b2876 Merge pull request #25 from privilegedescalation/feat/pr-validation-workflow
feat: add PR validation workflow
2026-03-19 00:21:18 +00:00
Hugh Hackman 2a53ce8a7d fix: install shellcheck via apt-get (runner lacks xz for tar.xz)
The self-hosted runner doesn't have xz installed, so extracting the
shellcheck tar.xz release fails. Use apt-get install instead.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 00:12:59 +00:00
Hugh Hackman 17cfc6033f fix: install shellcheck in PR validation workflow
The shellcheck step fails with "command not found" because shellcheck
is not installed on the runner. Install it from GitHub releases, same
pattern as the actionlint install step.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-19 00:11:42 +00:00
hugh-hackman[bot] b6f97bf481 fix: remove || true from shellcheck step per QA review 2026-03-19 00:06:49 +00:00
Hugh Hackman 218b67fb50 fix: register local-ubuntu-latest as custom runner label for actionlint
actionlint doesn't recognize our self-hosted runner label. Adding
actionlint.yaml config to suppress false positives.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-18 12:00:53 +00:00
Hugh Hackman cf887e7658 fix: install actionlint to user-writable path
The runner doesn't have write access to /usr/local/bin. Install to
$HOME/.local/bin instead and add it to GITHUB_PATH.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-18 11:58:57 +00:00
Hugh Hackman b34c87b376 feat: add PR validation workflow for YAML and script linting
The .github repo had no CI running on pull requests — PRs merged without
any validation. This adds actionlint for workflow YAML and shellcheck for
scripts in .github/scripts/, triggered on PRs to main.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-18 11:57:10 +00:00
null-pointer-nancy[bot] e0aa497b2e ci: update actions/checkout v4 → v6 in reusable workflows
ci: update actions/checkout v4 → v6 in reusable workflows
2026-03-18 07:41:19 +00:00
Hugh Hackman[bot] cfb35fe73d ci: update actions/checkout from v4 to v6 in all reusable workflows
actions/checkout v6 was already adopted in headlamp-agent-skills.
This brings the org-level reusable workflows (plugin-ci, plugin-release,
ci-health-check) up to the same version. Affects all plugin repos that
call these shared workflows.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-18 07:24:02 +00:00
hugh-hackman[bot] 538a7bf024 ci: use binary download for gh CLI install on self-hosted runners (#18)
The apt-based gh CLI install requires sudo which is not available on our
self-hosted container runners. Replace with a direct binary download from
GitHub releases that works without elevated permissions.

Fixes the "gh: command not found" error in the release workflow's
"Create PR for version bump" step.

Co-authored-by: Hugh Hackman <hugh@privilegedescalation.com>
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-03-17 17:44:34 +00:00
null-pointer-nancy[bot] 7e18b2eb90 Merge pull request #16 from privilegedescalation/fix/release-workflow-install-gh-cli
ci: install gh CLI in release workflow for self-hosted runners
2026-03-17 12:46:44 +00:00
Hugh Hackman 4c0ad08db3 ci: install gh CLI in release workflow for self-hosted runners
The self-hosted runner (local-ubuntu-latest) does not have gh CLI
pre-installed, causing the PR creation step to fail with
"gh: command not found" after the release is published.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-17 12:34:16 +00:00
hugh-hackman[bot] 510569be7b ci: remove Docker container from release workflow
Remove container: node from the release job to avoid Docker Hub rate
limits on self-hosted runners. Uses actions/setup-node@v4 instead,
matching the pattern already applied in plugin-ci.yaml (PR#14).

Changes:
- Remove container: node:${{ inputs.node-version }}
- Add setup-node@v4 step with npm cache after checkout
- Remove apt-get install step (jq, curl, git already on runner)
- Remove manual GitHub CLI install step (gh already on runner)

Co-authored-by: Hugh Hackman <hugh@privilegedescalation.com>
Co-authored-by: Paperclip <noreply@paperclip.ing>
2026-03-16 10:52:05 +00:00
hugh-hackman[bot] d0b4428af7 fix: remove Docker container from CI, use setup-node instead
Eliminates Docker Hub rate limit by replacing container: node:22 with setup-node@v4.
Also fixes release workflow branch creation order.

Closes privilegedescalation/.github#14

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-03-15 16:55:37 +00:00
addison-addington[bot] e97fee87af Add FUNDING.yml for org-wide GitHub Sponsors
Co-authored-by: addison-addington[bot] <266309314+addison-addington[bot]@users.noreply.github.com>
2026-03-11 21:43:22 +00:00