Skip to content

Add Jenkins CI workflow for Renode unit tests#26

Open
dinkelk wants to merge 1 commit into
mainfrom
feature/cross-compile-test_renode
Open

Add Jenkins CI workflow for Renode unit tests#26
dinkelk wants to merge 1 commit into
mainfrom
feature/cross-compile-test_renode

Conversation

@dinkelk
Copy link
Copy Markdown
Collaborator

@dinkelk dinkelk commented May 7, 2026

Summary

Adds the GitHub Actions workflow that triggers our Jenkins renode unit-test job on PRs and push: main, polls Jenkins until the build finishes, and mirrors the Jenkins result back to the PR check.

How it works

  • Trigger: webhook to Jenkins's Generic Webhook Trigger plugin, sending adamant_xmera_components_ref (= the PR head SHA on PR builds, or github.sha on push) and any optional ref overrides supplied via workflow_dispatch.
  • Auth: Cloudflare Access service token on every Jenkins API call — the public webhook endpoint is allowlisted at the edge, but everything else is gated.
  • Polling: queue API → executable.url → build API → result. Jenkins's internal-IP executable.url is rewritten to the Cloudflare-fronted host so the GH runner can reach it.
  • On failure: last 200 lines of Jenkins console log are dumped into the GH log so reviewers don't need Jenkins UI access to see why a build failed.

Override capability

For DROP / integration testing, workflow_dispatch accepts optional ref inputs for any of the parameterized repos:

  • adamant_xmera_components_ref (default: PR head SHA)
  • adamant_ref
  • adamant_example_ref
  • fp32_fsw_xmera_ref
  • project_ref

Empty inputs use the Jenkins job's hardcoded fallback. URL overrides are supported on the Jenkins side (one parameter per repo) but not exposed via this workflow's inputs to keep the GH UI tight.

Required repository secrets

Secret Purpose
JENKINS_WEBHOOK_TOKEN Generic Webhook Trigger token on the Jenkins job
JENKINS_USER Jenkins service-account username for API polling
JENKINS_API_TOKEN API token for that user
CF_ACCESS_CLIENT_ID Cloudflare Access service token client ID
CF_ACCESS_CLIENT_SECRET Cloudflare Access service token client secret

@dinkelk dinkelk force-pushed the feature/cross-compile-test_renode branch 4 times, most recently from 972a58b to 37168e5 Compare May 8, 2026 20:19
@dinkelk dinkelk requested review from Jbsco and patkenneally May 8, 2026 20:28
@dinkelk dinkelk marked this pull request as ready for review May 8, 2026 20:29
@dinkelk dinkelk force-pushed the feature/cross-compile-test_renode branch 2 times, most recently from c364ee4 to 2834a23 Compare May 8, 2026 22:43
Comment thread .github/workflows/trigger_jenkins_renode.yml Outdated
Comment thread .github/workflows/trigger_jenkins_renode.yml Outdated
Comment thread .github/workflows/trigger_jenkins_renode.yml
Comment thread .github/workflows/trigger_jenkins_renode.yml Outdated
@dinkelk dinkelk force-pushed the feature/cross-compile-test_renode branch from 2834a23 to 9c20e18 Compare May 11, 2026 17:53
Trigger Jenkins generic-webhook on pull_request and push: main, then
poll Jenkins until the build finishes, mirroring its result back to
GitHub. The workflow's check on the PR is the commit status; no separate
Jenkins -> GitHub callback is needed.

Required repository secrets:
  JENKINS_WEBHOOK_TOKEN     Generic Webhook Trigger token on the Jenkins job
  JENKINS_USER              Jenkins service-account username (for API polling)
  JENKINS_API_TOKEN         Jenkins API token for that user
  CF_ACCESS_CLIENT_ID       Cloudflare Access service token client ID
  CF_ACCESS_CLIENT_SECRET   Cloudflare Access service token client secret
@dinkelk dinkelk force-pushed the feature/cross-compile-test_renode branch from 9c20e18 to 419f553 Compare May 11, 2026 18:00
Copy link
Copy Markdown
Collaborator

@Jbsco Jbsco left a comment

Choose a reason for hiding this comment

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

Nice addition to CI! Looks good to me once passing.

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.

2 participants