Commit
05a780c05e27095e22a0ba6dda5126231c7f42f8
by noreplyfeat(pingcap/tidb): add go version checking in plugin testing stage (#3683)
This pull request refactors the Jenkins pipeline job configuration for
TiDB's pull request builds, improving maintainability and consistency.
The main changes are the introduction of variables for reuse in job and
script paths, renaming and restructuring of pipeline files, and the
addition of a Go version consistency check for plugins. Some redundant
or outdated steps have also been removed.
**Feature addition:**
* Added a step to check that the Go version in `tidb` matches those in
the `enterprise-plugin` modules (`audit` and `whitelist`), failing the
build if there is a mismatch. This was added to both the main and
next-gen pipelines.
[[1]](diffhunk://#diff-4343420c555a73fe280ca1996666e601c6869ed96f9d3a4d6d6e3c496fbad863R91-R107)
[[2]](diffhunk://#diff-5d07f8a0316f7735c0722f8e9c4a63832c0fdef8f6ce42ee56dac322b85304c1R92-R108)
**Refactoring and maintainability improvements:**
* Introduced variables (`fullRepo`, `branchAlias`, `jobName`) in
`ghpr_build.groovy` to standardize job naming and script paths, and
updated references to use these variables.
[[1]](diffhunk://#diff-8b91fa6ef5b8778a0dd3af58b4d2fd64da9db9cd5f1de173766cc5c9b0adfb85L2-R6)
[[2]](diffhunk://#diff-8b91fa6ef5b8778a0dd3af58b4d2fd64da9db9cd5f1de173766cc5c9b0adfb85L15-R24)
* Renamed and reorganized the pipeline script from
`pipelines/pingcap/tidb/latest/ghpr_build.groovy` to
`pipelines/pingcap/tidb/latest/ghpr_build/pipeline.groovy`, and updated
references to the new path.
**Pipeline logic changes:**
* Updated the path for the pod template YAML file to use variables,
ensuring consistency with the new directory structure.
* Changed the working directory in the "Build tidb-server enterprise
edition" stage to use `REFS.repo` for consistency.
**Cleanup:**
* Removed artifact upload and result reporting steps from the
post-actions of the pipeline, possibly to be handled elsewhere or
because they are obsolete.
[[1]](diffhunk://#diff-4343420c555a73fe280ca1996666e601c6869ed96f9d3a4d6d6e3c496fbad863L57-L88)
[[2]](diffhunk://#diff-4343420c555a73fe280ca1996666e601c6869ed96f9d3a4d6d6e3c496fbad863L137-L145)
---------
Signed-off-by: wuhuizuo <wuhuizuo@126.com>
(commit: 05a780c)