Skip to content

Commit

Permalink
Set default environment variables
Browse files Browse the repository at this point in the history
This allows code being run by the CI server to detect that it's running
inside a CI server.

The `CI` environment variable is exposed by most major CI servers, but
having a vendor specific environment variable (i.e. `STRIDER`) is also
common practice.

For details see issue Strider-CD/strider#892
  • Loading branch information
watson authored Nov 18, 2017
1 parent 051d6b3 commit 0c333da
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,10 @@ Runner.prototype = {
return next(err);
}

var env = {};
var env = {
CI: 'true',
STRIDER: 'true',
};

if (config.envKeys) {
env.STRIDER_SSH_PUB = config.pubkey;
Expand Down

0 comments on commit 0c333da

Please sign in to comment.