From f5e330e522f1de345719d380015ebd2d7a127c1f Mon Sep 17 00:00:00 2001 From: wuhuizuo Date: Tue, 9 Jan 2024 12:58:58 +0800 Subject: [PATCH 1/3] fix(packages): download etcdctl from etcd officer release links Signed-off-by: wuhuizuo --- packages/offline-packages.yaml.tmpl | 4 ++-- packages/packages.yaml.tmpl | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/offline-packages.yaml.tmpl b/packages/offline-packages.yaml.tmpl index de32211b..0263e229 100644 --- a/packages/offline-packages.yaml.tmpl +++ b/packages/offline-packages.yaml.tmpl @@ -106,7 +106,7 @@ editions: - name: etcdctl # New in v6.0.0 src: type: http - url: "http://fileserver.pingcap.net/download/pingcap/etcd-v3.4.21-linux-{{ .Release.arch }}.tar.gz" + url: "https://github.com/etcd-io/etcd/releases/download/v3.4.21/etcd-v3.4.21-{{ .Release.os }}-{{ .Release.arch }}.tar.gz" extract: true extract_inner_path: "etcd-v3.4.21-linux-{{ .Release.arch }}/etcdctl" - description: "Started from v7.1.0 until v7.5" @@ -208,7 +208,7 @@ editions: - name: etcdctl # New in v6.0.0 src: type: http - url: "http://fileserver.pingcap.net/download/pingcap/etcd-v3.4.21-linux-{{ .Release.arch }}.tar.gz" + url: "https://github.com/etcd-io/etcd/releases/download/v3.4.21/etcd-v3.4.21-{{ .Release.os }}-{{ .Release.arch }}.tar.gz" extract: true extract_inner_path: "etcd-v3.4.21-linux-{{ .Release.arch }}/etcdctl" - name: mydumper # New in v6.0.0 diff --git a/packages/packages.yaml.tmpl b/packages/packages.yaml.tmpl index 8ff2ee3f..17ecffcf 100644 --- a/packages/packages.yaml.tmpl +++ b/packages/packages.yaml.tmpl @@ -84,7 +84,7 @@ components: - name: etcdctl src: type: http - url: "http://fileserver.pingcap.net/download/pingcap/etcd-v3.4.21-{{ .Release.os }}-{{ .Release.arch }}.tar.gz" + url: "https://github.com/etcd-io/etcd/releases/download/v3.4.21/etcd-v3.4.21-{{ .Release.os }}-{{ .Release.arch }}.tar.gz" extract: true extract_inner_path: etcd-v3.4.21-{{ .Release.os }}-{{ .Release.arch }}/etcdctl - name: pd-ctl From 0e83cad89501d65adc395786585f26a86c8d0bc9 Mon Sep 17 00:00:00 2001 From: wuhuizuo Date: Tue, 9 Jan 2024 14:22:56 +0800 Subject: [PATCH 2/3] fix(packages): fix config for `tidb-binlog` and `tidb-tools` - `tidb-tools` support Mac targets, we add it here. Signed-off-by: wuhuizuo --- packages/packages.yaml.tmpl | 21 ++++++++++++++++++--- packages/scripts/ci.sh | 6 +++--- 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/packages/packages.yaml.tmpl b/packages/packages.yaml.tmpl index 17ecffcf..4b0b7162 100644 --- a/packages/packages.yaml.tmpl +++ b/packages/packages.yaml.tmpl @@ -754,12 +754,12 @@ components: - description: interpret versions according to semantic version spec. # ref: https://github.com/Masterminds/semver#checking-version-constraints if: {{ semver.CheckConstraint ">= 7.1.0-0" .Release.version }} - os: [linux] + os: [linux, darwin] arch: [amd64, arm64] profile: [release] steps: release: - - script: make build + - script: make sync_diff_inspector artifacts: - name: "tidb-tools-{{ .Release.version }}-{{ .Release.os }}-{{ .Release.arch }}.tar.gz" files: @@ -819,11 +819,20 @@ components: - {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }}-{{ strings.Trunc 7 .Git.sha }} {{- end }} - {{ strings.ReplaceAll "/" "-" .Git.ref | strings.ToLower }} + builders: # binary builder, also we need it when build for mac to get build tools versions and other informations. + - if: {{ semver.CheckConstraint ">= 7.4.0-0" .Release.version }} + image: ghcr.io/pingcap-qe/cd/builders/tidb:v20231115-e1c4b43-go1.21 + - if: {{ semver.CheckConstraint ">= 7.0.0-0, < 7.4.0-0" .Release.version }} + image: ghcr.io/pingcap-qe/cd/builders/tidb:v20231115-e1c4b43-go1.20 + - if: {{ semver.CheckConstraint ">= 6.1.0-0, < 7.0.0-0" .Release.version }} + image: ghcr.io/pingcap-qe/cd/builders/tidb:v20231115-e1c4b43-go1.19 + - if: {{ semver.CheckConstraint "< 6.1.0-0" .Release.version }} + image: ghcr.io/pingcap-qe/cd/builders/tidb:v20231115-e1c4b43-go1.18 routers: - description: interpret versions according to semantic version spec. # ref: https://github.com/Masterminds/semver#checking-version-constraints if: {{ semver.CheckConstraint ">= 7.1.0-0" .Release.version }} - os: [linux] + os: [linux, darwin] arch: [amd64, arm64] profile: [release] steps: @@ -853,11 +862,17 @@ components: - name: drainer src: path: bin/drainer + tiup: + description: The drainer componet of TiDB binlog service + entrypoint: drainer - name: "pump-{{ .Release.version }}-{{ .Release.os }}-{{ .Release.arch }}.tar.gz" files: - name: pump src: path: bin/pump + tiup: + description: The pump componet of TiDB binlog service + entrypoint: pump - name: container image type: image artifactory: diff --git a/packages/scripts/ci.sh b/packages/scripts/ci.sh index ec0ed0e5..7a652c10 100755 --- a/packages/scripts/ci.sh +++ b/packages/scripts/ci.sh @@ -3,7 +3,7 @@ set -euo pipefail function test_get_builder() { local versions="v7.5.0 v7.1.0 v6.5.0" - local components="tidb tiflow tiflash tikv pd ctl monitoring" + local components="tidb tiflow tiflash tikv pd ctl monitoring tidb-binlog tidb-tools" local operating_systems="linux darwin" local architectures="amd64 arm64" local profile="release" @@ -65,7 +65,7 @@ function test_get_builder() { function test_gen_package_artifacts_script() { local versions="v7.5.0 v7.1.0 v6.5.0" - local components="tidb tiflow tiflash tikv pd ctl monitoring" + local components="tidb tiflow tiflash tikv pd ctl monitoring tidb-binlog tidb-tools" local operating_systems="linux darwin" local architectures="amd64 arm64" local profile="release" @@ -127,7 +127,7 @@ function test_gen_package_artifacts_script() { function test_gen_package_images_script() { local versions="v7.5.0 v7.1.0 v6.5.0" - local components="tidb tiflow tiflash tikv pd ctl monitoring" + local components="tidb tiflow tiflash tikv pd ctl monitoring tidb-binlog tidb-tools" local architectures="amd64 arm64" local profile="release" local script="./packages/scripts/gen-package-images-with-config.sh" From dea1d41c22a06ca383f29e75dee8987daf3835ff Mon Sep 17 00:00:00 2001 From: wuhuizuo Date: Tue, 9 Jan 2024 15:09:24 +0800 Subject: [PATCH 3/3] chore(packages): update `tidb-binlog` in file packages.yaml.tmpl Signed-off-by: wuhuizuo --- packages/packages.yaml.tmpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/packages.yaml.tmpl b/packages/packages.yaml.tmpl index 4b0b7162..77e2b2a9 100644 --- a/packages/packages.yaml.tmpl +++ b/packages/packages.yaml.tmpl @@ -753,7 +753,7 @@ components: routers: - description: interpret versions according to semantic version spec. # ref: https://github.com/Masterminds/semver#checking-version-constraints - if: {{ semver.CheckConstraint ">= 7.1.0-0" .Release.version }} + if: {{ semver.CheckConstraint ">= 6.5.0-0" .Release.version }} os: [linux, darwin] arch: [amd64, arm64] profile: [release] @@ -831,7 +831,7 @@ components: routers: - description: interpret versions according to semantic version spec. # ref: https://github.com/Masterminds/semver#checking-version-constraints - if: {{ semver.CheckConstraint ">= 7.1.0-0" .Release.version }} + if: {{ semver.CheckConstraint ">= 6.5.0-0" .Release.version }} os: [linux, darwin] arch: [amd64, arm64] profile: [release]