There's a 5 year old Github issue that asks for Azure to set the conventional CI
environment variable to true, so that it can be used by scripts relying on this convention.
Is env.CI
set today?
As of the date of this question, it appears that Azure DevOps services doesn't define or expose a CI
variable.
The TF_BUILD
variable will be defined and set to true for scripts running within an Azure Pipeline. This is the equivalent of the CI
variable. To be portable, a script could test for either CI
or TF_BUILD
.
(Azure DevOps was previously known as Team Foundation Server/Services (TFS), hence the TF in TF_BUILD
.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With