Skip to content

fix(jenkins): run quality gate in-cluster (Option A) - #7

Merged
untraceablez merged 2 commits into
mainfrom
feat/automated-multiarch-docker-builds
Jul 21, 2026
Merged

fix(jenkins): run quality gate in-cluster (Option A)#7
untraceablez merged 2 commits into
mainfrom
feat/automated-multiarch-docker-builds

Conversation

@untraceablez

Copy link
Copy Markdown
Owner

Follow-up to #6 (merged before this commit landed). Without this, main's Jenkinsfile targets the off-cluster path that Cloudflare Access blocks.

Why

SonarQube's public URL is behind Cloudflare Access, which the off-cluster unraid-docker VM can't pass (its token authenticates to SonarQube, not the Access edge). So the quality gate must run in-cluster, exactly how pantrie/scryme scan.

What

  • Jenkinsfile: split agents — pipeline default docker (unraid-docker), and the Quality gate stage overrides to agent { label 'sonar' } + container('sonar-scanner'), reaching SonarQube on the internal URL via withSonarQubeEnv('SonarQube'). Dropped the SonarQube-Public indirection.
  • quality-gate.sh: rewritten as POSIX sh (the Alpine sonar-scanner-cli container has no bash — no arrays/mapfile). ShellCheck import is best-effort (writes a valid empty report when absent; shell lint is gated by GitHub Actions), scanner runs natively.

Pairs with urza-helm #183 (adds the sonar pod template, drops SonarQube-Public, installs jq/curl on the agent).

GitHub Actions make check (ShellCheck + bats) validates this PR. quality-gate.sh verified under sh and dash.

🤖 Generated with Claude Code

untraceablez and others added 2 commits July 20, 2026 20:10
The off-cluster unraid-docker VM can't pass the Cloudflare Access edge in
front of the public SonarQube URL. Split agents: quality gate runs on an
in-cluster 'sonar' pod (sonar-scanner-cli) using the internal SonarQube URL
via withSonarQubeEnv('SonarQube'); build/publish stays on the 'docker' node.

- Jenkinsfile: pipeline default agent 'docker'; Quality gate stage overrides to
  agent label 'sonar' and wraps the scanner in container('sonar-scanner'); drop
  the SonarQube-Public indirection.
- quality-gate.sh: rewrite as POSIX sh (no bash arrays/mapfile) so it runs in the
  Alpine scanner container; ShellCheck import is best-effort (empty valid report
  when absent — shell lint is gated by GitHub Actions), scanner runs natively.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XHrdPEhFSuvzutLvD5xTmS
Set CDPATH='' as a normal assignment, then plain cd — ShellCheck read
'CDPATH= cd' as a mistaken assignment (SC1007) and failed make lint.
@untraceablez
untraceablez merged commit 353bd99 into main Jul 21, 2026
1 check passed
@untraceablez
untraceablez deleted the feat/automated-multiarch-docker-builds branch July 21, 2026 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant