-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cli): support cli v1
- Loading branch information
Showing
2 changed files
with
37 additions
and
19 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 |
---|---|---|
@@ -1,25 +1,35 @@ | ||
#!/usr/bin/env bash | ||
set -ex | ||
|
||
command_args=" -api-key $API_KEY -app $application -testapp $test_application -platform $platform -system-image $system_image -isolated $isolated" | ||
run_platform=$(echo "$platform" | awk '{print tolower($0)}') | ||
command_args="run $run_platform" | ||
command_args="$command_args --api-key $api_key" | ||
command_args="$command_args --application $application" | ||
command_args="$command_args --test-application $test_application" | ||
command_args="$command_args --system-image $system_image" | ||
command_args="$command_args --isolated $isolated" | ||
|
||
if [ -n "$os_version" ]; then | ||
command_args="$command_args -os-version $os_version" | ||
command_args="$command_args --os-version $os_version" | ||
fi | ||
|
||
if [ -n "$link" ]; then | ||
command_args="$command_args -link $link" | ||
command_args="$command_args --link $link" | ||
fi | ||
|
||
if [ -n "$run_name" ]; then | ||
command_args="$command_args -name $run_name" | ||
command_args="$command_args --name $run_name" | ||
fi | ||
|
||
if [ -n "$ignore_test_failures" ]; then | ||
command_args="$command_args --ignore-test-failures $ignore_test_failures" | ||
fi | ||
|
||
if [[ $OSTYPE == 'darwin'* ]]; then | ||
echo 'macOS agents preinstall marathon-cloud cli via brew' | ||
marathon-cloud $command_args | ||
echo 'macOS agents preinstall marathon-cloud cli via brew' | ||
marathon-cloud $command_args | ||
elif [[ $OSTYPE == 'linux'* ]]; then | ||
echo 'using docker image $docker_image to pull the latest marathon-cloud cli version' | ||
docker pull $docker_image | ||
docker run -v "$(pwd)":/work --rm $docker_image $command_args | ||
echo 'using docker image $docker_image to pull the latest marathon-cloud cli version' | ||
docker pull $docker_image | ||
docker run -v "$(pwd)":/work --rm $docker_image $command_args | ||
fi |
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