File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,18 @@ bootstrap_ci_env ()
25
25
VERSION=${GIT_TAG: 1}
26
26
BUILD=$CI_BUILD_ID
27
27
28
+ elif [ " $JENKINS_URL " != " " ];
29
+ then
30
+ say " Jenkins CI detected."
31
+ # Jenkins GIT_BRANCH is like 'origin/master'
32
+ GIT_BRANCH=${GIT_BRANCH#*/ }
33
+ GIT_COMMIT=$GIT_COMMIT
34
+ BUILD=$BUILD_NUMBER
35
+ VERSION=${GIT_TAG: 1}
36
+ # $GIT_COMMIT and $GIT_BRANCH is exported by Jenkins
37
+ # https://wiki.jenkins-ci.org/display/JENKINS/Building+a+software+project
38
+ # https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+request+builder+plugin#GitHubpullrequestbuilderplugin-EnvironmentVariables
39
+
28
40
elif [ " $CI " = " true" ] && [ " $CIRCLECI " = " true" ];
29
41
then
30
42
say " Circle CI detected."
@@ -33,6 +45,8 @@ bootstrap_ci_env ()
33
45
GIT_COMMIT=$CIRCLE_SHA1
34
46
VERSION=${GIT_TAG: 1}
35
47
BUILD=$CIRCLE_BUILD_NUM
48
+ else
49
+ say " Unknown CI detected."
36
50
fi
37
51
38
52
# Fallback to default values
You can’t perform that action at this time.
0 commit comments