-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
123 lines (112 loc) · 2.91 KB
/
.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
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
stages:
- first
- second
- third
.build:
image:
name: gcr.io/kaniko-project/executor:v1.9.1-debug
entrypoint: [ "" ]
before_script:
- echo "{\"auths\":{
\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}
}" > /kaniko/.docker/config.json
only:
- master
- web
tags:
- android
## Stage: first
android-sdk:base:
extends: .build
stage: first
when: manual
variables:
IMAGE: ${CI_REGISTRY_IMAGE}/android-sdk:base
# Look for SDK Build Tools version here: https://developer.android.com/studio/releases/gradle-plugin#compatibility
BUILD_TOOLS: 30.0.3
script:
- /kaniko/executor
--context "$CI_PROJECT_DIR/android-sdk"
--dockerfile "$CI_PROJECT_DIR/android-sdk/Dockerfile"
--build-arg "build_tools=$BUILD_TOOLS"
--destination "$IMAGE"
ruby:
extends: .build
stage: first
when: manual
variables:
IMAGE: ${CI_REGISTRY_IMAGE}/ruby
parallel:
matrix:
- RUBY: [ '2.7', '3.0' ]
script:
- /kaniko/executor
--context "$CI_PROJECT_DIR/ruby"
--dockerfile "$CI_PROJECT_DIR/ruby/Dockerfile"
--build-arg "version=$RUBY"
--destination "$IMAGE:$RUBY"
danger-kotlin:
extends: .build
stage: first
when: manual
allow_failure: false
variables:
IMAGE: ${CI_REGISTRY_IMAGE}/danger-kotlin
VERSION: 1.1.0
script:
- /kaniko/executor
--context "$CI_PROJECT_DIR/danger-kotlin"
--dockerfile "$CI_PROJECT_DIR/danger-kotlin/Dockerfile"
--build-arg "version=$VERSION"
--destination "$IMAGE:$VERSION"
## Stage: second
.android-sdk:
extends: .build
variables:
IMAGE_PATH: ${CI_REGISTRY_IMAGE}
IMAGE: ${CI_REGISTRY_IMAGE}/android-sdk
parallel:
matrix:
- SDK: [ 30, 31, 32, 33 ]
android-sdk:
extends: .android-sdk
stage: second
needs:
- android-sdk:base
script:
- /kaniko/executor
--context "$CI_PROJECT_DIR/android-sdk/sdk"
--dockerfile "$CI_PROJECT_DIR/android-sdk/sdk/Dockerfile"
--build-arg "image_path=$IMAGE_PATH"
--build-arg "sdk=$SDK"
--destination "$IMAGE:$SDK"
## Stage: third
android-sdk:ndk:
extends: .android-sdk
stage: third
needs:
- android-sdk
variables:
NDK: 25.1.8937393
script:
- /kaniko/executor
--context "$CI_PROJECT_DIR/android-sdk/ndk"
--dockerfile "$CI_PROJECT_DIR/android-sdk/ndk/Dockerfile"
--build-arg "image_path=$IMAGE_PATH"
--build-arg "sdk=$SDK"
--build-arg "ndk=$NDK"
--destination "$IMAGE:$SDK-ndk"
--destination "$IMAGE:$SDK-ndk-$NDK"
android-emu:
extends: .build
stage: third
when: manual
variables:
API_VERSION: 30
IMAGE: ${CI_REGISTRY_IMAGE}/android-emu
script:
- /kaniko/executor
--context "$CI_PROJECT_DIR/android-emu"
--dockerfile "$CI_PROJECT_DIR/android-emu/Dockerfile"
--build-arg "api_version=$API_VERSION"
--destination "$IMAGE:$API_VERSION"