-
Notifications
You must be signed in to change notification settings - Fork 40
/
step.yml
363 lines (323 loc) · 19.8 KB
/
step.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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
title: Deploy to Bitrise.io - Build Artifacts, Test Reports, and Pipeline intermediate files
summary: |-
Deploys build artifacts to make them available for the user on the build's **Artifacts** tab.
Sends test results to the Test Reports add-on (build's **Tests** tab).
Uploads Pipeline intermediate files to make them available in subsequent Stages and also uploads Bitrise and user generated html reports.
description: |-
The Step accesses artifacts from a directory specified as the `$BITRISE_DEPLOY_DIR` where artifacts generated by previous Steps gets stored.
These artifacts are then uploaded on the **Artifacts** tab of any given build. For installable artifacts, such as IPAs or APKs, the Step can create a public install page that allows testers to install the app on their devices.
You can also use the Step to notify users about the build. If you wish to use the Test Reports add-on, you must add this Step in your Workflow since the Step converts test results to the right format and sends them to the add-on.
The Step can also share Pipeline intermediate files. These files are build artifacts generated by Workflows in a Pipeline intended to be shared with subsequent Stages.
Also it collects and uploads all of the html reports located in the `BITRISE_HTML_REPORT_DIR` folder.
### Configuring the Build Artifact Deployment section of the Step
1. Set the value for the **Deploy directory or file path** required input. The default value is the `$BITRISE_DEPLOY_DIR` Env Var which is exposed by the Bitrise CLI.
If you provide a directory, everything in that directory, excluding sub-directories, gets uploaded.
If you provide only a file, then only that file gets uploaded.
To upload a directory's content recursively, you should use the **Compress the artifacts into one file?** which will compress the whole directory, with every sub-directory included.
2. Set the value of the **Notify: User Roles** input. It sends an email with the [public install URL](https://devcenter.bitrise.io/deploy/bitrise-app-deployment/) to those Bitrise users whose roles are included in this field.
The default value is `everyone`. If you wish to notify based on user roles, add one or more roles and separate them with commas, for example, `developers`, `admins`. If you don't want to notify anyone, set the input to `none`.
3. Set the **Notify: Emails** sensitive input. It sends the public install URL in an email to the email addresses provided here. If you’re adding multiple email address, make sure to separate them with commas.
The recipients do not have to be in your Bitrise team. Please note that if the email address is associated with a Bitrise account, the user must be [watching](https://devcenter.bitrise.io/builds/configuring-notifications/#watching-an-app) the app.
4. The **Enable public page for the App?** required input is set to `true` by default. It creates a long and random URL which can be shared with those who do not have a Bitrise account.
If you set this input to `false`, the **Notify: Emails** input will be ignored and the **Notify: User Roles** will receive the build URL instead of the public install URL.
5. With the **Compress the artifacts into one file?** required input set to `true`, you can compress the artifacts found in the Deploy directory into a single file.
You can specify a custom name for the zip file with the `zip_name` option. If you don't specify one, the default `Deploy directory` name will be used.
If the **Compress the artifacts into one file?** is set to `false`, the artifacts in the Deploy directory will be deployed separately.
6. With the **Format for the BITRISE_PUBLIC_INSTALL_PAGE_URL_MAP output** required input field, you can customize the output format of the public install page’s multiple artifact URLs so that the next Step can render the output (for example, our **Send a Slack message** Step).
Provide a language template description using [https://golang.org/pkg/text/template](https://golang.org/pkg/text/template) so that the **Deploy to Bitrise.io** Step can build the required custom output.
7. With the **Format for the BITRISE_PERMANENT_DOWNLOAD_URL_MAP output** required input, you can customize the output format of the `BITRISE_PERMANENT_DOWNLOAD_URL_MAP` so that the next Step can render the output.
The next Steps will use this input to generate the related output in the specified format. The output contains multiple permanent URLs for multiple artifacts.
Provide a language template description using [https://golang.org/pkg/text/template](https://golang.org/pkg/text/template) so that the **Deploy to Bitrise.io** Step can build the required custom output.
8. The **Test API's base URL** and the **API Token** input fields are automatically populated for you.
9. The html report upload does not have any specific settings because it will happen automatically.
### Configuring the Pipeline Intermediate File Sharing section of the Step
The **Files to share between pipeline stages** input specifies the files meant to be intermediate files shared between the Pipeline Stages. When uploading the Pipeline intermediate files, you must assign environment variable keys to them in the **Files to share between pipeline stages** input.
The inputs `path:env_key` values will be saved together with the file and later automatically reconstructed by the [Pull Pipeline intermediate files Step](https://www.bitrise.io/integrations/steps/pull-intermediate-files).
You can use a shorthand of just `env_var` for `$env_var:env_var`, when the `env_var` holds the path to the file(s) you want to share with subsequent stages.
The directories you specify will be archived and uploaded as a single file.
#### Configuring the Debug section of the Step
If you wish to use any of the Step’s debug features, set the following inputs:
1. In the **Name of the compressed artifact (without .zip extension)** input you can add a custom name for the compressed artifact. If you leave this input empty, the default `Deploy directory` name is used.
Please note that this input only works if you set the **Compress the artifacts into one file?** input to `true`.
2. The **Bitrise Build URL** and the **Bitrise Build API Token** inputs are automatically populated.
3. If **The Enable Debug Mode** required input is set to `true`, the Step prints more verbose logs. It is `false` by default.
4. If you need a specific [bundletool version](https://github.com/google/bundletool/releases) other than the default value, you can modify the value of the **Bundletool version** required input.
Bundletool generates an APK from an Android App Bundle so that you can test the APK.
### Troubleshooting
- If your users did not get notified via email, check the **Enable public page for the App?** input. If it is set to `false`, no email notifications will be sent.
- If there are no artifacts uploaded on the **APPS & ARTIFACTS tab**, then check the logs to see if the directory you used in the **Deploy directory or file path** input contained any artifacts.
- If the email is not received, we recommend, that you check if the email is associated with Bitrise account and if so, if the account is “watching” the app.
### Useful links
- [Deployment on Bitrise](https://devcenter.bitrise.io/deploy/deployment-index/)
- [Watching an app](https://devcenter.bitrise.io/builds/configuring-notifications/#watching-an-app)
- [Using artifacts from different Stages](https://devcenter.bitrise.io/en/builds/build-pipelines/configuring-a-bitrise-pipeline.html#using-artifacts-from-different-stages)
- [Viewing HTML reports](https://devcenter.bitrise.io/en/builds/build-data-and-troubleshooting/viewing-html-reports)
### Related Steps
- [Deploy to Google Play](https://www.bitrise.io/integrations/steps/google-play-deploy)
- [Deploy to iTunesConnect](https://www.bitrise.io/integrations/steps/deploy-to-itunesconnect-deliver)
- [Pull Pipeline intermediate files](https://www.bitrise.io/integrations/steps/pull-intermediate-files)
website: https://github.com/bitrise-steplib/steps-deploy-to-bitrise-io
source_code_url: https://github.com/bitrise-steplib/steps-deploy-to-bitrise-io
support_url: https://github.com/bitrise-steplib/steps-deploy-to-bitrise-io/issues
type_tags:
- deploy
is_always_run: true
is_skippable: false
run_if: .IsCI
toolkit:
go:
package_name: github.com/bitrise-steplib/steps-deploy-to-bitrise-io
inputs:
- deploy_path: $BITRISE_DEPLOY_DIR
opts:
category: Build Artifact Deployment
title: Deploy directory or file path
description: |
Specify the directory or file path which will be deployed.
If the specified path is a directory, then every file
in the specified directory, excluding sub-directories, will be deployed.
To upload the directory's content
recursively, you should use the **Compress the artifacts into one file?** option
which compresses the whole directory, with
every sub-directory included.
If you specify a file path, then only the specified
file will be deployed.
- is_compress: "false"
opts:
category: Build Artifact Deployment
title: Compress the artifacts into one file?
summary: |-
If this option is set to `true` and a Deploy directory was specified,
the artifacts in that directory will be compressed into a single ZIP file.
description: |-
If this option is set to `true` and a Deploy directory was specified,
the artifacts in that directory will be compressed into a single ZIP file.
You can specify a custom name for the ZIP using the `zip_name`
option. If you do not specify a custom name, the default `Deploy directory` name will be used.
If this option is set to `false`, the artifacts
found in the Deploy directory folder will be deployed
separately.
is_required: true
is_expand: false
value_options:
- "true"
- "false"
- zip_name:
opts:
category: Build Artifact Deployment
title: Name of the compressed artifact (without .zip extension)
summary: |-
Specify a custom name for the compressed artifact.
description: |-
If you do not specify a custom name, the Deploy directory name will be used.
You can specify a custom name for the ZIP using the `zip_name` option.
This option only works if you selected *true* for *is_compress*.
- notify_user_groups: everyone
opts:
category: Build Artifact Deployment
title: "Notify: User Roles"
description: |
Your App's user roles you want to notify. Separate the role names with commas.
Possible role names:
* none
* testers
* developers
* admins
* owner
* everyone
An example to notify your developers and testers:
`testers, developers`
If you want to notify everyone in the app's team, just specify `everyone`.
If you don't want to notify anyone, set this to `none`.
- notify_email_list:
opts:
category: Build Artifact Deployment
title: "Notify: Emails"
description: |
Email addresses to notify. Separate them with commas.
You can specify any email address, the recipients
don't have to be in your team.
Please note that if the email address is associated with a Bitrise account,
the user must be [watching](https://devcenter.bitrise.io/builds/configuring-notifications/#watching-an-app) the app.
is_sensitive: true
- is_enable_public_page: "true"
opts:
category: Build Artifact Deployment
title: Enable public page for the App?
description: |
If this option is enabled, a public install page
will be available with a long and random URL which can be shared
with others who are not registered on Bitrise.
If you disable this option, the **Notify: Emails** option will
be ignored and the **Notify: User Roles** users will receive the build's
URL instead of the public page's URL!
is_required: true
is_expand: false
value_options:
- "true"
- "false"
- bundletool_version: 1.15.0
opts:
category: Build Artifact Deployment
title: Bundletool version
summary: The specific bundletool version you want to use.
description: |-
If you need a specific [bundletool version]((https://github.com/google/bundletool/releases) other than the default version, you can modify the value of the **Bundletool version** required input.
is_required: true
- build_url: $BITRISE_BUILD_URL
opts:
category: Build Artifact Deployment
title: Bitrise Build URL
summary: |-
Unique build URL of this build on Bitrise.io
description: |-
Unique build URL of this build on Bitrise.io
is_required: true
is_dont_change_value: true
- build_api_token: $BITRISE_BUILD_API_TOKEN
opts:
category: Build Artifact Deployment
title: Bitrise Build API Token
summary: |-
The build's API Token for the build on Bitrise.io
description: |-
The build's API Token for the build on Bitrise.io
is_required: true
is_dont_change_value: true
is_sensitive: true
- pipeline_intermediate_files:
opts:
category: Pipeline Intermediate File Sharing
title: Files to share between pipeline stages
summary: |-
A newline (`\n`) separated list of file path - env key pairs (`{path}:{env_key}`).
description: |-
A newline (`\n`) separated list of file path - env key pairs (`{path}:{env_key}`).
The input uses a `{path}:{env_key}` syntax.
The colon character (`:`) is the delimiter between the file path and the environment variable key.
A shorthand syntax of `ENV_VAR` can be used for `$ENV_VAR:ENV_VAR` when the name of the env var in the current workflow will become the shared env_key.
The file path can be specified with environment variables or direct paths,
and can point to both a local file or directory:
```
$BITRISE_IPA_PATH:BITRISE_IPA_PATH
BITRISE_IPA_PATH
$BITRISE_APK_PATH:DEVELOPMENT_APK_PATH
./path/to/test_reports:TEST_REPORTS_DIR
$BITRISE_SOURCE_DIR/deploy_dir:DEPLOY_DIR
```
- addon_api_base_url: https://vdt.bitrise.io/test
opts:
category: Test Reports Addon
title: Test API's base URL
summary: The URL where test API is accessible.
description: |
The URL where test API is accessible.
is_required: true
is_dont_change_value: true
- addon_api_token: $ADDON_VDTESTING_API_TOKEN
opts:
category: Test Reports Addon
title: API Token
summary: The token required to authenticate with the API.
description: |
The token required to authenticate with the API.
is_dont_change_value: true
is_sensitive: true
- public_install_page_url_map_format: "{{range $index, $element := .}}{{if $index}}|{{end}}{{$element.File}}=>{{$element.URL}}{{end}}"
opts:
category: Step output configuration
title: Format for the BITRISE_PUBLIC_INSTALL_PAGE_URL_MAP output
summary: You can customize the format of the `BITRISE_PUBLIC_INSTALL_PAGE_URL_MAP` output so that the next Step can render the output.
description: |-
Provide a language template description using [Golang templates](https://golang.org/pkg/text/template)
so that the **Deploy to Bitrise.io** Step can build the required custom output.
is_required: true
is_expand: false
- permanent_download_url_map_format: "{{range $index, $element := .}}{{if $index}}|{{end}}{{$element.File}}=>{{$element.URL}}{{end}}"
opts:
category: Step output configuration
title: Format for the BITRISE_PERMANENT_DOWNLOAD_URL_MAP output
summary: You can customize the format of the `BITRISE_PERMANENT_DOWNLOAD_URL_MAP` output so that the next Step can render the output.
description: |-
Provide a language template description using [Golang templates](https://golang.org/pkg/text/template)
so that the **Deploy to Bitrise.io** Step can build the required custom output for the permanent download URL.
is_required: true
is_expand: false
- details_page_url_map_format: "{{range $index, $element := .}}{{if $index}}|{{end}}{{$element.File}}=>{{$element.URL}}{{end}}"
opts:
category: Step output configuration
title: Format for the BITRISE_ARTIFACT_DETAILS_PAGE_URL_MAP output
summary: You can customize the format of the `BITRISE_ARTIFACT_DETAILS_PAGE_URL_MAP` output so that the next Step can render the output.
description: |-
Provide a language template description using [Golang templates](https://golang.org/pkg/text/template)
so that the **Deploy to Bitrise.io** Step can build the required custom output for the details page URL.
is_required: true
is_expand: false
- files_to_redact:
opts:
title: Files to redact
description: |-
A newline (`\n`) separated list of file paths to redact secrets from before the step deploys them.
summary: |-
A newline (`\n`) separated list of file paths to redact secrets from before the step deploys them.
The file path can be specified with environment variables or direct paths:
```
$XCODE_BUILD_RAW_RESULT_TEXT_PATH
./path/to/build_log.xml
```
The step will fail (and potentially also fail the build) if there is any error during the redaction process.
This will prevent secrets in files accidentally leaking out of builds.
is_required: false
- debug_mode: "false"
opts:
category: Debugging
title: Enable Debug Mode
summary: The Step will print more verbose logs if enabled.
description: The Step will print more verbose logs if enabled.
is_required: true
value_options:
- "false"
- "true"
outputs:
- BITRISE_PUBLIC_INSTALL_PAGE_URL:
opts:
title: Public Install Page URL
description: |-
Public Install Page's URL, if the
*Enable public page for the App?* option was *enabled*.
- BITRISE_PUBLIC_INSTALL_PAGE_URL_MAP:
opts:
title: Map of filenames and Public Install Page URLs
description: |-
Public Install Page URLs by the artifact's file path.
Only set it if the *Enable public page for the App?* option was *enabled*.
The default format is `KEY1=>VALUE|KEY2=>VALUE` but is controlled by the `public_install_page_url_map_format` input
Examples:
- $BITRISE_DEPLOY_DIR/ios_app.ipa=>https://ios_app/public/install/page
- $BITRISE_DEPLOY_DIR/android_app.apk=>https://android_app/public/install/page|$BITRISE_DEPLOY_DIR/ios_app.ipa=>https://ios_app/public/install/page
- BITRISE_PERMANENT_DOWNLOAD_URL_MAP:
opts:
title: Map of filenames and Permanent Download URLs
description: |-
The output contains permanent Download URLs for each artifact. The URLs can be shared in any communication channel and they won't expire.
The default format is `KEY1=>VALUE|KEY2=>VALUE` where key is the filename and the value is the URL.
If you change `permanent_download_url_map_format` input then that will modify the format of this Env Var.
You can customize the format of the multiple URLs.
Examples:
- $BITRISE_DEPLOY_DIR/ios_app.ipa=>https://app.bitrise.io/artifacts/ipa-slug/download
- $BITRISE_DEPLOY_DIR/android_app.apk=>https://app.bitrise.io/artifacts/apk-slug/download|$BITRISE_DEPLOY_DIR/ios_app.ipa=>https://app.bitrise.io/artifacts/ipa-slug/download
- BITRISE_ARTIFACT_DETAILS_PAGE_URL:
opts:
title: Details Page URL
description: |-
Details Page's URL.
At the moment, only installable artifacts (.aab, .apk, .ipa) have details page URL.
- BITRISE_ARTIFACT_DETAILS_PAGE_URL_MAP:
opts:
title: Map of filenames and Public Install Page URLs
description: |-
Details Page URLs by the artifact's path.
The default format is `KEY1=>VALUE\|KEY2=>VALUE` but is controlled by the `details_page_url_map_format` input
Examples:
- $BITRISE_DEPLOY_DIR/ios_app.ipa=>https://app.bitrise.io/apps/ios_app/installable-artifacts/ipa-slug
- $BITRISE_DEPLOY_DIR/android_app.apk=>https://app.bitrise.io/apps/android_app/installable-artifacts/apk-slug|$BITRISE_DEPLOY_DIR/ios_app.ipa=>https://app.bitrise.io/apps/ios_app/installable-artifacts/ipa-slug