Rather than check out a release repo to see if it exists or not use git ls-remote to establish if it exists
This commit is contained in:
parent
a42acef027
commit
7a62550a07
1 changed files with 2 additions and 2 deletions
|
|
@ -115,7 +115,7 @@ def gitCheckout(String gitURL, String revision, String targetDir, String repoRoo
|
|||
}
|
||||
|
||||
def checkRepoExists(String gitURL) {
|
||||
def boolean result = false
|
||||
def int result = 0
|
||||
if (isUnix()) {
|
||||
result = sh( script: """
|
||||
git ls-remote "${gitURL}" CHECK_GIT_REMOTE_URL_REACHABILITY
|
||||
|
|
@ -129,7 +129,7 @@ def checkRepoExists(String gitURL) {
|
|||
returnStatus: true
|
||||
)
|
||||
}
|
||||
if (!result) {
|
||||
if (result > 0) {
|
||||
echo "git ls-remote return result: ${result}"
|
||||
error("The release repo: ${gitURL} cannot be found. Please ensure this exists before building")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue