JSONFlow Jenkins Plugin

Format, Validate, and Transform JSON Data

Installation & Prerequisites

Integrate JSONFlow directly into your Jenkins control plane without external dependencies. The plugin runs natively on Jenkins 2.387+ and requires Java 11.

Navigate to Manage Jenkins > Plugins > Available Plugins, search for jsonflow-ci, and click Install. Alternatively, drop the `jsonflow.hpi` artifact from the `tech/json-toolkit` releases page into your `/plugins` directory. After installation, restart Jenkins or trigger a safe reload. Verify the integration by checking the System Log for the `JSONFlowAgent initialized` message.

Jenkinsfile Integration

Embed JSONFlow steps directly into your declarative or scripted pipelines to catch schema drift and enforce configuration standards before deployment.

pipeline {
    agent any
    stages {
        stage('Validate Configs') {
            steps {
                jsonflowValidate(
                    target: 'src/main/resources/application-config.json',
                    schema: 'schemas/v2/app-config.schema.json',
                    failOnWarning: true
                )
            }
        }
        stage('Transform Secrets') {
            steps {
                jsonflowTransform(
                    input: 'secrets/raw-payload.json',
                    template: 'templates/decrypt-and-mask.jt',
                    output: 'secrets/processed-payload.json',
                    envVars: ['VAULT_TOKEN']
                )
            }
        }
    }
}

The `jsonflowValidate` step halts the build immediately if structural violations occur, while `jsonflowTransform` applies deterministic JSONata expressions to sanitize sensitive fields before artifact promotion.

Global & Step-Level Configuration

Tune JSONFlow behavior to match your organization's compliance requirements and performance thresholds.

Schema Strictness

Enable `draft-07` or `draft-2020-12` validation modes. Set `additionalProperties` enforcement to reject unexpected keys in production manifests.

Timeout & Memory Limits

Configure `maxPayloadSize` (default 15MB) and `executionTimeout` (default 30s) to prevent large configuration dumps from blocking the Jenkins executor pool.

Secret Masking

Activate automatic credential redaction in console output. JSONFlow integrates with the Mask Passwords Plugin to scrub AWS keys, API tokens, and database URIs.

Common Issues & Resolutions

Resolve build failures and plugin conflicts quickly using these documented diagnostics.

  • Schema Resolution Error: If you see `UNRESOLVABLE_REF`, ensure your relative `$ref` paths in the schema file match the workspace root. JSONFlow does not support external HTTP schema references by default.
  • Executor Hang: Large transformation jobs may stall if `parallelThreads` exceeds the available CPU cores. Reduce the thread count in the plugin's global configuration or split payloads into smaller chunks.
  • Console Output Truncation: When processing files over 8MB, Jenkins may truncate logs. Enable `logCompression` in the step configuration to archive full validation reports as build artifacts.

For persistent issues, capture the `jsonflow-debug.log` from your workspace and submit a ticket to the `tech/json-toolkit` maintainers with your Jenkins version and plugin build number.