scrutinizer-ci / scrutinizer

Legacy repository - archives past feature requests/bug reports
https://scrutinizer-ci.com/docs
140 stars 36 forks source link

Set environment variable for entire build #326

Closed tonglil closed 9 years ago

tonglil commented 9 years ago

How can I set an environment variable for the entire build? I can't find it in the docs.

The best I could find was here but I don't want to override the command.

If I don't it throws: Configuration was invalid: The child node "command" at path "before.0" must be configured.

How do I set it in the "environment" build section?

There should be something like how other ci services can define custom environment variables

schmittjoh commented 9 years ago

There are two options:

build:
    environment:
        variables: 
             FOO: BAR

    dependencies:
        before:
            - export FOO=BAR # via a regular unix command

You are right, we should have that in the docs though.

tonglil commented 9 years ago

Thank you for the options, #1 was what I was looking for.