summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Wray <jason@mapbox.com>2019-02-25 16:29:30 -0800
committerJason Wray <jason@mapbox.com>2019-02-25 17:10:15 -0800
commit8e173235d9a5e6425e2cd9905f57e7f75d5a02ab (patch)
treefcecf6afabfb0646395e5de39b112b0aebcf044d
parentd91d4f155ab26be14d55f2d1cb25cacafdcb3523 (diff)
downloadqtlocation-mapboxgl-upstream/friedbunny-tries-to-make-ios-deployment-scripts-more-robust.tar.gz
[ios, build] Trigger automated site and docs generation during releasesupstream/friedbunny-tries-to-make-ios-deployment-scripts-more-robust
-rw-r--r--circle.yml1
-rwxr-xr-xplatform/ios/scripts/trigger-external-deploy-steps.sh34
2 files changed, 35 insertions, 0 deletions
diff --git a/circle.yml b/circle.yml
index 28d1e39e68..5bf6f7458a 100644
--- a/circle.yml
+++ b/circle.yml
@@ -994,6 +994,7 @@ jobs:
export VERSION_TAG=${CIRCLE_TAG}
export GITHUB_TOKEN=${DANGER_GITHUB_API_TOKEN}
platform/ios/scripts/deploy-packages.sh
+ platform/ios/scripts/trigger-external-deploy-steps.sh
- save-dependencies
- collect-xcode-build-logs
- upload-xcode-build-logs
diff --git a/platform/ios/scripts/trigger-external-deploy-steps.sh b/platform/ios/scripts/trigger-external-deploy-steps.sh
new file mode 100755
index 0000000000..c1ee7c783f
--- /dev/null
+++ b/platform/ios/scripts/trigger-external-deploy-steps.sh
@@ -0,0 +1,34 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+function step { >&2 echo -e "\033[1m\033[36m* $@\033[0m"; }
+function finish { >&2 echo -en "\033[0m"; }
+trap finish EXIT
+
+SDK_FLAVOR=${SDK_FLAVOR:-"maps"}
+
+step "Triggering automated site and documentation generation for ${SDK_FLAVOR} SDK ${VERSION_TAG}"
+
+request_body="{
+ \"request\": {
+ \"message\": \"[${SDK_FLAVOR}] ${VERSION_TAG} automated site and documentation generation\",
+ \"config\": {
+ \"merge_mode\": \"deep_merge\",
+ \"env\": {
+ \"SDK_FLAVOR\": \"${SDK_FLAVOR}\",
+ \"RELEASE_TAG\": \"${VERSION_TAG}\"
+ }
+ }
+ }
+}"
+
+step "Making request…"
+
+curl -s -X POST \
+ -H "Content-Type: application/json" \
+ -H "Accept: application/json" \
+ -H "Travis-API-Version: 3" \
+ -H "Authorization: token ${TRAVISCI_API_TOKEN}" \
+ -d "${request_body}" \
+ https://api.travis-ci.com/repo/mapbox%2Fios-sdk/requests