Created
April 28, 2017 22:21
-
-
Save PillowUnicorn/1dcb98e4e43a4cbd2afd086aae689d73 to your computer and use it in GitHub Desktop.
Pillow's Android bitrise.yml
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
--- | |
format_version: 1.1.0 | |
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git | |
trigger_map: | |
- push_branch: qa | |
workflow: qa | |
workflows: | |
_init_install: | |
steps: | |
- activate-ssh-key: | |
title: Activate App SSH key | |
inputs: | |
- ssh_key_save_path: "$HOME/.ssh/steplib_ssh_step_id_rsa" | |
- git-clone: {} | |
- script@1.1.3: | |
title: Set Full Build | |
inputs: | |
- content: |- | |
#!/bin/bash | |
if [[ "$GIT_CLONE_COMMIT_MESSAGE_SUBJECT" == *"[FULL BUILD]"* ]] | |
then | |
envman add --key RUN_GRADLEW --value 1 | |
else | |
envman add --key RUN_GRADLEW --value 0 | |
fi | |
- script@1.1.3: | |
title: Install npm-cache | |
inputs: | |
- content: |- | |
#!/bin/bash | |
npm install -g npm-cache | |
- cache-pull@0.9.2: {} | |
- script@1.1.3: | |
title: npm-cache install | |
inputs: | |
- content: |- | |
npm-cache install --cacheDirectory . | |
- cache-push@0.9.4: | |
inputs: | |
- cache_paths: "./npm" | |
before_run: | |
after_run: | |
_code_push: | |
steps: | |
- script@1.1.3: | |
title: Install CodePush CLI | |
inputs: | |
- content: |- | |
#!/bin/bash | |
npm install -g code-push-cli | |
- script@1.1.3: | |
title: CodePush auth | |
inputs: | |
- content: |- | |
#!/bin/bash | |
code-push login --accessKey #YOUR_CODEPUSH_KEY | |
- script@1.1.3: | |
title: CodePush deploy | |
inputs: | |
- content: |- | |
#!/bin/bash | |
code-push release-react $YOUR_CODEPUSH_PROJECT android -d $ENVIRONMENT --description "$ENVIRONMENT $GIT_CLONE_COMMIT_MESSAGE_SUBJECT" -m | |
before_run: | |
after_run: | |
_make_apk: | |
steps: | |
- script@1.1.3: | |
title: gradlew | |
run_if: '{{enveq "RUN_GRADLEW" "1"}}' | |
inputs: | |
- content: |- | |
#!/bin/bash | |
export ENVFILE=$ENVFILE && cd android && ./gradlew assembleRelease | |
- sign-apk@1.1.1: | |
run_if: '{{enveq "RUN_GRADLEW" "1"}}' | |
inputs: | |
- apk_path: "/bitrise/src/android/app/build/outputs/apk/app-release-unsigned.apk" | |
- script@1.1.3: | |
title: cp apk | |
run_if: '{{enveq "RUN_GRADLEW" "1"}}' | |
inputs: | |
- content: |- | |
#!/bin/bash | |
cp $BITRISE_SIGNED_APK_PATH $BITRISE_DEPLOY_DIR/signed-app-release.apk | |
- deploy-to-bitrise-io@1.2.9: | |
is_always_run: false | |
run_if: '{{enveq "RUN_GRADLEW" "1"}}' | |
inputs: | |
- notify_email_list: '' | |
before_run: | |
after_run: | |
production: | |
steps: | |
- script@1.1.3: | |
title: Set Environment | |
inputs: | |
- content: |- | |
#!/bin/bash | |
envman add --key ENVIRONMENT --value "Production" | |
- file-downloader@0.9.1: | |
inputs: | |
- source: "$BITRISEIO_production_env_URL" | |
- destination: "$BITRISE_SOURCE_DIR/environment" | |
- script@1.1.3: | |
title: set ENVFILE | |
inputs: | |
- content: |- | |
envman add --key ENVFILE --value environment | |
before_run: | |
- _init_install | |
after_run: | |
- _make_apk | |
- _code_push | |
- _slack_message | |
_slack_message: | |
steps: | |
- slack@2.3.0: | |
inputs: | |
- webhook_url: #YOUR_SLACK_WEBHOOK | |
- channel: "#engineering-alerts" | |
- from_username: Bitrise CI - iOS $ENVIRONMENT CodePush Deploy Succeeded | |
- from_username_on_error: Bitrise CI - iOS $ENVIRONMENT CodePush Deploy Failed | |
- message: 'Test the changes on the latest $ENVIRONMENT build. Click here | |
to download the build: https://www.pillowhomes.com/apps' | |
- message_on_error: 'Click here to find out why the build failed: $BITRISE_BUILD_URL' | |
- emoji: ":confetti_ball:" | |
- emoji_on_error: ":shrug:" | |
before_run: | |
after_run: | |
staging: | |
steps: | |
- script@1.1.3: | |
title: Set Environment | |
inputs: | |
- content: |- | |
envman add --key ENVIRONMENT --value "Staging" | |
envman add --key ENVFILE --value .env.staging | |
before_run: | |
- _init_install | |
after_run: | |
- _make_apk | |
- _code_push | |
- _slack_message | |
qa: | |
steps: | |
- script@1.1.3: | |
title: Set Environment | |
inputs: | |
- content: |- | |
envman add --key ENVIRONMENT --value "QA" | |
envman add --key ENVFILE --value .env.qa | |
before_run: | |
- _init_install | |
after_run: | |
- _make_apk | |
- _code_push | |
- _slack_message |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment