Skip to content

Commit 06c259f

Browse files
authored
feat(tidbx): add dockerfile (#560)
Signed-off-by: wuhuizuo <[email protected]>
1 parent b0cffda commit 06c259f

File tree

4 files changed

+71
-2
lines changed

4 files changed

+71
-2
lines changed

.github/workflows/pull-cd-builder-images-centos7.yaml

+9-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
JSON_CHANGED_BUILDERS=$(echo "$JSON_CHANGED_FOLDERS" | jq -c 'map(sub("/centos7"; "")) | map(sub("dockerfiles/cd/builders/"; "")) | map(select(length > 0)) | unique')
5959
6060
# golang type builders
61-
JSON_ALL_GO_BUILDERS='["ng-monitoring", "pd","ticdc", "tidb", "tidb-dashboard", "tiflow"]'
61+
JSON_ALL_GO_BUILDERS='["ng-monitoring", "pd","ticdc", "tidb", "tidb-dashboard", "tiflow", "tidbx"]'
6262
JSON_ALL_RUST_BUILDERS='["tikv"]'
6363
JSON_ALL_CPP_BUILDERS='["tiflash"]'
6464
@@ -101,6 +101,14 @@ jobs:
101101
profile: go-1.20
102102
- builder: ticdc
103103
profile: go-1.19
104+
- builder: tidbx
105+
profile: go-1.22
106+
- builder: tidbx
107+
profile: go-1.21
108+
- builder: tidbx
109+
profile: go-1.20
110+
- builder: tidbx
111+
profile: go-1.19
104112
max-parallel: 1
105113

106114
steps:

.github/workflows/release-cd-builder-images-centos7.yaml

+9-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
JSON_CHANGED_BUILDERS=$(echo "$JSON_CHANGED_FOLDERS" | jq -c 'map(sub("/centos7"; "")) | map(sub("dockerfiles/cd/builders/"; "")) | map(select(length > 0)) | unique')
6060
6161
# golang type builders
62-
JSON_ALL_GO_BUILDERS='["ng-monitoring", "pd","ticdc", "tidb", "tidb-dashboard", "tiflow"]'
62+
JSON_ALL_GO_BUILDERS='["ng-monitoring", "pd","ticdc", "tidb", "tidb-dashboard", "tiflow", "tidbx"]'
6363
JSON_ALL_RUST_BUILDERS='["tikv"]'
6464
JSON_ALL_CPP_BUILDERS='["tiflash"]'
6565
@@ -101,6 +101,14 @@ jobs:
101101
profile: go-1.20
102102
- builder: ticdc
103103
profile: go-1.19
104+
- builder: tidbx
105+
profile: go-1.22
106+
- builder: tidbx
107+
profile: go-1.21
108+
- builder: tidbx
109+
profile: go-1.20
110+
- builder: tidbx
111+
profile: go-1.19
104112
max-parallel: 1
105113

106114
steps:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# build requires:
2+
# - docker >= v20.10
3+
#
4+
# compose from tikv, tidb, pd, and other components.
5+
6+
########### stage: builder
7+
FROM ghcr.io/pingcap-qe/cd/builders/tikv:v2024.10.8-63-gb22476a-centos7 as builder
8+
LABEL org.opencontainers.image.authors "[email protected]"
9+
LABEL org.opencontainers.image.description "binary builder for TiDBx (experimental)"
10+
LABEL org.opencontainers.image.source "https://github.com/PingCAP-QE/artifacts"
11+
12+
# install golang toolchain
13+
# renovate: datasource=docker depName=golang
14+
ARG GOLANG_VERSION=1.23.6
15+
RUN OS=linux; ARCH=$([ "$(arch)" = "x86_64" ] && echo amd64 || echo arm64); \
16+
curl -fsSL https://dl.google.com/go/go${GOLANG_VERSION}.linux-${ARCH}.tar.gz | tar -C /usr/local -xz
17+
ENV PATH /usr/local/go/bin/:$PATH
18+
LABEL go-version="${GOLANG_VERSION}"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
apiVersion: skaffold/v4beta6
3+
kind: Config
4+
metadata:
5+
name: builder
6+
build:
7+
artifacts:
8+
- image: tidbx
9+
platforms: [linux/amd64, linux/arm64]
10+
docker:
11+
dockerfile: centos7/Dockerfile
12+
target: builder
13+
tagPolicy:
14+
customTemplate:
15+
template: "{{ .SHA }}-centos7"
16+
components:
17+
- name: SHA
18+
gitCommit:
19+
variant: Tags
20+
local:
21+
useDockerCLI: true
22+
useBuildkit: true
23+
concurrency: 0
24+
tryImportMissing: true
25+
profiles:
26+
- name: go-1.23
27+
patches:
28+
- op: replace
29+
path: /build/tagPolicy/customTemplate/template
30+
value: "{{ .SHA }}-centos7-go1.23"
31+
- op: add
32+
path: /build/artifacts/0/docker/buildArgs
33+
value:
34+
# renovate: datasource=docker depName=golang
35+
GOLANG_VERSION: 1.23.6

0 commit comments

Comments
 (0)