Axiom Refract + Jenkins
Integrate Axiom Refract architectural scans into your Jenkins CI/CD pipeline
How It Works
Add Credentials
Store your Axiom Refract API credentials in Jenkins Credential Manager. Use the "Secret text" credential type for the customer ID.
Create Pipeline Stage
Add an Axiom scan stage to your Jenkinsfile or freestyle project. The stage triggers a scan via the REST API and polls for completion.
Configure Triggers
Set the pipeline trigger to match your scanning cadence — post-commit, nightly, weekly, or manual.
Add Post-Build Actions
Optionally archive scan artifacts, publish reports to a shared location, or fail the build based on architectural quality thresholds.
What You Can Do
Pipeline-as-Code Integration
Add Axiom scanning as a declarative or scripted pipeline stage in your Jenkinsfile. The scan runs alongside your existing build, test, and deploy stages.
Build Quality Gates
Fail Jenkins builds when architectural metrics exceed thresholds. Configure SPOF count limits, maximum blast radius, or dead code percentage caps.
Multi-Branch Pipeline Support
Scan different branches independently in multi-branch pipeline configurations. Compare architectural state across branches.
Report Archiving
Archive scan results as Jenkins build artifacts. Access DOCX reports, JSON data, and SVG diagrams from any build's artifact page.
Setup
Add your Axiom customer ID to Jenkins Credential Manager (Manage Jenkins > Credentials). Add the Architecture Scan stage to your Jenkinsfile as shown above. The HTTP Request plugin is required for API calls. Push the Jenkinsfile update and the scan will run on the next pipeline execution.
// Jenkinsfile - Declarative Pipeline
pipeline {
agent any
environment {
AXIOM_CUSTOMER_ID = credentials('axiom-customer-id')
}
stages {
stage('Architecture Scan') {
steps {
script {
def response = httpRequest(
url: 'https://axiomrefract.com/api/v1/jobs',
httpMode: 'POST',
contentType: 'APPLICATION_JSON',
requestBody: """{
"repo_source": "${env.GIT_URL}",
"repo_type": "github",
"customer_id": "${AXIOM_CUSTOMER_ID}"
}"""
)
def jobId = readJSON(text: response.content).id
echo "Axiom scan started: ${jobId}"
}
}
}
}
}Why This Matters
Jenkins remains the most widely deployed CI/CD server in enterprise environments. Integrating Axiom Refract into Jenkins pipelines brings architectural governance into the existing build workflow that enterprises already depend on, without requiring migration to a new CI/CD platform.