Skip to content

Manage Jenkins jobs and folders

Declare jobs and folders in an items.yaml file referenced by a bundle source.

KindRequired content
foldername; may contain nested items
freeStylename
pipelinename and inline or SCM definition
multibranchname and at least one source
organizationFoldername and at least one navigator

Unknown kinds reject the bundle. Unknown fields are ignored, so validate field names before rollout.

removeStrategy:
items: none
rbac: sync
items:
- kind: folder
name: platform
items:
- kind: pipeline
name: deploy
properties:
- buildDiscarder:
strategy:
logRotator:
numToKeep: 30
definition:
cpsScmFlowDefinition:
scriptPath: Jenkinsfile
lightweight: true
scm:
gitSCM:
userRemoteConfigs:
- userRemoteConfig:
url: https://github.com/example/service.git
credentialsId: github-app
branches:
- branchSpec:
name: "*/main"

An inline definition uses definition.script:

- kind: pipeline
name: smoke
definition:
script: |
pipeline {
agent any
stages {
stage('test') { steps { echo 'ok' } }
}
}

Varroa creates missing items, updates changed items, and skips unchanged items.

removeStrategy.itemsUndeclared items
noneKeep all; formerly managed items stop converging
syncRemove undeclared managed items
remove-supportedRemove undeclared managed items of supported kinds
remove-allRemove undeclared items, including unmanaged items

Renaming creates the new path and treats the old path as a removal. Deletion also removes build history.

Unsafe removals appear in status.pendingItemDeletions and require the controller approve-deletion capability. A running job or unreadable build state can defer deletion.

SymptomCheck
Unknown kindUse one of the five supported values
Setting is absentField spelling and indentation
Deletion is pendingPending path, build state, and approval
Kind is unsupportedKeep it unmanaged