Jenkins Properties as Environment Variables | Generated by AI
Yes, exactly! In Jenkins, “properties” typically refers to environment variables that are available during a job’s execution.
There are a few ways properties/environment variables work in Jenkins:
-
Environment variables - Jenkins automatically provides built-in variables like
BUILD_NUMBER,JOB_NAME,WORKSPACE, etc. - Pipeline properties - In declarative pipelines, you can set properties using the
environmentdirective:pipeline { environment { MY_VAR = 'some value' } } -
Properties file - You can also load properties from a file (like a
.propertiesfile) and use them as environment variables in your build. - Job parameters - When you configure parameters for a job, they become available as environment variables during execution.
So yes, when people talk about “Jenkins properties” in the context of a running job, they’re generally referring to these environment variables that the job can access and use during its execution.