Skip to content

Add draft ItemConfigurator support for WorkflowJob - #782

Draft
somiljain2006 wants to merge 2 commits into
jenkinsci:masterfrom
somiljain2006:POC
Draft

Add draft ItemConfigurator support for WorkflowJob#782
somiljain2006 wants to merge 2 commits into
jenkinsci:masterfrom
somiljain2006:POC

Conversation

@somiljain2006

@somiljain2006 somiljain2006 commented Jul 31, 2026

Copy link
Copy Markdown

See jenkinsci/configuration-as-code-plugin#2881

Add a draft PipelineItemConfigurator implementation demonstrating how the proposed ItemConfigurator extension point can be used by the Workflow Job plugin to create and configure WorkflowJob instances through JCasC. This proof of concept supports configuring a job's name, description, and an inline CPS pipeline definition (CpsFlowDefinition), illustrating that the API can be extended beyond freestyle jobs. Example configuration:

items:
  - pipeline:
      name: "my-ci-pipeline"
      description: "Builds the project"
      definition:
        cps:
          script: |
            node {
              echo 'Hello Pipeline!'
            }

Testing done

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

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.

1 participant