Skip to content

Commit

Permalink
Set default git SHA for codecov when building main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
jsiirola committed Jul 8, 2024
1 parent 53d5cad commit 205eb3d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .jenkins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,10 @@ if test -z "$MODE" -o "$MODE" == test; then
coverage report -i || exit 1
coverage xml -i || exit 1
export OS=`uname`
if test -n "$CODECOV_TOKEN"; then
if test -z "$PYOMO_SOURCE_SHA"; then
PYOMO_SOURCE_SHA=$GIT_COMMIT
fi
if test -n "$CODECOV_TOKEN" -a -n "$PYOMO_SOURCE_SHA"; then
CODECOV_JOB_NAME=`echo ${JOB_NAME} | sed -r 's/^(.*autotest_)?Pyomo_([^\/]+).*/\2/'`.$BUILD_NUMBER.$python
if test -z "$CODECOV_REPO_OWNER"; then
CODECOV_REPO_OWNER="pyomo"
Expand Down

0 comments on commit 205eb3d

Please sign in to comment.