File tree 3 files changed +35
-5
lines changed
3 files changed +35
-5
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ function test_get_builder_freedom_releasing() {
77
77
local profile=" release"
78
78
local os=" linux"
79
79
for ac in $architectures ; do
80
- for version in v1.5 .0 v1.6.0; do
80
+ for version in v2.0 .0 v1.6.0 v1.5 .0; do
81
81
echo -en " [🚢] $cm $os $ac $version $profile :\t"
82
82
$script " $cm " " $os " " $ac " " $version " $profile
83
83
done
@@ -192,7 +192,7 @@ function test_gen_package_artifacts_script_freedom_releasing() {
192
192
local cm=" tidb-operator"
193
193
local os=" linux"
194
194
for ac in $architectures ; do
195
- for version in v1.5 .0 v1.6.0; do
195
+ for version in v2.0 .0 v1.6.0 v1.5 .0; do
196
196
echo -en " [📃📦] $cm $os $ac $version $profile :\t"
197
197
$script " $cm " " $os " " $ac " " $version " $profile branch-xxx 123456789abcdef
198
198
shellcheck -S error packages/scripts/build-package-artifacts.sh
@@ -287,7 +287,7 @@ function test_gen_package_images_script_freedom_releasing() {
287
287
# tidb-operator
288
288
local cm=" tidb-operator"
289
289
for ac in $architectures ; do
290
- for version in v1.6.0 v1.5.0; do
290
+ for version in v2.0.0 v1.6.0 v1.5.0; do
291
291
echo -en " [📃💿] $cm $os $ac $version $profile :\t"
292
292
$script " $cm " linux " $ac " " $version " " $profile " branch-xxx 123456789abcdef
293
293
shellcheck -S error packages/scripts/build-package-images.sh
Original file line number Diff line number Diff line change @@ -1387,8 +1387,31 @@ components:
1387
1387
- if: {{ semver.CheckConstraint "< 1.6.0-0" .Release.version }}
1388
1388
image: ghcr.io/pingcap-qe/cd/builders/tidb-operator:v2024.10.8-14-g52a7228-go1.21
1389
1389
routers:
1390
- - description: starts from 1.5.0
1391
- if: {{ semver.CheckConstraint ">= 1.5.0-0" .Release.version }}
1390
+ - description: for range [v2.0.0, )
1391
+ if: {{ semver.CheckConstraint ">= 2.0.0-0" .Release.version }}
1392
+ os: [linux]
1393
+ arch: [amd64, arm64]
1394
+ profile: [release]
1395
+ steps:
1396
+ release:
1397
+ - script: make build
1398
+ artifacts:
1399
+ - name: container image - operator
1400
+ type: image
1401
+ artifactory:
1402
+ repo: "{{ .Release.registry }}/pingcap/tidb-operator/images/tidb-operator"
1403
+ context: .
1404
+ dockerfile: image/Dockerfile
1405
+ target: operator # target build stage in Dockerfile
1406
+ - name: container image - prestop-checker
1407
+ type: image
1408
+ artifactory:
1409
+ repo: "{{ .Release.registry }}/pingcap/tidb-operator/images/prestop-checker"
1410
+ context: .
1411
+ dockerfile: image/Dockerfile
1412
+ target: prestop-checker # target build stage in Dockerfile
1413
+ - description: for range [v1.5.0, v2.0.0)
1414
+ if: {{ semver.CheckConstraint ">= 1.5.0-0, < 2.0.0-0" .Release.version }}
1392
1415
os: [linux]
1393
1416
arch: [amd64, arm64]
1394
1417
profile: [release, fips]
Original file line number Diff line number Diff line change 2
2
# Code generated by gomplate, DO NOT EDIT.
3
3
4
4
# It needs kaniko and oras tools, but it can be run in different containers for seperated stages.
5
+ # kaniko: https://github.com/GoogleContainerTools/kaniko/blob/main/README.md
6
+ # oras: https://oras.land/docs/category/oras-commands/
5
7
6
8
set -exo pipefail
7
9
@@ -123,12 +125,17 @@ build_and_push_images() {
123
125
destination=" {{ .artifactory.repo }}:$tag "
124
126
digest_file=" ${archive_dir} /digest.txt"
125
127
kaniko_options=" $kaniko_global_options --destination=${destination} --digest-file=${digest_file} "
128
+
126
129
{{- if has . " build_args" }}
127
130
{{- range .build_args }}
128
131
kaniko_options=" $kaniko_options --build-arg {{.}}"
129
132
{{- end }}
130
133
{{- end }}
131
134
135
+ {{- if has . " target" }}
136
+ kaniko_options=" $kaniko_options --target {{.target}} --skip-unused-stages"
137
+ {{- end }}
138
+
132
139
{{- if has . " context" }}
133
140
# just build it with native build from git repo's dockerfile
134
141
$kaniko_executor $kaniko_options --context {{ .context }} --dockerfile {{ .dockerfile }}
You can’t perform that action at this time.
0 commit comments