Skip to content

Commit

Permalink
Merge pull request #2 from gkiki90/update
Browse files Browse the repository at this point in the history
update
  • Loading branch information
viktorbenei committed Sep 8, 2015
2 parents d06d47d + 4e8bdc0 commit 25a503c
Show file tree
Hide file tree
Showing 5 changed files with 132 additions and 107 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.bitrise*
20 changes: 20 additions & 0 deletions bitrise.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
format_version: 0.9.10
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git

app:
envs:
# define these in your .bitrise.secrets.yml
- api_key:
- ipa_path:
- dsym_path:
- tester_groups:
- notify:
- auto_update:
- video_recording:
- comment:

workflows:
test:
steps:
- path::./:
inputs:
2 changes: 1 addition & 1 deletion step.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

THIS_SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

bash "${THIS_SCRIPTDIR}/testfairy-upload-ios.sh" "$TESTFAIRY_IPA_PATH"
bash "${THIS_SCRIPTDIR}/testfairy-upload-ios.sh" "$ipa_path"
exit $?
188 changes: 96 additions & 92 deletions step.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: "TestFairy Deploy"
description: |
title: "TestFairy Deploy"
summary: "TestFairy Deploy"
description: |-
To use this step you have to register
an account on [TestFairy.com](http://testfairy.com/).
website: https://github.com/bitrise-io/steps-testfairy-deploy
fork_url: https://github.com/bitrise-io/steps-testfairy-deploy
source:
git: https://github.com/bitrise-io/steps-testfairy-deploy.git
source_code_url: https://github.com/bitrise-io/steps-testfairy-deploy
support_url: https://github.com/bitrise-io/steps-testfairy-deploy/issues
host_os_tags:
- "osx-10.10"
project_type_tags:
Expand All @@ -14,92 +14,96 @@ type_tags:
- "testfairy"
- "deploy"
is_requires_admin_user: false
is_always_run: false
is_skippable: false
dependencies: []
run_if: ""
inputs:
-
mapped_to: TESTFAIRY_API_KEY
title: "TestFairy API key"
description: |
API key from TestFairy.
You can find your API key under the settings menu.
is_required: true
is_expand: false
value: ""
is_dont_change_value: false
-
mapped_to: TESTFAIRY_IPA_PATH
title: "IPA path"
description: |
Path for the IPA to upload to TestFairy.
is_required: true
is_expand: true
value: ""
is_dont_change_value: false
-
mapped_to: TESTFAIRY_DSYM_PATH
title: "dSYM path"
description: |
Path for the dSYM to upload to TestFairy.
is_required: false
is_expand: true
value: ""
is_dont_change_value: false
-
mapped_to: TESTFAIRY_TESTER_GROUPS
title: "Tester groups"
description: |
Tester Groups that will be notified when the app is ready.
Setup groups in your TestFairy account testers page.
is_required: false
is_expand: false
value: ""
is_dont_change_value: false
-
mapped_to: TESTFAIRY_NOTIFY
title: "Email notification"
description: |
Sets if should email testers about new version.
is_required: false
is_expand: false
value: "off"
value_options: ["on", "off"]
is_dont_change_value: false
-
mapped_to: TESTFAIRY_AUTO_UPDATE
title: "Auto update"
description: |
If auto update is on all users will be prompt to update
to this build next time they run the app.
is_required: false
is_expand: false
value: "off"
value_options: ["on", "off"]
is_dont_change_value: false
-
mapped_to: TESTFAIRY_MAX_TEST_DURATION
title: "Recording duration"
description: |
Maximum session recording length, eg 20m or 1h. Maximum 24h.
is_required: false
is_expand: false
value: "10m"
is_dont_change_value: false
-
mapped_to: TESTFAIRY_VIDEO_RECORDING
title: "Video recording"
description: |
Sets if video recording is enabled for this build.
is_required: false
is_expand: false
value: "off"
value_options: ["on", "wifi", "off"]
is_dont_change_value: false
-
mapped_to: TESTFAIRY_COMMENT
title: "Comments"
description: |
Comment text will be included in the email sent to testers.
is_required: false
is_expand: false
value: ""
is_dont_change_value: false
- api_key: ""
opts:
title: "TestFairy API key"
summary: ""
description: |-
API key from TestFairy.
You can find your API key under the settings menu.
is_required: true
is_expand: false
is_dont_change_value: false
- ipa_path: ""
opts:
title: "IPA path"
summary: ""
description: |-
Path for the IPA to upload to TestFairy.
is_required: true
is_expand: true
is_dont_change_value: false
- dsym_path: ""
opts:
title: "dSYM path"
summary: ""
description: |-
Path for the dSYM to upload to TestFairy.
is_required: false
is_expand: true
is_dont_change_value: false
- tester_groups: ""
opts:
title: "Tester groups"
summary: ""
description: |-
Tester Groups that will be notified when the app is ready.
Setup groups in your TestFairy account testers page.
is_required: false
is_expand: false
is_dont_change_value: false
- notify: "off"
opts:
title: "Email notification"
summary: ""
description: |-
Sets if should email testers about new version.
value_options: ["on", "off"]
is_required: false
is_expand: false
is_dont_change_value: false
- auto_update: "off"
opts:
title: "Auto update"
summary: ""
description: |-
If auto update is on all users will be prompt to update
to this build next time they run the app.
value_options: ["on", "off"]
is_required: false
is_expand: false
is_dont_change_value: false
- max_test_duration: "10m"
opts:
title: "Recording duration"
summary: ""
description: |-
Maximum session recording length, eg 20m or 1h. Maximum 24h.
is_required: false
is_expand: false
is_dont_change_value: false
- video_recording: "off"
opts:
title: "Video recording"
summary: ""
description: |-
Sets if video recording is enabled for this build.
value_options: ["on", "wifi", "off"]
is_required: false
is_expand: false
is_dont_change_value: false
- comment: ""
opts:
title: "Comments"
summary: ""
description: |-
Comment text will be included in the email sent to testers.
is_required: false
is_expand: false
is_dont_change_value: false
outputs: []
28 changes: 14 additions & 14 deletions testfairy-upload-ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@ UPLOADER_VERSION=1.09

# Tester Groups that will be notified when the app is ready. Setup groups in your TestFairy account testers page.
# This parameter is optional, leave empty if not required
TESTER_GROUPS="$TESTFAIRY_TESTER_GROUPS"
TESTER_GROUPS="$tester_groups"

# Should email testers about new version. Set to "off" to disable email notifications.
NOTIFY="$TESTFAIRY_NOTIFY"
NOTIFY="$notify"

# If AUTO_UPDATE is "on" all users will be prompt to update to this build next time they run the app
AUTO_UPDATE="$TESTFAIRY_AUTO_UPDATE"
AUTO_UPDATE="$auto_update"

# The maximum recording duration for every test.
MAX_DURATION="$TESTFAIRY_MAX_TEST_DURATION"
# The maximum recording duration for every test.
MAX_DURATION="$max_test_duration"

# Is video recording enabled for this build. valid values: "on", "off", "wifi"
VIDEO="$TESTFAIRY_VIDEO_RECORDING"
# Is video recording enabled for this build. valid values: "on", "off", "wifi"
VIDEO="$video_recording"

# Comment text will be included in the email sent to testers
COMMENT="$TESTFAIRY_COMMENT"
COMMENT="$comment"

DSYM_FILENAME="$TESTFAIRY_DSYM_PATH"
DSYM_FILENAME="$dsym_path"

# locations of various tools
CURL=curl
Expand All @@ -36,7 +36,7 @@ usage() {
echo "Usage: testfairy-upload-ios.sh IPA_FILENAME"
echo
}

verify_tools() {

# Windows users: this script requires curl. If not installed please get from http://cygwin.com/
Expand All @@ -50,7 +50,7 @@ verify_tools() {
}

verify_settings() {
if [ -z "${TESTFAIRY_API_KEY}" ]; then
if [ -z "${api_key}" ]; then
usage
echo "Please update API_KEY with your private API key, as noted in the Settings page"
exit 1
Expand Down Expand Up @@ -78,9 +78,9 @@ DATE=`date`

/bin/echo -n "Uploading ${IPA_FILENAME} to TestFairy.. "
if [ ! -f "${DSYM_FILENAME}" ]; then
JSON=$( ${CURL} -s ${SERVER_ENDPOINT}/api/upload -F api_key=${TESTFAIRY_API_KEY} -F file="@${IPA_FILENAME}" -F video="${VIDEO}" -F max-duration="${MAX_DURATION}" -F comment="${COMMENT}" -F testers-groups="${TESTER_GROUPS}" -F auto-update="${AUTO_UPDATE}" -F notify="${NOTIFY}" -A "TestFairy iOS Command Line Uploader ${UPLOADER_VERSION}" )
JSON=$( ${CURL} -s ${SERVER_ENDPOINT}/api/upload -F api_key=${api_key} -F file="@${IPA_FILENAME}" -F video="${VIDEO}" -F max-duration="${MAX_DURATION}" -F comment="${COMMENT}" -F testers-groups="${TESTER_GROUPS}" -F auto-update="${AUTO_UPDATE}" -F notify="${NOTIFY}" -A "TestFairy iOS Command Line Uploader ${UPLOADER_VERSION}" )
else
JSON=$( ${CURL} -s ${SERVER_ENDPOINT}/api/upload -F api_key=${TESTFAIRY_API_KEY} -F file="@${IPA_FILENAME}" -F symbols_file="@${DSYM_FILENAME}" -F video="${VIDEO}" -F max-duration="${MAX_DURATION}" -F comment="${COMMENT}" -F testers-groups="${TESTER_GROUPS}" -F auto-update="${AUTO_UPDATE}" -F notify="${NOTIFY}" -A "TestFairy iOS Command Line Uploader ${UPLOADER_VERSION}" )
JSON=$( ${CURL} -s ${SERVER_ENDPOINT}/api/upload -F api_key=${api_key} -F file="@${IPA_FILENAME}" -F symbols_file="@${DSYM_FILENAME}" -F video="${VIDEO}" -F max-duration="${MAX_DURATION}" -F comment="${COMMENT}" -F testers-groups="${TESTER_GROUPS}" -F auto-update="${AUTO_UPDATE}" -F notify="${NOTIFY}" -A "TestFairy iOS Command Line Uploader ${UPLOADER_VERSION}" )
fi

MESSAGE=$( echo ${JSON} | sed 's/\\\//\//g' | sed -n 's/.*"message"\s*:\s*"\([^"]*\)".*/\1/p' )
Expand All @@ -100,4 +100,4 @@ fi
write_section_to_formatted_output "## Deploy Success"
echo_string_to_formatted_output "* **Build URL**: [${URL}](${URL})"

exit 0
exit 0

0 comments on commit 25a503c

Please sign in to comment.