Home

markdown notes

Jenkins

Jenkins is an open source automation server.
It helps automate the parts of software development related to building, testing, and deploying.

get a property

This happens because printenv shows environment variables, but in your build.gradle you are using System.getProperty(‘CI’), which reads Java system properties, not environment variables.

To access the CI environment variable in build.gradle, use System.getenv(‘CI’) instead:

println "####### CI: ${System.getenv('CI')}"
if (System.getenv('CI') == 'true') {
    // your logic here
}