-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: specify branch explicitly to git reset command
- Loading branch information
rnakayam
committed
Apr 4, 2018
1 parent
8c1b0d7
commit 912209f
Showing
4 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"name": "sd-checkout-code", | ||
"command": "echo Cloning github.com/screwdriver-cd/guide, on branch branchName && if [ ! -z $SCM_CLONE_TYPE ] && [ $SCM_CLONE_TYPE = ssh ]; then export SCM_URL=git@github.com:screwdriver-cd/guide; elif [ ! -z $SCM_USERNAME ] && [ ! -z $SCM_ACCESS_TOKEN ]; then export SCM_URL=https://$SCM_USERNAME:$SCM_ACCESS_TOKEN@github.com/screwdriver-cd/guide; else export SCM_URL=https://github.com/screwdriver-cd/guide; fi && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git clone --recursive --quiet --progress --branch branchName $SCM_URL $SD_SOURCE_DIR\" && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git reset --hard 12345\" && echo Reset to 12345 && echo Setting user name and user email && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git config user.name sd-buildbot\" && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git config user.email dev-null@screwdriver.cd\" && export GIT_URL=$SCM_URL.git && export GIT_MERGE_AUTOEDIT=no && export GIT_BRANCH=origin/branchName" | ||
"command": "echo Cloning github.com/screwdriver-cd/guide, on branch branchName && if [ ! -z $SCM_CLONE_TYPE ] && [ $SCM_CLONE_TYPE = ssh ]; then export SCM_URL=git@github.com:screwdriver-cd/guide; elif [ ! -z $SCM_USERNAME ] && [ ! -z $SCM_ACCESS_TOKEN ]; then export SCM_URL=https://$SCM_USERNAME:$SCM_ACCESS_TOKEN@github.com/screwdriver-cd/guide; else export SCM_URL=https://github.com/screwdriver-cd/guide; fi && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git clone --recursive --quiet --progress --branch branchName $SCM_URL $SD_SOURCE_DIR\" && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git reset --hard 12345 --\" && echo Reset to 12345 && echo Setting user name and user email && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git config user.name sd-buildbot\" && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git config user.email dev-null@screwdriver.cd\" && export GIT_URL=$SCM_URL.git && export GIT_MERGE_AUTOEDIT=no && export GIT_BRANCH=origin/branchName" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"name": "sd-checkout-code", | ||
"command": "echo Cloning github.com/screwdriver-cd/guide, on branch branchName && if [ ! -z $SCM_CLONE_TYPE ] && [ $SCM_CLONE_TYPE = ssh ]; then export SCM_URL=git@github.com:screwdriver-cd/guide; elif [ ! -z $SCM_USERNAME ] && [ ! -z $SCM_ACCESS_TOKEN ]; then export SCM_URL=https://$SCM_USERNAME:$SCM_ACCESS_TOKEN@github.com/screwdriver-cd/guide; else export SCM_URL=https://github.com/screwdriver-cd/guide; fi && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git clone --recursive --quiet --progress --branch branchName $SCM_URL $SD_SOURCE_DIR\" && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git reset --hard branchName\" && echo Reset to branchName && echo Setting user name and user email && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git config user.name pqrs\" && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git config user.email dev-null@my.email.com\" && export GIT_URL=$SCM_URL.git && export GIT_MERGE_AUTOEDIT=no && echo Fetching PR and merging with branchName && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git fetch origin pull/3/head:pr\" && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git merge 12345\" && export GIT_BRANCH=origin/refs/pull/3/head:pr" | ||
"command": "echo Cloning github.com/screwdriver-cd/guide, on branch branchName && if [ ! -z $SCM_CLONE_TYPE ] && [ $SCM_CLONE_TYPE = ssh ]; then export SCM_URL=git@github.com:screwdriver-cd/guide; elif [ ! -z $SCM_USERNAME ] && [ ! -z $SCM_ACCESS_TOKEN ]; then export SCM_URL=https://$SCM_USERNAME:$SCM_ACCESS_TOKEN@github.com/screwdriver-cd/guide; else export SCM_URL=https://github.com/screwdriver-cd/guide; fi && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git clone --recursive --quiet --progress --branch branchName $SCM_URL $SD_SOURCE_DIR\" && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git reset --hard branchName --\" && echo Reset to branchName && echo Setting user name and user email && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git config user.name pqrs\" && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git config user.email dev-null@my.email.com\" && export GIT_URL=$SCM_URL.git && export GIT_MERGE_AUTOEDIT=no && echo Fetching PR and merging with branchName && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git fetch origin pull/3/head:pr\" && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git merge 12345\" && export GIT_BRANCH=origin/refs/pull/3/head:pr" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"name": "sd-checkout-code", | ||
"command": "echo Cloning github.com/screwdriver-cd/guide, on branch branchName && if [ ! -z $SCM_CLONE_TYPE ] && [ $SCM_CLONE_TYPE = ssh ]; then export SCM_URL=git@github.com:screwdriver-cd/guide; elif [ ! -z $SCM_USERNAME ] && [ ! -z $SCM_ACCESS_TOKEN ]; then export SCM_URL=https://$SCM_USERNAME:$SCM_ACCESS_TOKEN@github.com/screwdriver-cd/guide; else export SCM_URL=https://github.com/screwdriver-cd/guide; fi && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git clone --recursive --quiet --progress --branch branchName $SCM_URL $SD_SOURCE_DIR\" && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git reset --hard branchName\" && echo Reset to branchName && echo Setting user name and user email && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git config user.name sd-buildbot\" && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git config user.email dev-null@screwdriver.cd\" && export GIT_URL=$SCM_URL.git && export GIT_MERGE_AUTOEDIT=no && echo Fetching PR and merging with branchName && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git fetch origin pull/3/head:pr\" && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git merge 12345\" && export GIT_BRANCH=origin/refs/pull/3/head:pr" | ||
"command": "echo Cloning github.com/screwdriver-cd/guide, on branch branchName && if [ ! -z $SCM_CLONE_TYPE ] && [ $SCM_CLONE_TYPE = ssh ]; then export SCM_URL=git@github.com:screwdriver-cd/guide; elif [ ! -z $SCM_USERNAME ] && [ ! -z $SCM_ACCESS_TOKEN ]; then export SCM_URL=https://$SCM_USERNAME:$SCM_ACCESS_TOKEN@github.com/screwdriver-cd/guide; else export SCM_URL=https://github.com/screwdriver-cd/guide; fi && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git clone --recursive --quiet --progress --branch branchName $SCM_URL $SD_SOURCE_DIR\" && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git reset --hard branchName --\" && echo Reset to branchName && echo Setting user name and user email && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git config user.name sd-buildbot\" && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git config user.email dev-null@screwdriver.cd\" && export GIT_URL=$SCM_URL.git && export GIT_MERGE_AUTOEDIT=no && echo Fetching PR and merging with branchName && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git fetch origin pull/3/head:pr\" && $(if git --version > /dev/null 2>&1; then echo 'eval'; else echo 'sd-step exec core/git'; fi) \"git merge 12345\" && export GIT_BRANCH=origin/refs/pull/3/head:pr" | ||
} |