Skip to content

Instantly share code, notes, and snippets.

@PillowUnicorn
Created April 28, 2017 22:29
Show Gist options
  • Save PillowUnicorn/fb8b4b3a6f1cd827597bbb4c5cdabb80 to your computer and use it in GitHub Desktop.
Save PillowUnicorn/fb8b4b3a6f1cd827597bbb4c5cdabb80 to your computer and use it in GitHub Desktop.
Pillow's iOS bitrise.yml
---
format_version: 1.1.0
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
app:
envs:
- BITRISE_PROJECT_PATH: ios/pro_mobile.xcodeproj
opts:
is_expand: false
- BITRISE_SCHEME: pro_mobile
opts:
is_expand: false
trigger_map:
- push_branch: qa
workflow: qa
workflows:
_xcode_archive:
steps:
- [email protected]:
run_if: '{{enveq "RUN_XCODE_ARCHIVE" "1"}}'
- [email protected]:
run_if: '{{enveq "RUN_XCODE_ARCHIVE" "1"}}'
inputs:
- team_id: ''
- configuration: ''
- force_team_id: ''
- force_code_sign_identity: ''
- force_provisioning_profile_specifier: ''
- force_provisioning_profile: ''
- is_clean_build: 'yes'
- output_tool: xcodebuild
- is_export_xcarchive_zip: 'yes'
- custom_export_options_plist_content: ''
- [email protected]:
is_always_run: false
run_if: '{{enveq "RUN_XCODE_ARCHIVE" "1"}}'
inputs:
- notify_user_groups: none
- notify_email_list:
before_run:
after_run:
envs:
- KEY: ''
opts:
is_expand: true
_init_install:
steps:
- [email protected]: {}
- [email protected]:
inputs:
- clone_depth: ''
- [email protected]:
title: Set Full Build
inputs:
- content: |-
#!/bin/bash
if [[ "$GIT_CLONE_COMMIT_MESSAGE_SUBJECT" == *"[FULL BUILD]"* ]]
then
envman add --key RUN_XCODE_ARCHIVE --value 1
else
envman add --key RUN_XCODE_ARCHIVE --value 0
fi
- [email protected]:
title: Install npm-cache
inputs:
- content: |-
#!/bin/bash
npm install -g npm-cache
- [email protected]: {}
- [email protected]:
title: npm-cache install
inputs:
- content: |-
#!/bin/bash
npm-cache install --cacheDirectory .
- [email protected]:
inputs:
- cache_paths: "./npm"
- npm:
title: NPM Install
inputs:
- command: install
- npm:
title: Install CodePush CLI
inputs:
- command: install -g code-push-cli
before_run:
after_run:
_slack_message:
steps:
- [email protected]:
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: #your_apps_page'
- 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:
_code_push:
steps:
- script:
title: CodePush Auth
inputs:
- content: |-
#!/bin/bash
code-push login --accessKey #YOUR_CODEPUSH_KEY
- script:
title: CodePush Deploy
inputs:
- content: |-
#!/bin/bash
echo $GIT_CLONE_COMMIT_HASH
code-push release-react ProMobile-IOS ios -d $ENVIRONMENT --description "$ENVIRONMENT $GIT_CLONE_COMMIT_MESSAGE_SUBJECT" -m
before_run:
after_run:
envs:
- KEY: ''
opts:
is_expand: true
qa:
steps:
- [email protected]:
title: Set ENVIRONMENT
inputs:
- content: |-
#!/bin/bash
envman add --key ENVIRONMENT --value "QA"
envman add --key BITRISE_SCHEME --value "pro_mobile QA"
before_run:
- _init_install
after_run:
- _xcode_archive
- _code_push
- _slack_message
envs:
- KEY: ''
opts:
is_expand: true
production:
steps:
- [email protected]:
title: Set ENVIRONMENT
inputs:
- content: |-
#!/bin/bash
envman add --key ENVIRONMENT --value "Production"
envman add --key BITRISE_SCHEME --value "Bitrise Prod"
- [email protected]:
inputs:
- source: "$BITRISEIO_production_env_URL"
- destination: "$BITRISE_SOURCE_DIR/environment"
before_run:
- _init_install
after_run:
- _xcode_archive
- _code_push
- _slack_message
envs:
- KEY: ''
opts:
is_expand: true
staging:
steps:
- [email protected]:
title: Set ENVIRONMENT
inputs:
- content: |-
#!/bin/bash
envman add --key ENVIRONMENT --value "Staging"
envman add --key BITRISE_SCHEME --value "pro_mobile Staging"
before_run:
- _init_install
after_run:
- _xcode_archive
- _code_push
- _slack_message
envs:
- KEY: ''
opts:
is_expand: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment