Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Commit

Permalink
Merge pull request #26 from andreschab90/master
Browse files Browse the repository at this point in the history
add opportunity for metered/unmetered BillingMethod
  • Loading branch information
fadookie authored Jun 20, 2017
2 parents d7df0d5 + 1cd4cfd commit ba47dc1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions step.sh
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ function device_farm_run {
# Start run
local run_params=(--project-arn="$device_farm_project")
run_params+=(--device-pool-arn="$device_pool")
run_params+=(--configuration="{\"billingMethod\": \"${billing_method}\"}")
run_params+=(--app-arn="$app_arn")
run_params+=(--test="{\"type\": \"${test_type}\",\"testPackageArn\": \"${test_package_arn}\",\"parameters\": {\"TestEnvVar\": \"foo\"}}")
run_params+=(--output=json)
Expand Down Expand Up @@ -283,6 +284,7 @@ fi
echo_details "* device_farm_project: $device_farm_project"
echo_details "* test_package_name: $test_package_name"
echo_details "* test_type: $test_type"
echo_details "* billing_method: $billing_method"
echo_details "* platform: $platform"
echo_details "* ipa_path: $ipa_path"
echo_details "* ios_pool: $ios_pool"
Expand All @@ -301,6 +303,9 @@ validate_required_input "device_farm_project" "${device_farm_project}"
validate_required_input "test_package_name" "${test_package_name}"
validate_required_input "test_type" "${test_type}"

options=("METERED" "UNMETERED")
validate_required_input_with_options "billing_method" "${billing_method}" "${options[@]}"

options=("ios" "android" "ios+android")
validate_required_input_with_options "platform" "${platform}" "${options[@]}"

Expand Down
9 changes: 9 additions & 0 deletions step.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ inputs:
summary: ""
description: "Project ARNs can be obtained using the AWS CLI 'devicefarm list-projects' command."
is_required: true
- billing_method: "METERED"
opts:
title: "Billing Method"
summary: ""
description: "This step specifies the billing methodfor your test run. Use `METERED` for free tier and pay-as-you-go billing, and `UNMETERED` to use pre-paid device slots.(https://docs.aws.amazon.com/devicefarm/latest/developerguide/how-to-purchase-device-slots.html)"
value_options:
- "METERED"
- "UNMETERED"
is_required: false
- test_package_name: ""
opts:
title: "Test Package Filename"
Expand Down

0 comments on commit ba47dc1

Please sign in to comment.