aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Galanin <mgalanin@mimecast.com>2018-10-09 17:17:25 +0100
committerMikhail Galanin <mgalanin@mimecast.com>2018-10-09 17:17:25 +0100
commit1805dfc619eb0161279248f1ec82e6027a4f5755 (patch)
tree12a522568b1e0c6b8ee98abb778d853dce6e4815
parent54d58e73fb059eae1312ea801abf4d8abccff297 (diff)
downloadrspamd-1805dfc619eb0161279248f1ec82e6027a4f5755.tar.gz
rspamd-1805dfc619eb0161279248f1ec82e6027a4f5755.zip
[Minor] Adopted merger to work with drone
-rwxr-xr-xtest/functional/util/merge_coveralls.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/test/functional/util/merge_coveralls.py b/test/functional/util/merge_coveralls.py
index 2e0369d15..dca00518d 100755
--- a/test/functional/util/merge_coveralls.py
+++ b/test/functional/util/merge_coveralls.py
@@ -31,9 +31,9 @@ path_mapping = [
parser = argparse.ArgumentParser(description='')
parser.add_argument('--input', type=open, required=True, nargs='+', help='input files')
parser.add_argument('--output', type=str, required=True, help='output file)')
-parser.add_argument('--root', type=str, required=False, default="/home/circleci/project", help='repository root)')
-parser.add_argument('--install-dir', type=str, required=False, default="/home/circleci/install", help='install root)')
-parser.add_argument('--build-dir', type=str, required=False, default="/home/circleci/build", help='build root)')
+parser.add_argument('--root', type=str, required=False, default="/rspamd/src/github.com/rspamd/rspamd", help='repository root)')
+parser.add_argument('--install-dir', type=str, required=False, default="/rspamd/install", help='install root)')
+parser.add_argument('--build-dir', type=str, required=False, default="/rspamd/build", help='build root)')
parser.add_argument('--token', type=str, help='If present, the file will be uploaded to coveralls)')
def merge_coverage_vectors(c1, c2):
@@ -116,10 +116,16 @@ if __name__ == '__main__':
j1['service_name'] = j2['service_name']
if 'service_job_id' not in j1 and 'service_job_id' in j2:
j1['service_job_id'] = j2['service_job_id']
+
if not j1['service_job_id'] and 'CIRCLE_BUILD_NUM' in os.environ:
j1['service_job_id'] = os.environ['CIRCLE_BUILD_NUM']
+ elif not j1['service_job_id'] and 'DRONE_PREV_BUILD_NUMBER' in os.environ:
+ j1['service_job_id'] = os.environ['DRONE_PREV_BUILD_NUMBER']
+
if 'CIRCLECI' in os.environ and os.environ['CIRCLECI']:
j1['service_name'] = 'circleci'
+ elif 'DRONE' in os.environ and os.environ['DRONE']:
+ j1['service_name'] = 'drone'
j1['source_files'] = files.values()