Updates metrics trigger. (#229)

This commit is contained in:
Julian Rex
2020-03-18 23:06:40 -04:00
committed by GitHub
parent 81df48df70
commit f719de9ff4

View File

@@ -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