Skip to content

Commit 0dad305

Browse files
committed
Enhances the JOB_ID supports for Appveyor, Circle and custom CIs.
1 parent 81a1f5c commit 0dad305

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

cpp_coveralls/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,14 @@ def run():
8686
args.include.extend(yml.get('include', []))
8787
args.exclude_lines_pattern.extend(yml.get('exclude_lines_pattern', []))
8888

89-
args.service_job_id = os.environ.get('TRAVIS_JOB_ID', '')
89+
if(args.service_name == 'travis-ci'):
90+
args.service_job_id = os.environ.get('TRAVIS_JOB_ID', '')
91+
elif(args.service_name == 'appveyor'):
92+
args.service_job_id = os.environ.get('APPVEYOR_BUILD_ID', '')
93+
elif(args.service_name == 'circle-ci'):
94+
args.service_job_id = os.environ.get('CIRCLE_WORKFLOW_ID', '')
95+
else:
96+
args.service_job_id = os.environ.get('CI_BUILD_ID', '')
9097

9198
if args.repo_token == '' and args.service_job_id == '':
9299
raise ValueError("\nno coveralls.io token specified and no travis job id found\n"

0 commit comments

Comments
 (0)