Skip to content

Commit ed23350

Browse files
authored
feat(packages): add next-gen build and artifacts for PD v9.0.0 and above (#629)
> Close PingCAP-QE/ci#3543 This pull request updates the `packages/packages.yaml.tmpl` file to introduce support for next-generation builds starting from version `v9.0.0-0`. It also refines the build and artifact generation process for different profiles, such as `release`, `next-gen`, `enterprise`, and `failpoint`, and adjusts the version ranges for build configurations. ### Build and artifact generation updates: * **Next-gen build support**: Added support for next-generation builds starting from version `v9.0.0-0`. This includes specific build steps for profiles like `release`, `next-gen`, `enterprise`, and `failpoint`. * **Artifact definitions**: Defined detailed artifact generation rules for various profiles, including file paths, descriptions, and TiUP publishing configurations for tools like `pd-server`, `pd-recover`, and `pd-ctl`. ### Version range adjustments: * **Version constraint updates**: Updated the version range for build configurations to `[v9.0.0-0, )` for next-gen builds and `[v8.4.0, v9.0.0)` for legacy builds.
1 parent 5c57498 commit ed23350

File tree

1 file changed

+72
-2
lines changed

1 file changed

+72
-2
lines changed

packages/packages.yaml.tmpl

Lines changed: 72 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,8 +554,78 @@ components:
554554
- if: {{ semver.CheckConstraint "< 6.1.0-0" .Release.version }}
555555
image: ghcr.io/pingcap-qe/cd/builders/pd:v20240325-103-g043adb3-go1.18
556556
routers:
557-
- description: For range [v8.4.0, )
558-
if: {{ semver.CheckConstraint ">= 8.4.0-0" .Release.version }}
557+
- description: For range [v9.0.0-0, ), support next-gen build since the version.
558+
if: {{ semver.CheckConstraint ">= v9.0.0-0" .Release.version }}
559+
os: [linux, darwin]
560+
arch: [amd64, arm64]
561+
profile: [release, next-gen, enterprise, failpoint]
562+
steps:
563+
release:
564+
- script: make build
565+
next-gen:
566+
- script: NEXT_GEN=1 make build
567+
enterprise:
568+
- script: PD_EDITION=Enterprise make build tools
569+
failpoint:
570+
- script: FAILPOINT=1 make failpoint-enable build failpoint-disable
571+
artifacts:
572+
- name: "pd-{{ .Release.version }}-{{ .Release.os }}-{{ .Release.arch }}.tar.gz"
573+
if: {{ ne "enterprise" .Release.profile }}
574+
files:
575+
- name: pd-server
576+
src:
577+
path: bin/pd-server
578+
tiup: # will publish to tiup.
579+
description: >-
580+
PD is the abbreviation for Placement Driver.
581+
It is used to manage and schedule the TiKV cluster.
582+
entrypoint: pd-server
583+
- name: "pd-recover-{{ .Release.version }}-{{ .Release.os }}-{{ .Release.arch }}.tar.gz"
584+
if: {{ ne "enterprise" .Release.profile }}
585+
files:
586+
- name: pd-recover
587+
src:
588+
path: bin/pd-recover
589+
tiup:
590+
description: >-
591+
PD Recover is a disaster recovery tool of PD, used to recover
592+
the PD cluster which cannot start or provide services normally.
593+
entrypoint: pd-recover
594+
- name: "pd-ctl-{{ .Release.version }}-{{ .Release.os }}-{{ .Release.arch }}.tar.gz"
595+
if: {{ ne "enterprise" .Release.profile }}
596+
files:
597+
- name: pd-ctl
598+
src:
599+
path: bin/pd-ctl
600+
- name: "pd-{{ .Release.version }}-{{ .Release.os }}-{{ .Release.arch }}.tar.gz"
601+
if: {{ eq "enterprise" .Release.profile }}
602+
files:
603+
- { name: pd-server, src: { path: bin/pd-server } }
604+
- { name: pd-recover, src: { path: bin/pd-recover } }
605+
- { name: pd-ctl, src: { path: bin/pd-ctl } }
606+
- { name: pd-heartbeat-bench, src: { path: bin/pd-heartbeat-bench } }
607+
- { name: pd-tso-bench, src: { path: bin/pd-tso-bench } }
608+
- { name: regions-dump, src: { path: bin/regions-dump } }
609+
- { name: stores-dump, src: { path: bin/stores-dump } }
610+
- { if: {{ semver.CheckConstraint ">= 7.4.0-0" .Release.version }}, name: pd-api-bench, src: { path: bin/pd-api-bench } }
611+
- name: container image
612+
type: image
613+
artifactory:
614+
repo: "{{ .Release.registry }}/tikv/pd/image"
615+
dockerfile: https://github.com/PingCAP-QE/artifacts/raw/main/dockerfiles/products/pd/Dockerfile
616+
files: # prepare for context
617+
- name: pd-server
618+
src:
619+
path: bin/pd-server
620+
- name: pd-recover
621+
src:
622+
path: bin/pd-recover
623+
- name: pd-ctl
624+
src:
625+
path: bin/pd-ctl
626+
627+
- description: For range [v8.4.0, v9.0.0)
628+
if: {{ semver.CheckConstraint ">= 8.4.0-0, < v9.0.0-0" .Release.version }}
559629
os: [linux, darwin]
560630
arch: [amd64, arm64]
561631
profile: [release, enterprise, failpoint]

0 commit comments

Comments
 (0)