I am just wondering is it possible that I can tell whether I am in a Jenkins environment inside gradle? I just want to do something like
if (jenkins){
//do something
}else{
//do other
}
I am just wondering is it possible that I can tell whether I am in a Jenkins environment inside gradle? I just want to do something like
if (jenkins){
//do something
}else{
//do other
}
You could check for existence of build-specific environment variables, like
$BUILD_ID
or$BUILD_URL
, etc. They really shouldn't exist outside of Jenkins build, but if your environment is polluted, you could have them.