ci-detector
Usage
If you pass an object of environment variable in the argument, it automatically detects the environment.
You do not need to worry about the difference of environment variables of ci server.
var util = ;var detector = ;var env = detector;util; //travis-ciutil; //masterutil; //1d3b5371ef1851caf256773efb9deb9e27875272
Check the environment
You can check the environment as follows.
Supported method isTravisCI, isCircleCI, isDroneIO, isCodeship, isJenkins.
var util = ;var detector = ; console; //trueconsole; //falseconsole; //falseconsole; //falseconsole; //false
Access to environment variables
You can check the environment variable in the has method.
To get the environment variables you can use the get method.
var util = ;var detector = ;var env = detector; if env util; //true util; //true
Support ci services
Enviroment properties
- branch - the branch currently being built
- commit - the commit hash currently being built
- buildId - the current build id
- buildNumber - the current build number
- buildJobId - the current build job id
- buildJobNumber - the current build job number