Skip to content

Commit aaba928

Browse files
committed
Update Drone environment variables
1 parent 2235d62 commit aaba928

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

codecov/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -380,12 +380,12 @@ def main(*argv, **kwargs):
380380
# --------
381381
# drone.io
382382
# --------
383-
elif os.getenv('CI') == "true" and os.getenv('DRONE') == "true":
383+
elif os.getenv('CI') == "drone" and os.getenv('DRONE') == "true":
384384
# http://docs.drone.io/env.html
385385
query.update(dict(branch=os.getenv('DRONE_BRANCH'),
386386
service='drone.io',
387387
build=os.getenv('DRONE_BUILD_NUMBER'),
388-
build_url=os.getenv('DRONE_BUILD_URL')))
388+
build_url=os.getenv('DRONE_BUILD_LINK')))
389389
root = os.getenv('DRONE_BUILD_DIR') or root
390390
write(' Drone Detected')
391391

tests/test.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def setUp(self):
4242
"BUILDKITE", "BUILDKITE_BUILD_NUMBER", "BUILDKITE_JOB_ID", "BUILDKITE_BRANCH", "BUILDKITE_PROJECT_SLUG", "BUILDKITE_COMMIT",
4343
"DRONE", "DRONE_BRANCH", "DRONE_BUILD_DIR", "JENKINS_URL", "TRAVIS_TAG",
4444
"GIT_BRANCH", "GIT_COMMIT", "WORKSPACE", "BUILD_NUMBER", "CI_BUILD_URL", "SEMAPHORE_REPO_SLUG", "SEMAPHORE_CURRENT_THREAD",
45-
"DRONE_BUILD_URL", "TRAVIS_REPO_SLUG", "CODECOV_TOKEN", "APPVEYOR", "APPVEYOR_REPO_BRANCH",
45+
"DRONE_BUILD_LINK", "TRAVIS_REPO_SLUG", "CODECOV_TOKEN", "APPVEYOR", "APPVEYOR_REPO_BRANCH",
4646
"APPVEYOR_BUILD_VERSION", "APPVEYOR_JOB_ID", "APPVEYOR_REPO_NAME", "APPVEYOR_REPO_COMMIT", "WERCKER_GIT_BRANCH",
4747
"WERCKER_MAIN_PIPELINE_STARTED", "WERCKER_GIT_OWNER", "WERCKER_GIT_REPOSITORY",
4848
"CI_BUILD_REF_NAME", "CI_BUILD_ID", "CI_BUILD_REPO", "CI_PROJECT_DIR", "CI_BUILD_REF", "CI_SERVER_NAME",
@@ -463,10 +463,11 @@ def test_ci_snap(self):
463463
self.assertEqual(res['codecov'].token, 'token')
464464

465465
def test_ci_drone(self):
466-
self.set_env(DRONE='true',
466+
self.set_env(CI='drone',
467+
DRONE='true',
467468
DRONE_BUILD_NUMBER='10',
468469
DRONE_BRANCH='master',
469-
DRONE_BUILD_URL='https://drone.io/github/builds/1',
470+
DRONE_BUILD_LINK='https://drone.io/github/builds/1',
470471
CODECOV_TOKEN='token')
471472
self.fake_report()
472473
res = self.run_cli()

0 commit comments

Comments
 (0)