Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop using configure block in seed-github-ci.Jenkinsfile #77

Open
jlebon opened this issue Jan 20, 2025 · 0 comments
Open

Stop using configure block in seed-github-ci.Jenkinsfile #77

jlebon opened this issue Jan 20, 2025 · 0 comments
Assignees
Labels

Comments

@jlebon
Copy link
Member

jlebon commented Jan 20, 2025

I think all the knobs in

// things which don't seem to have a nice DSL :(
configure {
it / sources / data / 'jenkins.branch.BranchSource' / strategy {
properties(class: 'java.util.Arrays\$ArrayList') {
a(class: 'jenkins.branch.BranchProperty-array') {
'org.jenkinsci.plugins.workflow.multibranch.DurabilityHintBranchProperty' {
// we don't care about durability for these CI
// jobs. we should be able to interrupt and
// restart from scratch whenever
hint('PERFORMANCE_OPTIMIZED')
}
}
}
}
it / sources / data / 'jenkins.branch.BranchSource' / source << {
traits {
'org.jenkinsci.plugins.github__branch__source.BranchDiscoveryTrait' {
strategyId(1)
}
'org.jenkinsci.plugins.github__branch__source.OriginPullRequestDiscoveryTrait' {
strategyId(1)
}
'org.jenkinsci.plugins.github__branch__source.ForkPullRequestDiscoveryTrait' {
strategyId(1)
// allow testing of PRs from project contributors
trust(class: 'org.jenkinsci.plugins.github_branch_source.ForkPullRequestDiscoveryTrait\$TrustContributors')
}
}
}
it / sources / data / 'jenkins.branch.BranchSource' / buildStrategies {
'jenkins.branch.buildstrategies.basic.ChangeRequestBuildStrategyImpl' {
ignoreTargetOnlyChanges(true)
}
}
}
can now be represented natively in job DSL. Let's do that to make it less obscure.

Job DSL API on CoreOS CI: https://jenkins-coreos-ci.apps.ocp.fedoraproject.org/plugin/job-dsl/api-viewer/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants