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.
More on Plugins, JCasC & Jenkins on Kubernetes
How do you manage plugins in a reproducible way?IntermediateWhat does `jenkins-plugin-cli` resolve for you, and what flags matter?IntermediateWhy should you keep the number of plugins low?BeginnerWhat is JCasC and how is it loaded?BeginnerWhat are the top-level root elements in a JCasC file?IntermediateHow do you inject secrets into JCasC without committing them?Advanced