1
+ # Basic flutter build
2
+
3
+ # In this directory, run the following command to build this builder.
4
+ # $ gcloud builds submit . --config=cloudbuild.yaml
5
+
6
+ steps :
7
+
8
+ # clone the latest source codes
9
+ - name : ' gcr.io/cloud-builders/git'
10
+ args : ['clone', 'https://github.com/bwnyasse/flutter-testing-tutorial.git']
11
+ dir : ' /workspace'
12
+
13
+ # INTEGRATION : To run flutter build apk, one must need to be at the root of the project,
14
+ # the script simply cd to the root before running the build command
15
+ # -------------------------------------------------------------------------------------------
16
+ - name : ' gcr.io/$PROJECT_ID/flutter'
17
+ entrypoint : ' /bin/bash'
18
+ args : ['cloudbuild.sh', 'flutter-testing-tutorial']
19
+
20
+ # DEPLOYMENT: apk artifacts can be pushed to a GCS bucket like this
21
+ # ------------------------------------------------------------------
22
+ # - name: 'gcr.io/cloud-builders/gsutil'
23
+ # args: ['cp', '/workspace/flutter/examples/hello_world/build/app/outputs/apk/release/app-release.apk', 'gs://$MY_BUCKET/hello_world.apk']
24
+
25
+ # DELIVERY : upload apk to google play store with Fastlane
26
+ # -----------------------------------------------------------
27
+ # - name: 'gcr.io/$PROJECT_ID/fastlane'
28
+ # args: ['supply', '--package_name','${_ANDROID_PACKAGE_NAME}', '--track', '${_ANDROID_RELEASE_CHANNEL}', '--json_key_data', '${_GOOGLE_PLAY_UPLOAD_KEY_JSON}', '--apk', '/workspace/${_REPO_NAME}/build/app/outputs/apk/release/app-release.apk']
29
+ # timeout: 1200s
30
+
31
+ tags : ['cloud-builders-community']
0 commit comments