-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e1f76fa
commit 3ff60fd
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
agents: | ||
queue: "macOS-Monterey-12-4" | ||
|
||
steps: | ||
- command: "./scripts/create-example-application-archive.sh MuxStatsGoogleIMAPluginSPMExampleIOS" | ||
label: ":xcode: Export Test Application Archive" | ||
artifact_paths: | ||
- "./Examples/MuxStatsGoogleIMAPluginSPMExampleIOS/MuxStatsGoogleIMAPluginSPMExampleIOS.ipa" | ||
- "./Examples/MuxStatsGoogleIMAPluginSPMExampleIOS/Packaging.log" | ||
- "./Examples/MuxStatsGoogleIMAPluginSPMExampleIOS/DistributionSummary.plist" | ||
- wait | ||
- command: "echo $BUILDKITE_HOOKS_PATH && ls -ls $BUILDKITE_HOOKS_PATH && buildkite-agent artifact download \"Examples/MuxPlayerSwiftExample/MuxPlayerSwiftExample.ipa\" \"$PWD\" && buildkite-agent artifact download \"Examples/MuxPlayerSwiftExample/MuxPlayerSwiftExampleUITests-Runner.ipa\" \"$PWD\" && ./scripts/upload-example-application-to-sauce-labs.sh" | ||
label: ":saucelabs: Upload Test Application to Sauce Labs App Storage" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
if ! command -v saucectl &> /dev/null | ||
then | ||
echo -e "\033[1;31m ERROR: saucectl could not be found please install it... \033[0m" | ||
exit 1 | ||
fi | ||
|
||
if ! command -v jq &> /dev/null | ||
then | ||
echo -e "\033[1;31m ERROR: jq could not be found please install it... \033[0m" | ||
exit 1 | ||
fi | ||
|
||
readonly APPLICATION_NAME="MuxStatsGoogleIMAPluginSPMExampleIOS.ipa" | ||
# TODO: make this an argument | ||
readonly APPLICATION_PAYLOAD_PATH="Examples/MuxStatsGoogleIMAPluginSPMExampleIOS/${APPLICATION_NAME}" | ||
|
||
if [ ! -f $APPLICATION_PAYLOAD_PATH ]; then | ||
echo -e "\033[1;31m ERROR: application archive not found \033[0m" | ||
fi | ||
|
||
# re-exported so saucectl CLI can use them | ||
export SAUCE_USERNAME=$BUILDKITE_MAC_STADIUM_SAUCE_USERNAME | ||
export SAUCE_ACCESS_KEY=$BUILDKITE_MAC_STADIUM_SAUCE_ACCESS_KEY | ||
|
||
echo "▸ Uploading test application to Sauce Labs App Storage" | ||
|
||
curl -u "$SAUCE_USERNAME:$SAUCE_ACCESS_KEY" --location --request POST 'https://api.us-west-1.saucelabs.com/v1/storage/upload' --form "payload=@\"${APPLICATION_PAYLOAD_PATH}\"" --form "name=\"${APPLICATION_NAME}\"" | ||
|
||
if [[ $? == 0 ]]; then | ||
echo "▸ Successfully uploaded to Sauce Labs application storage." | ||
else | ||
echo -e "\033[1;31m ERROR: Failed to upload to Sauce Labs application storage. Check for valid credentials. \033[0m" | ||
exit 1 | ||
fi |