From 5b83c55ebc4542b9ff891d5830c490fc10af4dbe Mon Sep 17 00:00:00 2001 From: purelind Date: Thu, 1 Aug 2024 10:57:07 +0800 Subject: [PATCH] feat: support specify pd&tikv branch in pr title --- .../latest/pull_integration_ddl_test.groovy | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/pipelines/pingcap/tidb/latest/pull_integration_ddl_test.groovy b/pipelines/pingcap/tidb/latest/pull_integration_ddl_test.groovy index bf4595cca2..37873d959a 100644 --- a/pipelines/pingcap/tidb/latest/pull_integration_ddl_test.groovy +++ b/pipelines/pingcap/tidb/latest/pull_integration_ddl_test.groovy @@ -72,13 +72,18 @@ pipeline { sh label: 'tidb-server', script: '[ -f bin/tidb-server ] || make' sh label: 'ddl-test', script: 'ls bin/ddltest || make ddltest' retry(3) { - sh label: 'download binary', script: """ - chmod +x ${WORKSPACE}/scripts/PingCAP-QE/tidb-test/*.sh - ${WORKSPACE}/scripts/PingCAP-QE/tidb-test/download_pingcap_artifact.sh --pd=${REFS.base_ref} --tikv=${REFS.base_ref} - mv third_bin/tikv-server bin/ - mv third_bin/pd-server bin/ - ls -alh bin/ - """ + script { + def pdBranch = component.computeBranchFromPR('pd', REFS.base_ref, REFS.pulls[0].title, 'master') + def tikvBranch = component.computeBranchFromPR('tikv', REFS.base_ref, REFS.pulls[0].title, 'master') + sh label: 'download binary', script: """ + chmod +x ${WORKSPACE}/scripts/PingCAP-QE/tidb-test/*.sh + ${WORKSPACE}/scripts/PingCAP-QE/tidb-test/download_pingcap_artifact.sh --pd=${pdBranch} --tikv=${tikvBranch} + mv third_bin/tikv-server bin/ + mv third_bin/pd-server bin/ + ls -alh bin/ + """ + } + } } }