-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathbitrise.yml
executable file
·201 lines (165 loc) · 5.01 KB
/
bitrise.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
#
# bitrise.yml
# Copyright © 2017 Netguru Sp. z o.o. All rights reserved.
#
format_version: 1.3.1
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
# Workflow trigger map.
#
# The following trigger map triggers a build only for pull requests against
# `develop` and `master` branches (from forks as well) and pushes to `develop`
# and `master` branches.
#
# More on trigger maps: http://devcenter.bitrise.io/webhooks/trigger-map
trigger_map:
- push_branch: develop
workflow: build-staging
- push_branch: master
workflow: build-release-candidate
- pull_request_target_branch: develop
workflow: build-pull-request
- pull_request_target_branch: master
workflow: build-pull-request
# Environment configuration.
#
# This list contains the default environment variables shared between workflows.
app:
envs:
- XCODEBUILD_PROJECT: ./CarLens.xcworkspace
- XCODEBUILD_OPTIONS: _BUILD_NUMBER=$BITRISE_BUILD_NUMBER
# Workflow declarations.
#
# This list contains workflows used in the above trigger map.
workflows:
# Build, test and deploy a staging app.
#
# This workflow pulls dependencies, builds and tests an app with staging
# scheme and finally pushes the archived build to HockeyApp.
build-staging:
envs:
- XCODEBUILD_SCHEME: Staging
- HOCKEYAPP_API_TOKEN: $HOCKEYAPP_API_TOKEN_STAGING
- HOCKEYAPP_APP_ID: $HOCKEYAPP_APP_ID_STAGING
before_run:
- cache-pull
- bootstrap-carthage
- bootstrap-cocoapods-keys
- test-xcode
- bootstrap-code-signing
- archive-xcode
after_run:
- cache-push
- deploy-hockeyapp
- deploy-bitriseio
# Build, test and deploy a release candidate app.
#
# This workflow pulls dependencies, builds and tests an app with production
# scheme and finally pushes the archived build to HockeyApp.
build-release-candidate:
envs:
- XCODEBUILD_SCHEME: Release
- HOCKEYAPP_API_TOKEN: $HOCKEYAPP_API_TOKEN_PRODUCTION
- HOCKEYAPP_APP_ID: $HOCKEYAPP_APP_ID_PRODUCTION
before_run:
- cache-pull
- bootstrap-carthage
- bootstrap-cocoapods-keys
- test-xcode
- bootstrap-code-signing
- archive-xcode
after_run:
- cache-push
- deploy-hockeyapp
- deploy-bitriseio
# Build and test a staging app.
#
# This workflow pulls dependencies and then builds and tests an app with
# staging scheme.
build-pull-request:
envs:
- XCODEBUILD_SCHEME: Staging
before_run:
- cache-pull
- bootstrap-carthage
- bootstrap-cocoapods-keys
- test-xcode
after_run:
- cache-push
- deploy-bitriseio
# Pull previously cached directories.
cache-pull:
steps:
- cache-pull: {}
# Push cached directories.
#
# By default, this pushes both `./Carthage` and `./Pods` directories. If you
# don't use those package managers in your app, you can remove a corresponding
# line.
cache-push:
steps:
- cache-push:
inputs:
- cache_paths: |-
./Carthage
./Pods
# Bootstrap dependencies using Carthage package manager.
#
# If you don't use this package manager, you can remove this workflow.
bootstrap-carthage:
steps:
- carthage:
inputs:
- carthage_command: bootstrap
- carthage_options: --platform iOS --cache-builds
# Bootstrap dependencies using CocoaPods package manager.
#
# If you don't use this package manager, you can remove this workflow.
bootstrap-cocoapods-keys:
steps:
- script:
title: 'bundle-install'
inputs:
- content: bundle install
- script:
title: 'copy-dotenv'
inputs:
- content: cp .env.sample .env
- cocoapods-install: {}
# Bootstrap code signing by installing certificates and provisioning profiles.
bootstrap-code-signing:
steps:
- certificate-and-profile-installer: {}
# Build and test an app using `xcodebuild` command.
test-xcode:
steps:
- xcode-test:
inputs:
- project_path: $XCODEBUILD_PROJECT
- scheme: $XCODEBUILD_SCHEME
- xcodebuild_test_options: $XCODEBUILD_OPTIONS
- generate_code_coverage_files: 'yes'
- should_build_before_test: 'no'
- export_uitest_artifacts: 'true'
# Archive an app using `xcodebuild` command.
archive-xcode:
steps:
- xcode-archive:
inputs:
- project_path: $XCODEBUILD_PROJECT
- scheme: $XCODEBUILD_SCHEME
- xcodebuild_options: $XCODEBUILD_OPTIONS
# Deploy a built app to HockeyApp.
deploy-hockeyapp:
steps:
- hockeyapp-deploy:
inputs:
- api_token: $HOCKEYAPP_API_TOKEN
- app_id: $HOCKEYAPP_APP_ID
- notify: 0
# Deploy build artifacts to bitrise.io.
deploy-bitriseio:
steps:
- deploy-to-bitrise-io:
inputs:
- notify_user_groups: none
- is_enable_public_page: false