Skip to content

Commit 710d17d

Browse files
author
Cesar Rodriguez
authored
Merge pull request #32 from nasir-rabbani/repo-url-fix
fix repo url for gitlab and bitbucket
2 parents 3a604e1 + afcc98a commit 710d17d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

entrypoint.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ if [ "x${GITHUB_SERVER_URL}" != "x" ]; then
2929
elif [ "x${CI_SERVER_URL}" != "x" ]; then
3030
# Handling GitLab
3131
SCM_SERVER_URL="${CI_SERVER_URL}"
32-
REPO_URL="${CI_REPOSITORY_URL}"
32+
REPO_URL="https://${CI_REPOSITORY_URL#https:*@}"
3333
REF_NAME="${CI_COMMIT_REF_NAME}"
3434

3535
elif [ "x${BITBUCKET_GIT_HTTP_ORIGIN}" != "x" ]; then
3636
# Handling Bitbucket
3737
SCM_SERVER_URL="https://$(echo ${BITBUCKET_GIT_HTTP_ORIGIN#"http://"} | cut -d'/' -f 1)"
38-
REPO_URL="${SCM_SERVER_URL}/${BITBUCKET_REPO_FULL_NAME}"
38+
REPO_URL="${SCM_SERVER_URL}/${BITBUCKET_REPO_FULL_NAME}.git"
3939

4040
if [ "x${BITBUCKET_BRANCH}" != "x" ]; then
4141
REF_NAME="${BITBUCKET_BRANCH}"

0 commit comments

Comments
 (0)