From 0c333da7cecfa78fec6e3a612ac277184d7081d5 Mon Sep 17 00:00:00 2001 From: Thomas Watson Date: Sat, 18 Nov 2017 10:56:29 +0100 Subject: [PATCH] Set default environment variables 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 https://github.com/Strider-CD/strider/issues/892 --- lib/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/index.js b/lib/index.js index fba4bde..c7dd3ee 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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;