chore_: set $GIT_COMMIT for codeclimate (#5315)
When Jenkins creates a build, it can sometimes run the build on a detached HEAD, causing the commit SHA to be different from the SHA of your branch. This will cause issues when reporting test coverage to Code Climate. Setting `GIT_COMMIT` fixes code climate upload errors. ref -> https://docs.codeclimate.com/docs/jenkins#jenkins-ci-builds Closes #5294
This commit is contained in:
parent
c2f5bdb907
commit
8e53f62331
|
@ -128,6 +128,8 @@ grep -h -v "^mode:" ./**/*.coverage.out >> c.out
|
|||
rm -rf ./**/*.coverage.out
|
||||
|
||||
if [[ $UNIT_TEST_REPORT_CODECLIMATE == 'true' ]]; then
|
||||
# https://docs.codeclimate.com/docs/jenkins#jenkins-ci-builds
|
||||
GIT_COMMIT=$(git log | grep -m1 -oE '[^ ]+$')
|
||||
cc-test-reporter after-build --prefix=github.com/status-im/status-go
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue