move around git env vars for reusablitiy

refs DE-394

[canvas-builds-refspec=43d102f7b4e50ee2af1856d70f430d16c11dfc40]

Change-Id: I6f7a839e0f751356b40bb669e22ab83da2955f6d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/253439
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
QA-Review: Aaron Ogata <aogata@instructure.com>
Product-Review: Aaron Ogata <aogata@instructure.com>
Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com>
This commit is contained in:
Aaron Ogata 2020-11-20 11:38:26 -08:00
parent 9d7958fcaf
commit 5ee68917a5
2 changed files with 1 additions and 3 deletions

1
Jenkinsfile vendored
View File

@ -306,7 +306,6 @@ def getCanvasLmsRefspec() {
// =========
def rebaseHelper(branch, commitHistory = 100) {
git.setGitUser(env.GERRIT_EVENT_ACCOUNT_NAME, env.GERRIT_EVENT_ACCOUNT_EMAIL)
git.fetch(branch, commitHistory)
if (!git.hasCommonAncestor(branch)) {
error "Error: your branch is over ${commitHistory} commits behind $GERRIT_BRANCH, please rebase your branch manually."

View File

@ -2,8 +2,7 @@
set -o errexit -o errtrace -o nounset -o pipefail -o xtrace
GIT_SSH_COMMAND='ssh -i "$SSH_KEY_PATH" -l "$SSH_USERNAME"' \
git fetch --depth 1 --force --no-tags origin "$GERRIT_BRANCH":"$GERRIT_BRANCH"
git fetch --depth 1 --force --no-tags origin "$GERRIT_BRANCH":"$GERRIT_BRANCH"
inputs=()
inputs+=("--volume $(pwd)/.git:/usr/src/app/.git")