← Каталог
Job DSL Playground — jobs Jenkins как код — job — Freestyle и shell
Фрагмент из «Job DSL Playground — jobs Jenkins как код»: job — Freestyle и shell.
job('hello-groovy-nightly') {
description('Ночной прогон тестов hello-groovy')
scm {
git {
remote { url('https://github.com/example/hello-groovy.git') }
branch('main')
}
}
triggers {
cron('H 2 * * *')
}
steps {
shell('./gradlew test --no-daemon')
}
publishers {
junit('**/build/test-results/test/*.xml')
}
} job('hello-groovy-nightly') {
description('Ночной прогон тестов hello-groovy')
scm {
git {
remote { url('https://github.com/example/hello-groovy.git') }
branch('main')
}
}
triggers {
cron('H 2 * * *')
}
steps {
shell('./gradlew test --no-daemon')
}
publishers {
junit('**/build/test-results/test/*.xml')
}
}