Skip to content

Commit ee7bfd3

Browse files
authored
feat(pingcap/ticdc): we build and publish cdc components from pingcap/ticdc repo since v9.0.0 (#529)
This pull request includes changes to the Dockerfile for the `ticdc` product and updates to the `packages.yaml.tmpl` file to modify the build and publish process for CDC components. The most important changes are: Dockerfile changes: * Added a new base image argument and updated the Dockerfile to use this base image for building the `ticdc` product. Build and publish process updates: * Updated the version constraint and added new steps to build and publish CDC components from the `pingcap/ticdc` repository for versions starting from `v9.0.0`. * Added detailed steps for installing the Node.js toolchain and building `dm-master`, `dm-worker`, `dmctl`, and `dm-syncer` components. * Defined new artifact configurations for `dm-master`, `dm-worker`, `dmctl`, and container images for `dm` and `tiflow-engine` since v9.0.0 --------- Signed-off-by: wuhuizuo <[email protected]>
1 parent 229d393 commit ee7bfd3

File tree

2 files changed

+114
-2
lines changed

2 files changed

+114
-2
lines changed

dockerfiles/products/ticdc/Dockerfile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
ARG BASE_IMG=ghcr.io/pingcap-qe/bases/tools-base:v1.9.2
2+
FROM $BASE_IMG
3+
COPY cdc /cdc
4+
EXPOSE 8300
5+
6+
CMD ["/cdc"]

packages/packages.yaml.tmpl

+108-2
Original file line numberDiff line numberDiff line change
@@ -1844,8 +1844,114 @@ components:
18441844
- if: {{ semver.CheckConstraint "< 6.1.0-0" .Release.version }}
18451845
image: ghcr.io/pingcap-qe/cd/builders/tiflow:v20240325-103-g043adb3-go1.18
18461846
routers:
1847-
- description: For range [v6.5.0, )
1848-
if: {{ semver.CheckConstraint ">= 6.5.0-0" .Release.version }}
1847+
- description: |
1848+
For range [v9.0.0, ). Since v9.0.0 we build and publish cdc components from `pingcap/ticdc` repository.
1849+
if: {{ semver.CheckConstraint ">= v9.0.0-0" .Release.version }}
1850+
os: [linux, darwin]
1851+
arch: [amd64, arm64]
1852+
profile: [release]
1853+
steps:
1854+
release:
1855+
- os: darwin
1856+
description: install nodejs toolchain.
1857+
script: |
1858+
NODE_VERSION="v16.20.2"
1859+
NVM_VERSION="v0.39.5"
1860+
NVM_DIR="$HOME/.nvm"
1861+
mkdir -p $NVM_DIR
1862+
1863+
if [ ! -s "$NVM_DIR/nvm.sh" ]; then
1864+
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/${NVM_VERSION}/install.sh | bash
1865+
fi
1866+
. $NVM_DIR/nvm.sh
1867+
nvm install ${NODE_VERSION}
1868+
nvm use ${NODE_VERSION}
1869+
nvm alias default ${NODE_VERSION}
1870+
1871+
node --version && npm --version
1872+
npm install -g yarn
1873+
- script: |
1874+
make dm-master-with-webui dm-worker dmctl dm-syncer
1875+
artifacts:
1876+
- name: "dm-master-{{ .Release.version }}-{{ .Release.os }}-{{ .Release.arch }}.tar.gz"
1877+
files:
1878+
- name: dm-master/dm-master
1879+
src:
1880+
path: bin/dm-master
1881+
- name: dm-master/conf/dm_worker.rules.yml
1882+
src:
1883+
path: dm/metrics/alertmanager/dm_worker.rules.yml
1884+
- name: dm-master/scripts/DM-Monitor-Professional.json
1885+
src:
1886+
path: "{{ if semver.CheckConstraint "< 6.6.0-0" .Release.version }}dm/{{ end }}metrics/grafana/DM-Monitor-Professional.json"
1887+
- name: dm-master/scripts/DM-Monitor-Standard.json
1888+
src:
1889+
path: "{{ if semver.CheckConstraint "< 6.6.0-0" .Release.version }}dm/{{ end }}metrics/grafana/DM-Monitor-Standard.json"
1890+
tiup:
1891+
description: >-
1892+
dm-master component of Data Migration Platform.
1893+
entrypoint: dm-master/dm-master
1894+
- name: "dm-worker-{{ .Release.version }}-{{ .Release.os }}-{{ .Release.arch }}.tar.gz"
1895+
files:
1896+
- name: dm-worker/dm-worker
1897+
src:
1898+
path: bin/dm-worker
1899+
- name: dm-worker/conf/dm_worker.rules.yml
1900+
src:
1901+
path: dm/metrics/alertmanager/dm_worker.rules.yml
1902+
- name: dm-worker/scripts/DM-Monitor-Professional.json
1903+
src:
1904+
path: "{{ if semver.CheckConstraint "< 6.6.0-0" .Release.version }}dm/{{ end }}metrics/grafana/DM-Monitor-Professional.json"
1905+
- name: dm-worker/scripts/DM-Monitor-Standard.json
1906+
src:
1907+
path: "{{ if semver.CheckConstraint "< 6.6.0-0" .Release.version }}dm/{{ end }}metrics/grafana/DM-Monitor-Standard.json"
1908+
tiup:
1909+
description: >-
1910+
dm-worker component of Data Migration Platform.
1911+
entrypoint: dm-worker/dm-worker
1912+
- name: "dmctl-{{ .Release.version }}-{{ .Release.os }}-{{ .Release.arch }}.tar.gz"
1913+
files:
1914+
- name: dmctl/dmctl
1915+
src:
1916+
path: bin/dmctl
1917+
- name: dmctl/conf/dm_worker.rules.yml
1918+
src:
1919+
path: dm/metrics/alertmanager/dm_worker.rules.yml
1920+
- name: dmctl/scripts/DM-Monitor-Professional.json
1921+
src:
1922+
path: "{{ if semver.CheckConstraint "< 6.6.0-0" .Release.version }}dm/{{ end }}metrics/grafana/DM-Monitor-Professional.json"
1923+
- name: dmctl/scripts/DM-Monitor-Standard.json
1924+
src:
1925+
path: "{{ if semver.CheckConstraint "< 6.6.0-0" .Release.version }}dm/{{ end }}metrics/grafana/DM-Monitor-Standard.json"
1926+
tiup:
1927+
description: >-
1928+
dmctl component of Data Migration Platform.
1929+
entrypoint: dmctl/dmctl
1930+
- name: container image - dm
1931+
type: image
1932+
artifactory:
1933+
repo: "{{ .Release.registry }}/pingcap/tiflow/images/dm"
1934+
dockerfile: https://github.com/PingCAP-QE/artifacts/raw/main/dockerfiles/products/tiflow/{{ template "image_dockerfile_folder" .Release.version }}dm.Dockerfile
1935+
files:
1936+
- name: dm-master
1937+
src:
1938+
path: bin/dm-master
1939+
- name: dm-worker
1940+
src:
1941+
path: bin/dm-worker
1942+
- name: dmctl
1943+
src:
1944+
path: bin/dmctl
1945+
- name: container image - tiflow-engine
1946+
type: image
1947+
artifactory:
1948+
repo: "{{ .Release.registry }}/pingcap/tiflow/images/tiflow"
1949+
context: . # just build under git repo folder.
1950+
dockerfile: deployments/engine/docker/Dockerfile
1951+
build_args:
1952+
- GOPROXY=http://goproxy.pingcap.net,https://goproxy.cn,direct
1953+
- description: For range [v6.5.0, v9.0.0)
1954+
if: {{ semver.CheckConstraint ">= 6.5.0-0, < v9.0.0-0" .Release.version }}
18491955
os: [linux, darwin]
18501956
arch: [amd64, arm64]
18511957
profile: [release]

0 commit comments

Comments
 (0)