Skip to content

feat(tooling): add Jenkins build status checker#243

Open
rlorenzo wants to merge 1 commit into
dependabot/npm_and_yarn/npm-root-dd79dbcc37from
feature/jenkins-deploy-tooling
Open

feat(tooling): add Jenkins build status checker#243
rlorenzo wants to merge 1 commit into
dependabot/npm_and_yarn/npm-root-dd79dbcc37from
feature/jenkins-deploy-tooling

Conversation

@rlorenzo

@rlorenzo rlorenzo commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Note

Stacked on #237 (dependabot/npm_and_yarn/npm-root-dd79dbcc37). Base is that branch, so this diff shows only the 3-file change below. GitHub will auto-retarget this PR to main once #237 merges. Review/merge #237 first.

What

  • scripts/jenkins-status.js (new) — checks the deploy job's build status. One-shot (npm run jenkins:status) or --watch (npm run jenkins:watch) to poll an in-progress build until it finishes (🔨 Building #N — ~X% (elapsed / est)). Uses Node https with rejectUnauthorized: false (no curl), follows redirects, and reads JENKINS_* from the env (--env-file-if-exists=.env.local) or by parsing .env.local.
  • .husky/pre-push — adds curl -k to the Jenkins trigger so the push-to-Development auto-deploy succeeds against the internal self-signed cert (interim, until the CA is trusted).
  • package.jsonjenkins:status / jenkins:watch scripts.

Why stacked

The checker is a scripts/** CommonJS build script, so it depends on the no-implicit-globals / node/no-sync oxlint override that #237 adds to .oxlintrc.json. Stacking on #237 lets it inherit that override instead of duplicating the config change (which would add/add-conflict).

Testing

  • node scripts/jenkins-status.js✅ Last build #2183: SUCCESS (348s) (verified against the live deploy job)
  • oxlint 0 issues, oxfmt clean, CRLF preserved (hook stays CRLF)
  • Full pre-commit gate passed (build + lint + tests + verify:build)

Note

The -k is a deliberate interim measure while the Jenkins certificate is being replaced; it should be removed once the CA is trusted. Pushing this branch does not trigger a deploy (the pre-push hook only fires Jenkins for pushes to Development).

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds lightweight developer tooling to observe Jenkins deploy job status from the CLI, and aligns local git hooks/package scripts to support Jenkins interactions in the current internal/self-signed TLS environment.

Changes:

  • Added scripts/jenkins-status.js to fetch Jenkins job status and optionally poll (--watch) until completion.
  • Added jenkins:status / jenkins:watch npm scripts for consistent invocation with .env.local loading.
  • Updated .husky/pre-push Jenkins trigger to use curl -k to tolerate the internal self-signed certificate.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
scripts/jenkins-status.js New Node.js CLI tool to query/poll Jenkins deploy build status via the Jenkins JSON API.
package.json Adds npm entry points for one-shot and watch mode execution of the Jenkins status checker.
.husky/pre-push Adjusts the Jenkins trigger curl invocation to work against internal TLS (self-signed).

Comment thread scripts/jenkins-status.js
Comment thread scripts/jenkins-status.js Outdated
rlorenzo added a commit that referenced this pull request Jul 2, 2026
Prevents --watch from hanging on a stalled connection and guards getJson
against unbounded recursive redirects (per PR #243 review).
- scripts/jenkins-status.js: one-shot or --watch status for the deploy job via
  Node https (rejectUnauthorized:false for the internal self-signed cert); adds
  jenkins:status / jenkins:watch npm scripts
- .husky/pre-push: add curl -k so the push-to-Development Jenkins trigger
  succeeds against the self-signed cert (interim until the CA is trusted)
@rlorenzo rlorenzo force-pushed the feature/jenkins-deploy-tooling branch from a57dff5 to 33d954e Compare July 2, 2026 19:06
@rlorenzo rlorenzo requested a review from bsedwards July 2, 2026 19:10
@rlorenzo

rlorenzo commented Jul 2, 2026

Copy link
Copy Markdown
Contributor Author

@bsedwards Ignoring Jenkins invalid SSL, and while we are at it, added a script to monitor deployment without having to log in to Jenkins.

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.

3 participants