-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
29 lines (27 loc) · 861 Bytes
/
.gitlab-ci.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
variables:
ANDROID_COMPILE_SDK: '33'
ANDROID_BUILD_TOOLS: '33.0.0'
ANDROID_SDK_TOOLS: '9477386_latest'
# ANDROID_SDK_TOOLS: '10406996_latest'
stages:
- build
build:
image: docker:latest
services:
- docker:dind
stage: build
before_script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
script:
- TAG="${CI_REGISTRY_IMAGE}:${SDK_VERSION}-tools-${ANDROID_COMPILE_SDK}"
- docker image build --cache-from $TAG --build-arg BASE_IMAGE=openjdk:${SDK_VERSION} --build-arg ANDROID_COMPILE_SDK=${ANDROID_COMPILE_SDK} --build-arg ANDROID_BUILD_TOOLS=${ANDROID_BUILD_TOOLS} --build-arg ANDROID_SDK_TOOLS=${ANDROID_SDK_TOOLS} -f ./Dockerfile -t $TAG .
- docker image push $TAG
parallel:
matrix:
- SDK_VERSION:
- 11-jdk
- 17-jdk-slim
only:
- main
tags:
- staging-ci-runner