-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathbitbucket-pipelines.yml
63 lines (53 loc) · 2.32 KB
/
bitbucket-pipelines.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
# This is an example Starter pipeline configuration
# Use a skeleton to build, test and deploy using manual and parallel steps
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: atlassian/default-image:3
options:
size: 2x
pipelines:
default:
- step:
name: Lint and Test
script:
- echo 'This will run teh lint and test'
custom:
android-debug-apk:
- step:
name: Android Debug Build APK
image: ghcr.io/cirruslabs/flutter:3.22.0
caches:
- gradle
script:
- echo 'Fetching Dependencies'
- flutter pub get
- echo 'Building apk'
- flutter build apk --debug --build-number=$VERSION_CODE --build-name=$VERSION_NAME --dart-define=BUGSNAG_API_KEY=$BUGSNAG_API_KEY --flavor prod
- echo 'Prepare build for upload'
- cp build/app/outputs/flutter-apk/app-prod-debug.apk ./build-${BITBUCKET_PIPELINE_UUID}
- pipe: atlassian/bitbucket-upload-file:0.7.3
variables:
BITBUCKET_USERNAME: $BITBUCKET_USERNAME
BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD
FILENAME: "build-${BITBUCKET_PIPELINE_UUID}"
android-release-aab:
- step:
name: Android Release Build AAB
image: ghcr.io/cirruslabs/flutter:3.22.0
caches:
- gradle
script:
- echo 'Fetching Dependencies'
- flutter pub get
- echo 'Retrieving secrets'
- echo $KEYSTORE_B64 | base64 --decode > android/app/ueno-upload-keystore.jks
- echo $KEY_PROPERTIES_B64 | base64 --decode > android/key.properties
- echo 'Building App Bundle'
- flutter build appbundle --release --build-number=$VERSION_CODE --build-name=$VERSION_NAME --dart-define=BUGSNAG_API_KEY=$BUGSNAG_API_KEY --flavor prod
- echo 'Prepare build for upload'
- cp build/app/outputs/bundle/prodRelease/app-prod-release.aab ./build-${BITBUCKET_PIPELINE_UUID}
- pipe: atlassian/bitbucket-upload-file:0.7.3
variables:
BITBUCKET_USERNAME: $BITBUCKET_USERNAME
BITBUCKET_APP_PASSWORD: $BITBUCKET_APP_PASSWORD
FILENAME: "build-${BITBUCKET_PIPELINE_UUID}"