Interview Prep/Jenkins/Plugins, JCasC & Jenkins on Kubernetes

How do you create jobs from JCasC?

IntermediateConceptPlugins, JCasC & Jenkins on Kubernetes
Answer

Install the Job DSL plugin and put DSL scripts under jobs:.

jobs:
  - script: >
      folder('payments')
  - file: /var/jenkins_config/jobs/multibranch.groovy

Job DSL creates or updates folders, pipelines and multibranch jobs idempotently. Combined with JCasC, a brand-new controller comes up with every folder and multibranch job defined, and indexing recreates the branch jobs.

All Jenkins questions Roadmap: Jenkins

More on Plugins, JCasC & Jenkins on Kubernetes