Skip to main content

Action Platform

apx-jenkins

Jenkins as a first-class CI in Action Platform: run, follow and govern it from one place.

PyPI Release CI License Python


A Jenkins controller you already run should not need a second system to deploy through, and its roles should not drift from who is supposed to have access. apx-jenkins is the Action Platform plugin that brings Jenkins in: the CI runner the platform deploys and runs CI through, access management through Role-based Authorization Strategy, and read-only tools for jobs, builds and the build queue. apx- is the prefix every Action Platform extension carries.

The core does not know Jenkins: this plugin brings the Jenkins CIRunner, registered in the action_platform.ci_runner entry-point group, and the core resolves it by name wherever run_by = "jenkins" or a Jenkins CI host appears. The access capability runs where the core runs service access: on a hosted platform whose API image carries this plugin, with the options filled under Plugins for the organization. The tools and commands run on the machine that installed it.

What you get

  • A CI runner. JenkinsRunner implements the core's CIRunner contract on the controller's own API: runs, stages, logs, tests, artifacts, queue, executors and pending inputs, and starting a build with the crumb. See CI runner.
  • Access management. The platform's service access gets a jenkins service: who holds which role, drift against the organization's mapping, grants, revokes and syncs, on global roles and per-folder item roles. See Access.
  • Read-only tools. jenkins_jobs, jenkins_build and jenkins_queue, plus the same as action-platform jenkins commands, next to the core's ci_runs, ci_run, ci_log and ci_queue. They never write.

Install

action-platform plugin install jenkins

Then fill the options under Plugins, Configure on the platform, or on a machine either export the AP_JENKINS_* variables or store the options (~/.action-platform/plugins/jenkins.json).

Option Environment variable What
url AP_JENKINS_URL The controller's address, e.g. https://jenkins.example.com
user AP_JENKINS_USER The Jenkins user id the token belongs to
token AP_JENKINS_TOKEN That user's API token (user menu, Security, API Token)

On a machine the tools, the commands and the core's ci_* tools read the environment variable first and the options file second. The access capability reads only the options, so a platform keeps the credentials sealed.

What the token needs

  • CI runner: read on the jobs it follows, and Item/Build on the jobs a deploy or Run CI starts.
  • Tools and commands: the user must be able to read the jobs, builds and queue it asks for. They never write.
  • Access: the user must be a Jenkins administrator (Overall/Administer), the Role-based Authorization Strategy plugin installed, and selected under Manage Jenkins, Security, Authorization. Without it the provider answers with what to install.

Access

The plugin gives the platform's service access a jenkins service: who holds which role, drift against the organization's mapping, and grants, revokes and syncs. Accounts are Jenkins user ids; group:<name> addresses a group.

Resource Levels What it is
global read, admin A global role named read (Overall/Read, View/Read) or admin (Overall/Administer)
folder/<name> read, build, configure An item role folder:<name>:<level> matching the folder and every job in it
global-role/<name> assigned A global role this plugin did not create
item-role/<name> assigned An item role this plugin did not create, such as one that opens a single job

Item roles hold these permissions, each level including the one before it:

Level Permissions
read Item/Read, Item/Discover
build read + Item/Build, Item/Cancel, Item/Workspace
configure build + Item/Configure, Item/Create, Item/Delete, Run/Delete, Run/Update
  • A folder is invisible without Overall/Read, so a folder grant also adds global read to the account.
  • A role the plugin needs is created on the first grant; a change of level assigns the new role and unassigns the old one.
  • Roles it did not create are read as global-role/<name> and item-role/<name> with level assigned, so an import records them and a sync leaves them alone.
  • An administrator can never be the last one: a change that would leave Jenkins without a global admin is refused before anything is sent.
  • Older versions of role-strategy without the user and group assignment calls are served through the generic assignRole.

CI runner

apx_jenkins.runner.JenkinsRunner implements the core's CIRunner contract on the controller's own API:

