File tree Expand file tree Collapse file tree 3 files changed +18
-13
lines changed Expand file tree Collapse file tree 3 files changed +18
-13
lines changed Original file line number Diff line number Diff line change @@ -68,18 +68,7 @@ if [ -n "$pull_requests" ]; then
68
68
uri_parser " $uri "
69
69
repo_host=" ${uri_schema} ://${uri_address} "
70
70
71
- # get base path in case bitbucket does not run on /
72
- base_path=" "
73
- for i in " ${! uri_parts[@]} "
74
- do
75
- if [ ${uri_parts[$i]} = " scm" ]; then
76
- break
77
- fi
78
-
79
- base_path=$base_path " /" ${uri_parts[$i]}
80
- done
81
-
82
- repo_host=${repo_host}${base_path}
71
+ repo_host=${repo_host} $( getBasePathOfBitbucket)
83
72
84
73
versions=" []"
85
74
while read pull_request ; do
Original file line number Diff line number Diff line change @@ -146,3 +146,19 @@ rawurlencode() {
146
146
regex_escape () {
147
147
echo " $1 " | sed ' s/[^^]/[&]/g; s/\^/\\^/g'
148
148
}
149
+
150
+ getBasePathOfBitbucket () {
151
+ # get base path in case bitbucket does not run on /
152
+
153
+ local base_path=" "
154
+ for i in " ${! uri_parts[@]} "
155
+ do
156
+ if [ ${uri_parts[$i]} = " scm" ]; then
157
+ break
158
+ fi
159
+
160
+ base_path=$base_path " /" ${uri_parts[$i]}
161
+ done
162
+
163
+ echo ${base_path}
164
+ }
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ repo_project=$(basename $(dirname "$uri"))
121
121
122
122
# parse uri and retrieve host
123
123
uri_parser " $uri "
124
- repo_host=" ${uri_schema} ://${uri_address} "
124
+ repo_host=" ${uri_schema} ://${uri_address} " $( getBasePathOfBitbucket )
125
125
126
126
# include ATC_EXTERNAL_URL in build status key, different sources should have different builds
127
127
build_key=" $BUILD_TEAM_NAME -$BUILD_PIPELINE_NAME -$BUILD_JOB_NAME -$ATC_EXTERNAL_URL "
You can’t perform that action at this time.
0 commit comments