From f719de9ff465a6b84754f55b5ed24945f4a69152 Mon Sep 17 00:00:00 2001 From: Julian Rex Date: Wed, 18 Mar 2020 23:06:40 -0400 Subject: [PATCH] Updates metrics trigger. (#229) --- circle.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/circle.yml b/circle.yml index 5939a4ac7..f9330b575 100644 --- a/circle.yml +++ b/circle.yml @@ -421,10 +421,15 @@ jobs: #platform/ios/scripts/metrics.sh - run: name: Trigger metrics - command: | + command: > if [[ $CIRCLE_BRANCH == master ]]; then if [ -n "${MOBILE_METRICS_TOKEN}" ]; then - curl -u ${MOBILE_METRICS_TOKEN}: -d build_parameters[CIRCLE_JOB]=ios-maps-benchmark https://circleci.com/api/v1.1/project/github/mapbox/mobile-metrics/tree/master + curl + -u ${CIRCLE_CI_TOKEN}: + -X POST + --header "Content-Type: application/json" + --data '{"parameters": {"run_ios_maps_benchmark": true, "ci_ref" : $CIRCLE_BUILD_NUM }, "branch": "master"}' + https://circleci.com/api/v2/project/github/mapbox/mobile-metrics/pipeline else echo "MOBILE_METRICS_TOKEN not provided" fi