Skip to content

Commit

Permalink
feat: Set default CI environment variables (#40)
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 and knownasilya committed Aug 14, 2018
1 parent 051d6b3 commit 9586d5c
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 9586d5c

Please sign in to comment.