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

Commit

Permalink
update drone integration
Browse files Browse the repository at this point in the history
  • Loading branch information
stevepeak committed Jan 2, 2018
1 parent ec9b0eb commit 6e7e4fc
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions codecov
Expand Up @@ -626,15 +626,15 @@ then
fi
tag="$BUILDKITE_TAG"

elif [ "$CI" = "true" ] && [ "$DRONE" = "true" ];
elif [ "$CI" = "drone" ];
then
say "$e==>$x Drone CI detected."
# http://docs.drone.io/env.html
# drone commits are not full shas
service="drone.io"
branch="$DRONE_BRANCH"
build="$DRONE_BUILD_NUMBER"
build_url=$(urlencode "${DRONE_BUILD_URL:-$CI_BUILD_URL}")
build_url=$(urlencode "${DRONE_BUILD_LINK}")
pr="$DRONE_PULL_REQUEST"
job="$DRONE_JOB_NUMBER"
tag="$DRONE_TAG"
Expand Down
5 changes: 2 additions & 3 deletions env
Expand Up @@ -137,13 +137,12 @@ then
add "BUILDKITE_PROJECT_SLUG"
add "BUILDKITE_COMMIT"

elif [ "$CI" = "true" ] && [ "$DRONE" = "true" ];
elif [ "$CI" = "drone" ];
then
add "DRONE"
add "CI"
add "DRONE_BRANCH"
add "DRONE_BUILD_NUMBER"
add "DRONE_BUILD_URL"
add "DRONE_BUILD_LINK"
add "DRONE_PULL_REQUEST"
add "DRONE_JOB_NUMBER"
add "DRONE_TAG"
Expand Down
3 changes: 1 addition & 2 deletions tests/env
Expand Up @@ -56,8 +56,7 @@ export CODECOV_TOKEN=""
export CODECOV_URL=""
export COMMIT=""
export DRONE_BRANCH=""
export DRONE_BUILD_URL=""
export DRONE=""
export DRONE_BUILD_LINK=""
export ghprbActualCommit=""
export ghprbPullId=""
export ghprbSourceBranch=""
Expand Down
5 changes: 2 additions & 3 deletions tests/test
Expand Up @@ -344,11 +344,10 @@ function test_solano (){

function test_drone (){
reset
export CI="true"
export DRONE="true"
export CI="drone"
export DRONE_BRANCH="develop"
export DRONE_BUILD_NUMBER="7.5"
export DRONE_BUILD_URL="http://drone"
export DRONE_BUILD_LINK="http://drone"
assertURL "https://codecov.io/upload/v4?package=bash-tbd&token=&branch=develop&commit=$_SHA&build=7.5&build_url=http%3A%2F%2Fdrone&name=&tag=&slug=codecov%2Fcodecov-bash&yaml=&service=drone.io&flags=&pr=&job="
}

Expand Down

0 comments on commit 6e7e4fc

Please sign in to comment.