Method Jenkins
test api/json?tree=mode
runs, run api/json with builds[…]: status, branch and revision, parameters, causes (with the user id), changeSets
start, run_of buildWithParameters (or build) with the crumb, then the queue item until it becomes a build; a cancelled item is an error
stages wfapi/describe; parallel stages are listed as stages, parent_id stays empty since the endpoint does not say which stage holds them
log, log_stream logText/progressiveText?start= for the console, read no further than the window (limit, 256 KB by default) and cut after a line break, next_start and more from X-Text-Size and X-More-Data; execution/node/{id}/wfapi/log for one stage or step, windowed the same way. log_stream walks the console window by window without holding it
tests testReport/api/json; none when the build published no report
artifacts, artifact artifacts[relativePath] and artifact/<path>, streamed
queue, executors queue/api/json, computer/api/json
pending_inputs wfapi/pendingInputActions

Tools

The core's ci_runs, ci_run, ci_log and ci_queue tools (and action-platform ci …) read Jenkins through the runner. This plugin adds jenkins_* tools and action-platform jenkins commands. All are read-only.

Tool Command Does
jenkins_jobs jenkins jobs [folder] The jobs of a folder, or of the root: kind, status and the last build's number, result, time and duration. Pass a job path to read that one job.
jenkins_build jenkins build <job> [number] Alias of ci_run: one build, the last when no number is given, with its parameters, causes and changes. The console is ci_log.
jenkins_queue jenkins queue Alias of ci_queue: what waits in the build queue, since when and why.

A job is addressed by the path Jenkins shows in its URL without the job/ segments: team/app, team/app/main.

Develop

pip install -e ".[dev]"
ruff check . && ruff format --check . && pytest -q

tests/fake.py is a controller in memory that answers only what Jenkins answers. tests/live/ runs read-only against a real controller and is skipped unless AP_JENKINS_LIVE=1 and AP_JENKINS_URL, AP_JENKINS_USER and AP_JENKINS_TOKEN are set; it changes no role and starts no build.

How it fits in Action Platform

Action Platform turns scaffold, CI, versioning and deploy into one set of verbs on a CLI, a web app and an MCP server, and runs on the GitHub Actions, GitLab CI, Jenkins or Bitbucket Pipelines you already have. This plugin is the Jenkins side: once installed, a Jenkins CI host shows its runs next to the releases and a click starts one. It is listed in plugins-index; apx-example is the template for writing another plugin. The Jenkins shared library the platform's projects call is ci-jenkins.

Contributing

Git-flow branches (<kind>/<issue>-slug), Conventional Commits and one pull request per change, as in the main repository's guide. Rules for contributors and agents are in AGENTS.md; see Develop for the test setup.

License

Apache 2.0 — see LICENSE.

Metadata

Release files for apx-jenkins 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apx-jenkins 0.2.2
File Size Uploaded Provenance Actions
apx_jenkins-0.2.2.tar.gz 31.9 kB With provenance Details for apx_jenkins-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for apx-jenkins 0.2.2
File Interpreter ABI Platform Actions
apx_jenkins-0.2.2-py3-none-any.whl Python 3 none any Details for apx_jenkins-0.2.2-py3-none-any.whl

Total release size: 55.6 kB

Release files / apx_jenkins-0.2.2.tar.gz

Download URL apx_jenkins-0.2.2.tar.gz
Size 31.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c31939d43131c2ad309bc86605b76a09c6bc8938bfcee635ab75f2c154a41da3
BLAKE2b-256 checksum
How to use checksums
4ca237f8dd5cbe47d5996f5391e3f25a4b15ce66589f770ef51e7548e94463ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Release files / apx_jenkins-0.2.2-py3-none-any.whl

Download URL apx_jenkins-0.2.2-py3-none-any.whl
Size 23.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5dcbd9dc6fbcb627b8f9e0296d1e1bb4aae74a7e19c5adbd7c0c9811358b23c8
BLAKE2b-256 checksum
How to use checksums
4a67a779457e0e8f02e4bb515fa5f576b4bae7155d39135192102bcdd02f3706
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

Security for apx-jenkins 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for apx_jenkins-0.2.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page