forked from bitrise-steplib/steps-appcenter-deploy-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitrise.yml
148 lines (135 loc) · 4.86 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
format_version: "9"
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
workflows:
vendor-update:
title: Vendor update
description: |
Used for updating the vendored dependencies
steps:
- script:
title: Vendor update
inputs:
- content: |-
#!/bin/bash
set -ex
go mod vendor
test:
envs:
- APK_DOWNLOAD_URL: https://raw.githubusercontent.com/bitrise-io/sample-artifacts/master/apks/app-armeabi-v7a-release.apk
- APK_PATH: app-debug.apk
- AAB_DOWNLOAD_URL: https://raw.githubusercontent.com/bitrise-io/sample-artifacts/master/app-bitrise-signed.aab
- AAB_PATH: app-bitrise-signed.aab
- MAPPING_DOWNLOAD_URL: https://raw.githubusercontent.com/bitrise-io/sample-artifacts/master/mappings/app-armeabi-v7a-release.txt
- MAPPING_PATH: mapping.txt
- APPCENTER_APP_NAME: steps-appcenter-deploy-android
- APPCENTER_APP_OWNER: app-center-bot
steps:
- go-list:
- golint:
- errcheck:
- go-test:
- script:
title: Clean _tmp
inputs:
- content: rm -rf ./_tmp
- change-workdir:
title: Change workdir to _tmp
run_if: true
inputs:
- path: ./_tmp
- script:
title: Download testing resources
inputs:
- content: |-
#!/bin/bash
set -ex
curl -f $APK_DOWNLOAD_URL > $APK_PATH
curl -f $MAPPING_DOWNLOAD_URL > $MAPPING_PATH
curl -f $AAB_DOWNLOAD_URL > $AAB_PATH
- path::./:
inputs:
- app_path: $APK_PATH
- api_token: $API_TOKEN
- owner_name: $APPCENTER_APP_OWNER
- app_name: $APPCENTER_APP_NAME
- debug: "no" # Because of the upload
- distribution_group: |-
Collaborators
Public
- mapping_path: $MAPPING_PATH
- distribution_tester: [email protected]
- release_notes: Bitrise step test
- script:
title: Check output envs
inputs:
- content: |-
#!/bin/bash
set -ex
if [ -z $APPCENTER_DEPLOY_INSTALL_URL ]
then
echo "ERROR: APPCENTER_DEPLOY_INSTALL_URL variable empty"
exit 1
fi
if [ -z $APPCENTER_DEPLOY_DOWNLOAD_URL ];
then
echo "ERROR: APPCENTER_DEPLOY_DOWNLOAD_URL variable empty"
exit 1
fi
if [ -z $APPCENTER_PUBLIC_INSTALL_PAGE_URL ]
then
echo "ERROR: APPCENTER_PUBLIC_INSTALL_PAGE_URL variable empty"
exit 1
fi
if [ "$APPCENTER_DEPLOY_STATUS" != "success" ]
then
echo "ERROR: APPCENTER_DEPLOY_STATUS variable is $APPCENTER_DEPLOY_STATUS"
exit 1
fi
if [ -z $APPCENTER_RELEASE_PAGE_URL ]
then
echo "ERROR: APPCENTER_RELEASE_PAGE_URL variable empty"
exit 1
fi
envman add --key "APPCENTER_DEPLOY_INSTALL_URL" --value ""
envman add --key "APPCENTER_DEPLOY_DOWNLOAD_URL" --value ""
envman add --key "APPCENTER_PUBLIC_INSTALL_PAGE_URL" --value ""
envman add --key "APPCENTER_DEPLOY_STATUS" --value ""
envman add --key "APPCENTER_RELEASE_PAGE_URL" --value ""
- path::./:
inputs:
- app_path: $AAB_PATH
- api_token: $API_TOKEN
- owner_name: $APPCENTER_APP_OWNER
- app_name: $APPCENTER_APP_NAME
- debug: "no" # Because of the upload
- release_notes: Bitrise step test
- script:
title: Check output envs
inputs:
- content: |-
#!/bin/bash
set -ex
if [ -z $APPCENTER_DEPLOY_INSTALL_URL ]
then
echo "ERROR: APPCENTER_DEPLOY_INSTALL_URL variable empty"
exit 1
fi
if [ -z $APPCENTER_DEPLOY_DOWNLOAD_URL ];
then
echo "ERROR: APPCENTER_DEPLOY_DOWNLOAD_URL variable empty"
exit 1
fi
if [ -z $APPCENTER_DEPLOY_RELEASE_ID ];
then
echo "ERROR: APPCENTER_DEPLOY_RELEASE_ID variable empty"
exit 1
fi
if [ "$APPCENTER_DEPLOY_STATUS" != "success" ]
then
echo "ERROR: APPCENTER_DEPLOY_STATUS variable is $APPCENTER_DEPLOY_STATUS"
exit 1
fi
envman add --key "APPCENTER_DEPLOY_INSTALL_URL" --value ""
envman add --key "APPCENTER_DEPLOY_DOWNLOAD_URL" --value ""
envman add --key "APPCENTER_DEPLOY_RELEASE_ID" --value ""
envman add --key "APPCENTER_DEPLOY_STATUS" --value ""