Add default "standard" CI=true environment variable

Issue #13406 resolved
Ville Skyttä created an issue

Many CI environments such as for example Travis, Codeship, CircleCI, Appveyor etc set the CI=true environment variable for their builds by default. Having Bitbucket pipelines do the same would ease transition/portability. (Sure, it can be configured in Bitbucket settings or the pipelines yml file, but I think this is something that would be good to set automatically by default.)

Comments (5)

  1. Sten Pittet

    Hi Ville,

    Could you please tell me more about your use case? How would you use this variable in your pipelines?

    Thanks,

    Sten

  2. Ville Skyttä reporter

    To name a few: For example to tell some scripts/programs invoked from bitbucket-pipelines.yml not to expect input on stdin i.e. to make them noninteractive when used in a CI environment, while keeping them interactive when invoked in a normal shell. Or to configure some things for the tests differently in a CI environment, such as database connections. Or to make the output of some programs better suited for (CI) logs rather than interactive console, such as disabling progress bars and the like.

  3. Davina Adisusila staff

    Hi Ville,

    We have added CI=true as a default environment variable which you can now use! For more information, refer to the table in our documentation.

    Cheers,
    Davina Adisusila

  4. Log in to comment