CLOVIS
02/19/2025, 8:00 AMgitlabCi {
val helloWorld by job {
script {
shell("echo Hello world!")
}
}
}.println()
generates:
helloWorld:
script:
- echo Hello world!
Plugins allow pre-configuring other tools, for example Gradle:
gitlabCi {
val build by job {
useGradle()
script {
gradlew.task("build")
}
}
}.println()
generates:
build:
variables:
GRADLE_USER_HOME: $CI_BUILDS_DIR/.gradle
cache:
paths:
- .gradle/wrapper
key:
files:
- gradle/wrapper/gradle-wrapper.properties
script:
- ./gradlew build
which automatically configures caching for the Gradle Wrapper files.
https://opensavvy.gitlab.io/automation/gitlab-ci.kt/docscurioustechizen
02/19/2025, 8:19 AM