-
-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathcloudbuild.yaml
35 lines (30 loc) · 1.42 KB
/
cloudbuild.yaml
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
# cloudbuild.yaml
steps:
- name: gcr.io/cloud-builders/docker
id: 'android-builder'
env:
- 'BUILD=$BUILD_ID'
- 'PROJECT=$PROJECT_ID'
- 'REV=$REVISION_ID'
args: [
'build',
'-t', 'eu.gcr.io/$PROJECT_ID/android-builder:${SHORT_SHA}',
'-t', 'eu.gcr.io/$PROJECT_ID/android-builder:latest',
# These are used by Cloud Build variable substitutions (as shown in screenshot_01.png):
# https://cloud.google.com/cloud-build/docs/configuring-builds/substitute-variable-values
#'--build-arg', '_ANDROID_SDK_PACKAGES="${_ANDROID_SDK_PACKAGES"}',
#'--build-arg', '_CLI_TOOLS_VERSION="${_CLI_TOOLS_VERSION"}',
#'--build-arg', '_GRADLE_VERSION=${_GRADLE_VERSION}',
# By default these static values are being used, without the NDK (build-trigger configuration not required.
# Note: When commenting these out, one has to run `./gradlew build` to fetch the components instead.
# '--build-arg', 'ANDROID_SDK_PACKAGES=platform-tools platforms;android-35 build-tools;35.0.0 ndk;25.1.8937393',
'--build-arg', '_ANDROID_SDK_PACKAGES=platform-tools platforms;android-35 build-tools;35.0.0',
'--build-arg', '_CLI_TOOLS_VERSION=12700392',
'--build-arg', '_GRADLE_VERSION=8.12',
# enable cloudbuild network
'--network', 'cloudbuild',
'.'
]
images:
- 'eu.gcr.io/$PROJECT_ID/android-builder:${SHORT_SHA}'
- 'eu.gcr.io/$PROJECT_ID/android-builder:latest'