Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
add run id and build url
Browse files Browse the repository at this point in the history
  • Loading branch information
ibrahim0814 committed Feb 4, 2020
1 parent b1e5faf commit 6cc3676
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions codecov
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,8 @@ then
branch="${GITHUB_REF#refs/heads/}"
commit="${GITHUB_SHA}"
slug="${GITHUB_REPOSITORY}"
build="${GITHUB_RUN_ID}"
build_url=$(urlencode "http://github.com/${GITHUB_REPOSITORY}/runs/${GITHUB_RUN_ID}")

elif [ "$SYSTEM_TEAMFOUNDATIONSERVERURI" != "" ];
then
Expand Down
1 change: 1 addition & 0 deletions env
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ then
add "GITHUB_REF"
add "GITHUB_REPOSITORY"
add "GITHUB_SHA"
add "GITHUB_RUN_ID"

elif [ "$CI" = "true" ] && [ "$BITBUCKET_BUILD_NUMBER" != "" ];
then
Expand Down
1 change: 1 addition & 0 deletions tests/env
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export GIT_BRANCH=""
export GIT_COMMIT=""
export GITHUB_REF=""
export GITHUB_REPOSITORY=""
export GITHUB_RUN_ID=""
export GITHUB_SHA=""
export GITLAB_CI=""
export JENKINS_URL=""
Expand Down
3 changes: 2 additions & 1 deletion tests/test
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,10 @@ function test_github_action () {
export GITHUB_ACTION="my-fancy-github-action"
export GITHUB_REF="refs/heads/master"
export GITHUB_REPOSITORY="codecov/ci-repo"
export GITHUB_RUN_ID="32402849"
export GITHUB_SHA="$TEST_DATA_GIT_COMMIT"

assertURL "https://codecov.io/upload/v4?package=bash-$VERSION&token=&branch=master&commit=$TEST_DATA_GIT_COMMIT&build=&build_url=&name=&tag=&slug=codecov%2Fci-repo&service=github-actions&flags=&pr=&job="
assertURL "https://codecov.io/upload/v4?package=bash-$VERSION&token=&branch=master&commit=$TEST_DATA_GIT_COMMIT&build=32402849&build_url=http%3A%2F%2Fgithub.com%2Fcodecov%2Fci-repo%2Fruns%2F32402849&name=&tag=&slug=codecov%2Fci-repo&service=github-actions&flags=&pr=&job="
}

function test_semaphore (){
Expand Down

0 comments on commit 6cc3676

Please sign in to comment.