Skip to content

Commit

Permalink
Fix cloning issue (#70)
Browse files Browse the repository at this point in the history
* Fix cloning issue
  • Loading branch information
ahmedwaleedmalik authored Jun 19, 2020
1 parent b9b6ca9 commit a031afb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/io/stakater/vc/Git.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def cloneRepoWithCredentials(String repoURL, String username, String password, S
def common = new io.stakater.Common()
String newURL = common.replaceCredentialsInHttpURL(repoURL, username, password)
sh """
git clone $newURL .
git clone $newURL . 2>/dev/null
git checkout $branchName
"""
}
Expand Down
4 changes: 2 additions & 2 deletions vars/releaseApplication.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def call(body) {

timestamps {
stakaterNode(config) {
withSCM { String repoUrl, String repoName, String repoOwner, String repoBranch ->
withSCM { String repoUrl, String repoName, String repoOwner, String repoBranch, String repoCloneBranch ->

def appConfig = new io.stakater.app.AppConfig()
Map packageConfig = appConfig.getPackageConfig(config)
Expand Down Expand Up @@ -42,7 +42,7 @@ def call(body) {
def buildException = null

if (cloneUsingToken && !isPullRequest) {
git.cloneRepoWithCredentials(repoUrl, gitConfig.user, gitConfig.tokenSecret, repoBranch)
git.cloneRepoWithCredentials(repoUrl, gitConfig.user, gitConfig.tokenSecret, repoCloneBranch)
}
else {
checkout scm
Expand Down

0 comments on commit a031afb

Please sign in to comment.