This repository has been archived by the owner on Oct 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbitrise.yml
executable file
·164 lines (136 loc) · 4 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
#
# bitrise.yml
# Copyright © 2019 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-pull-request
- pull_request_target_branch: develop
workflow: build-pull-request
- pull_request_target_branch: master
workflow: build-pull-request
- push_branch: release/*
workflow: build-release-candidate
- pull_request_target_branch: release/*
workflow: build-pull-request
app:
envs:
- BUILD_NUMBER: $BITRISE_BUILD_NUMBER
- DEPLOY_DIR: $BITRISE_DEPLOY_DIR
# 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:
- HIGHWAY_PRESET: staging
before_run:
- cache-pull
- bundle-install
- run-highway
after_run:
- cache-push
- deploy-bitriseio
- jira-ticket-transition
# 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:
- HIGHWAY_PRESET: release
before_run:
- cache-pull
- bundle-install
- run-highway
after_run:
- cache-push
- 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:
- HIGHWAY_PRESET: unit_tests
before_run:
- cache-pull
- bundle-install
- run-highway
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
bundle-install:
steps:
- script:
title: 'bundle-install'
inputs:
- content: |-
gem uninstall bundler --force
gem install bundler --force
bundle install
run-highway:
steps:
- brew-install:
title: Install gpg
inputs:
- packages: "gpg"
- cache_enabled: "yes"
- brew-install:
title: Install 7zip
inputs:
- packages: "p7zip"
- cache_enabled: "yes"
- script:
title: 'bundle exec fastlane highway'
inputs:
- content: bundle exec fastlane highway preset:$HIGHWAY_PRESET
# Deploy build artifacts to bitrise.io.
deploy-bitriseio:
steps:
- deploy-to-bitrise-io:
inputs:
- notify_user_groups: none
- is_enable_public_page: false
jira-ticket-transition:
steps:
- git::https://github.com/netguru/bitrise-step-ng-jira-step.git@master:
title: ng-jira-step
inputs:
- host: $JIRA_HOST
- user: $JIRA_USER
- api_token: $JIRA_API_TOKEN
- qa_transition_id: $JIRA_QA_TRANSACTION_ID
- no_qa_transition_id: $JIRA_NO_QA_TRANSACTION_ID
- add_bitrise_public_download_url: false
- extra_info_in_comment: "You can download the build from project's App Center."