summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMilosz Wasilewski <milosz.wasilewski@linaro.org>2016-06-14 15:18:19 +0100
committerMilosz Wasilewski <milosz.wasilewski@linaro.org>2016-06-14 15:18:19 +0100
commit19903804249c0a57ac9ca56e33a2589eda12f0ea (patch)
tree2a1fcf0cb702d6fcb56cb7d4e0024223d017ba04
parent8f59ad4a35fafd523c9d2b1f406a963c9bce048f (diff)
Added support for multiple art-reports instances
Signed-off-by: Milosz Wasilewski <milosz.wasilewski@linaro.org>
-rw-r--r--post-build-report.py7
-rw-r--r--post-build-report.yaml7
2 files changed, 13 insertions, 1 deletions
diff --git a/post-build-report.py b/post-build-report.py
index 44a0eb4..0cb6e8c 100644
--- a/post-build-report.py
+++ b/post-build-report.py
@@ -120,7 +120,11 @@ if __name__ == '__main__':
branch_name = os.environ.get("SOURCE_BRANCH_NAME", "")
art_url = os.environ.get("ART_URL", "http://localhost:8000/")
- art_token = os.environ.get("ART_TOKEN")
+ art_token = None
+ if urlsplit(art_url).netloc.startswith('art-reports'):
+ art_token = os.environ.get("ART_TOKEN_ART_REPORTS")
+ elif urlsplit(art_url).netloc.startswith('android-qa-reports'):
+ art_token = os.environ.get("ART_TOKEN_ANDROID_REPORTS")
manifest = _get_manifest(os.environ.get("WORKSPACE"))
test_jobs = os.environ.get("LAVA_JOB_IDS", "")
@@ -163,6 +167,7 @@ if __name__ == '__main__':
"results": results
}
+ params.pop('manifest')
print params
_push_object(art_token, art_url, RESULT_ENDPOINT, params)
diff --git a/post-build-report.yaml b/post-build-report.yaml
index e275cee..932877f 100644
--- a/post-build-report.yaml
+++ b/post-build-report.yaml
@@ -30,6 +30,13 @@
linaro:
- job-build
- job-cancel
+ parameters:
+ - password:
+ name: ART_TOKEN_ART_REPORTS
+ default: ${ART_TOKEN_ART_REPORTS}
+ - password:
+ name: ART_TOKEN_ANDROID_REPORTS
+ default: ${ART_TOKEN_ANDROID_REPORTS}
disabled: false
node: build
display-name: 'Post Build Reports'