use DOCKER_WORKDIR for git safe.directory
hardcoding the dir /usr/src/app for git safe.directory doesn't still leaves plugins broken. Change to use $DOCKER_WORKDIR. flag: none Test Plan: - plugin jenkins build generates crystalball prediction - standard jenkins build generates crystalball prediction Change-Id: I06b3be6884685377fca3653f18db6a0a0157800d Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/319114 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> Reviewed-by: Andrea Cirulli <andrea.cirulli@instructure.com> Product-Review: James Butters <jbutters@instructure.com> Build-Review: James Butters <jbutters@instructure.com> QA-Review: James Butters <jbutters@instructure.com>
This commit is contained in:
parent
eecdbc334b
commit
0e96f3b758
|
@ -436,10 +436,11 @@ pipeline {
|
|||
docker exec -dt general-build-container bin/rails graphql:schema
|
||||
'''
|
||||
|
||||
@SuppressWarnings('GStringExpressionWithinString')
|
||||
def crystalballStep = '''
|
||||
diffFrom=$(git --git-dir $LOCAL_WORKDIR/.git rev-parse $GERRIT_PATCHSET_REVISION^1)
|
||||
# crystalball will fail without adding /usr/src/app to safe.directory
|
||||
docker exec -t general-build-container bash -c 'git config --global --add safe.directory /usr/src/app'
|
||||
# crystalball will fail without adding $DOCKER_WORKDIR to safe.directory
|
||||
docker exec -t general-build-container bash -c "git config --global --add safe.directory ${DOCKER_WORKDIR%/}"
|
||||
docker exec -dt \
|
||||
-e CRYSTALBALL_DIFF_FROM=$diffFrom \
|
||||
-e CRYSTALBALL_DIFF_TO=$GERRIT_PATCHSET_REVISION \
|
||||
|
|
Loading…
Reference in New Issue