Repository: PingCAP-QE/ci
Pull request #3407: refactor(pd): split 7.5 and 8.5 lts jobs
Author: login: purelind
Labels: name: approved
name: lgtm
name: size/XXL
name: area/jobs/jenkins-DSL
name: area/jenkins-pipelines
name: area/jobs/prow
Created: 2025-03-08T04:19:05Z | Merged: 2025-03-08T05:52:29Z

To facilitate better maintenance and updates in the future, separate pipelines will be used for the two LTS branches.


Diff:
diff --git a/jobs/tikv/pd/release-7.5/aa_folder.groovy b/jobs/tikv/pd/release-7.5/aa_folder.groovy
new file mode 100644
index 0000000000..703703db78
--- /dev/null
+++ b/jobs/tikv/pd/release-7.5/aa_folder.groovy
@@ -0,0 +1,3 @@
+folder('tikv/pd/release-7.5') {
+    description("Folder for pipelines of tikv/pd repo for v7.5")
+}
diff --git a/jobs/tikv/pd/release-7.5/ghpr_build.groovy b/jobs/tikv/pd/release-7.5/ghpr_build.groovy
new file mode 100644
index 0000000000..fb4496657c
--- /dev/null
+++ b/jobs/tikv/pd/release-7.5/ghpr_build.groovy
@@ -0,0 +1,39 @@
+// REF: https://<your-jenkins-server>/plugin/job-dsl/api-viewer/index.html
+// For release branches.
+pipelineJob('tikv/pd/release-7.5/ghpr_build') {
+    logRotator {
+        daysToKeep(30)
+    }
+    parameters {
+        // Ref: https://docs.prow.k8s.io/docs/jobs/#job-environment-variables
+        stringParam("BUILD_ID")
+        stringParam("PROW_JOB_ID")
+        stringParam("JOB_SPEC", "", "Prow job spec struct data")
+    }
+    properties {
+        // priority(0) // 0 fast than 1
+        githubProjectUrl("https://github.com/tikv/pd")
+    }
+ 
+    definition {
+        cpsScm {
+            lightweight(true)
+            scriptPath("pipelines/tikv/pd/release-7.5/ghpr_build.groovy")
+            scm {
+                git{
+                    remote {
+                        url('https://github.com/PingCAP-QE/ci.git')
+                    }
+                    branch('main')
+                    extensions {
+                        cloneOptions {
+                            depth(1)
+                            shallow(true)
+                            timeout(5)
+                        } 
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/jobs/tikv/pd/release-7.5/pull_integration_copr_test.groovy b/jobs/tikv/pd/release-7.5/pull_integration_copr_test.groovy
new file mode 100644
index 0000000000..f55dee3056
--- /dev/null
+++ b/jobs/tikv/pd/release-7.5/pull_integration_copr_test.groovy
@@ -0,0 +1,39 @@
+// REF: https://<your-jenkins-server>/plugin/job-dsl/api-viewer/index.html
+// For release branches.
+pipelineJob('tikv/pd/release-7.5/pull_integration_copr_test') {
+    logRotator {
+        daysToKeep(30)
+    }
+    parameters {
+        // Ref: https://docs.prow.k8s.io/docs/jobs/#job-environment-variables
+        stringParam("BUILD_ID")
+        stringParam("PROW_JOB_ID")
+        stringParam("JOB_SPEC", "", "Prow job spec struct data")
+    }
+    properties {
+        buildFailureAnalyzer(false) // disable failure analyze
+        githubProjectUrl("https://github.com/tikv/pd")
+    }
+ 
+    definition {
+        cpsScm {
+            lightweight(true)
+            scriptPath("pipelines/tikv/pd/release-7.5/pull_integration_copr_test.groovy")
+            scm {
+                git{
+                    remote {
+                        url('https://github.com/PingCAP-QE/ci.git')
+                    }
+                    branch('main')
+                    extensions {
+                        cloneOptions {
+                            depth(1)
+                            shallow(true)
+                            timeout(5)
+                        } 
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/jobs/tikv/pd/release-8.5/aa_folder.groovy b/jobs/tikv/pd/release-8.5/aa_folder.groovy
new file mode 100644
index 0000000000..bb9c4f1891
--- /dev/null
+++ b/jobs/tikv/pd/release-8.5/aa_folder.groovy
@@ -0,0 +1,3 @@
+folder('tikv/pd/release-8.5') {
+    description("Folder for pipelines of tikv/pd repo for v8.5")
+}
diff --git a/jobs/tikv/pd/release-8.5/ghpr_build.groovy b/jobs/tikv/pd/release-8.5/ghpr_build.groovy
new file mode 100644
index 0000000000..05eaf82877
--- /dev/null
+++ b/jobs/tikv/pd/release-8.5/ghpr_build.groovy
@@ -0,0 +1,39 @@
+// REF: https://<your-jenkins-server>/plugin/job-dsl/api-viewer/index.html
+// For release branches.
+pipelineJob('tikv/pd/release-8.5/ghpr_build') {
+    logRotator {
+        daysToKeep(30)
+    }
+    parameters {
+        // Ref: https://docs.prow.k8s.io/docs/jobs/#job-environment-variables
+        stringParam("BUILD_ID")
+        stringParam("PROW_JOB_ID")
+        stringParam("JOB_SPEC", "", "Prow job spec struct data")
+    }
+    properties {
+        // priority(0) // 0 fast than 1
+        githubProjectUrl("https://github.com/tikv/pd")
+    }
+ 
+    definition {
+        cpsScm {
+            lightweight(true)
+            scriptPath("pipelines/tikv/pd/release-8.5/ghpr_build.groovy")
+            scm {
+                git{
+                    remote {
+                        url('https://github.com/PingCAP-QE/ci.git')
+                    }
+                    branch('main')
+                    extensions {
+                        cloneOptions {
+                            depth(1)
+                            shallow(true)
+                            timeout(5)
+                        } 
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/jobs/tikv/pd/release-8.5/pull_integration_copr_test.groovy b/jobs/tikv/pd/release-8.5/pull_integration_copr_test.groovy
new file mode 100644
index 0000000000..65708c76c9
--- /dev/null
+++ b/jobs/tikv/pd/release-8.5/pull_integration_copr_test.groovy
@@ -0,0 +1,39 @@
+// REF: https://<your-jenkins-server>/plugin/job-dsl/api-viewer/index.html
+// For release branches.
+pipelineJob('tikv/pd/release-8.5/pull_integration_copr_test') {
+    logRotator {
+        daysToKeep(30)
+    }
+    parameters {
+        // Ref: https://docs.prow.k8s.io/docs/jobs/#job-environment-variables
+        stringParam("BUILD_ID")
+        stringParam("PROW_JOB_ID")
+        stringParam("JOB_SPEC", "", "Prow job spec struct data")
+    }
+    properties {
+        buildFailureAnalyzer(false) // disable failure analyze
+        githubProjectUrl("https://github.com/tikv/pd")
+    }
+ 
+    definition {
+        cpsScm {
+            lightweight(true)
+            scriptPath("pipelines/tikv/pd/release-8.5/pull_integration_copr_test.groovy")
+            scm {
+                git{
+                    remote {
+                        url('https://github.com/PingCAP-QE/ci.git')
+                    }
+                    branch('main')
+                    extensions {
+                        cloneOptions {
+                            depth(1)
+                            shallow(true)
+                            timeout(5)
+                        } 
+                    }
+                }
+            }
+        }
+    }
+}
diff --git a/pipelines/tikv/pd/release-7.5/ghpr_build.groovy b/pipelines/tikv/pd/release-7.5/ghpr_build.groovy
new file mode 100644
index 0000000000..605786dfa6
--- /dev/null
+++ b/pipelines/tikv/pd/release-7.5/ghpr_build.groovy
@@ -0,0 +1,91 @@
+// REF: https://www.jenkins.io/doc/book/pipeline/syntax/#declarative-pipeline
+// Keep small than 400 lines: https://issues.jenkins.io/browse/JENKINS-37984
+@Library('tipipeline') _
+
+final K8S_NAMESPACE = "jenkins-pd"
+final GIT_CREDENTIALS_ID = 'github-sre-bot-ssh'
+final GIT_FULL_REPO_NAME = 'tikv/pd'
+final POD_TEMPLATE_FILE = 'pipelines/tikv/pd/release-7.5/pod-ghpr_build.yaml'
+final REFS = readJSON(text: params.JOB_SPEC).refs
+
+pipeline {
+    agent {
+        kubernetes {
+            namespace K8S_NAMESPACE
+            yamlFile POD_TEMPLATE_FILE
+            defaultContainer 'golang'
+        }
+    }
+    environment {
+        FILE_SERVER_URL = 'http://fileserver.pingcap.net'
+    }
+    options {
+        timeout(time: 15, unit: 'MINUTES')
+        parallelsAlwaysFailFast()
+        skipDefaultCheckout()
+    }
+    stages {
+        stage('Debug info') {
+            steps {
+                sh label: 'Debug info', script: """
+                    printenv
+                    echo "-------------------------"
+                    go env
+                    echo "-------------------------"
+                    echo "debug command: kubectl -n ${K8S_NAMESPACE} exec -ti ${NODE_NAME} bash"
+                """
+                container(name: 'net-tool') {
+                    sh 'dig github.com'
+                    script {
+                        prow.setPRDescription(REFS)
+                    }
+                }
+            }
+        }
+        stage('Checkout') {
+            options { timeout(time: 5, unit: 'MINUTES') }
+            steps {
+                dir("pd") {
+                    cache(path: "./", includes: '**/*', key: prow.getCacheKey('git', REFS), restoreKeys: prow.getRestoreKeys('git', REFS)) {
+                        retry(2) {
+                            script {
+                                prow.checkoutRefs(REFS)
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        stage('Build') {             
+            steps {
+                dir('pd') {
+                    sh '''
+                        WITH_RACE=1 make && mv bin/pd-server bin/pd-server-race
+                        make
+                    '''
+                }
+            }
+        }
+        stage("Upload") {
+            options {
+                timeout(time: 5, unit: 'MINUTES')
+            }
+            steps {
+                dir('pd') {
+                    sh label: "create pd-server tarball", script: """
+                        rm -rf .git
+                        tar czvf pd-server.tar.gz bin
+                        echo "pr/${REFS.pulls[0].sha}" > sha1
+                        """
+                    // FIXME(wuhuizuo): filepath is wrong, should renew to tikv/pd
+                    sh label: 'upload to pd dir', script: """
+                        filepath="builds/pingcap/pd/pr/${REFS.pulls[0].sha}/centos7/pd-server.tar.gz"
+                        refspath="refs/pingcap/pd/pr/${REFS.pulls[0].number}/sha1"
+                        curl -F \${filepath}=@pd-server.tar.gz \${FILE_SERVER_URL}/upload
+                        curl -F \${refspath}=@sha1 \${FILE_SERVER_URL}/upload
+                        """
+                }
+            }
+        }
+    }
+}
diff --git a/pipelines/tikv/pd/release-7.5/pod-ghpr_build.yaml b/pipelines/tikv/pd/release-7.5/pod-ghpr_build.yaml
new file mode 100644
index 0000000000..b7495dffde
--- /dev/null
+++ b/pipelines/tikv/pd/release-7.5/pod-ghpr_build.yaml
@@ -0,0 +1,32 @@
+apiVersion: v1
+kind: Pod
+spec:
+  securityContext:
+    fsGroup: 1000
+  containers:
+    - name: golang
+      image: "hub.pingcap.net/jenkins/centos7_golang-1.21:latest"
+      tty: true
+      resources:
+        requests:
+          memory: 8Gi
+          cpu: "4"
+        limits:
+          memory: 8Gi
+          cpu: "4"
+    - name: net-tool
+      image: hub.pingcap.net/jenkins/network-multitool
+      tty: true
+      resources:
+        limits:
+          memory: 128Mi
+          cpu: 100m
+  affinity:
+    nodeAffinity:
+      requiredDuringSchedulingIgnoredDuringExecution:
+        nodeSelectorTerms:
+          - matchExpressions:
+              - key: kubernetes.io/arch
+                operator: In
+                values:
+                  - amd64
diff --git a/pipelines/tikv/pd/release-7.5/pod-pull_integration_copr_test.yaml b/pipelines/tikv/pd/release-7.5/pod-pull_integration_copr_test.yaml
new file mode 100644
index 0000000000..cf1193f943
--- /dev/null
+++ b/pipelines/tikv/pd/release-7.5/pod-pull_integration_copr_test.yaml
@@ -0,0 +1,32 @@
+apiVersion: v1
+kind: Pod
+spec:
+  securityContext:
+    fsGroup: 1000
+  containers:
+    - name: golang
+      image: "hub.pingcap.net/jenkins/centos7_golang-1.21:latest"
+      tty: true
+      resources:
+        requests:
+          memory: 12Gi
+          cpu: "4"
+        limits:
+          memory: 16Gi
+          cpu: "6"
+    - name: net-tool
+      image: hub.pingcap.net/jenkins/network-multitool
+      tty: true
+      resources:
+        limits:
+          memory: 128Mi
+          cpu: 100m
+  affinity:
+    nodeAffinity:
+      requiredDuringSchedulingIgnoredDuringExecution:
+        nodeSelectorTerms:
+          - matchExpressions:
+              - key: kubernetes.io/arch
+                operator: In
+                values:
+                  - amd64
diff --git a/pipelines/tikv/pd/release-7.5/pull_integration_copr_test.groovy b/pipelines/tikv/pd/release-7.5/pull_integration_copr_test.groovy
new file mode 100644
index 0000000000..ef7c60ca55
--- /dev/null
+++ b/pipelines/tikv/pd/release-7.5/pull_integration_copr_test.groovy
@@ -0,0 +1,108 @@
+// REF: https://www.jenkins.io/doc/book/pipeline/syntax/#declarative-pipeline
+// Keep small than 400 lines: https://issues.jenkins.io/browse/JENKINS-37984
+@Library('tipipeline') _
+
+final K8S_NAMESPACE = "jenkins-pd"
+final GIT_CREDENTIALS_ID = 'github-sre-bot-ssh'
+final GIT_FULL_REPO_NAME = 'tikv/pd'
+final POD_TEMPLATE_FILE = 'pipelines/tikv/pd/release-7.5/pod-pull_integration_copr_test.yaml'
+final REFS = readJSON(text: params.JOB_SPEC).refs
+
+pipeline {
+    agent {
+        kubernetes {
+            namespace K8S_NAMESPACE
+            yamlFile POD_TEMPLATE_FILE
+            defaultContainer 'golang'
+        }
+    }
+    environment {
+        FILE_SERVER_URL = 'http://fileserver.pingcap.net'
+    }
+    options {
+        timeout(time: 40, unit: 'MINUTES')
+        parallelsAlwaysFailFast()
+    }
+    stages {
+        stage('Debug info') {
+            steps {
+                sh label: 'Debug info', script: """
+                    printenv
+                    echo "-------------------------"
+                    go env
+                    echo "-------------------------"
+                    echo "debug command: kubectl -n ${K8S_NAMESPACE} exec -ti ${NODE_NAME} bash"
+                """
+                container(name: 'net-tool') {
+                    sh 'dig github.com'
+                    script {
+                        prow.setPRDescription(REFS)
+                    }
+                }
+            }
+        }
+        stage('Checkout') {
+            options { timeout(time: 10, unit: 'MINUTES') }
+            steps {
+                dir("pd") {
+                    cache(path: "./", includes: '**/*', key: prow.getCacheKey('git', REFS), restoreKeys: prow.getRestoreKeys('git', REFS)) {
+                        retry(2) {
+                            script {
+                                prow.checkoutRefs(REFS)
+                            }
+                        }
+                    }
+                }
+                dir("tidb") {
+                    cache(path: "./", includes: '**/*', key: "git/pingcap/tidb/rev-${REFS.base_sha}", restoreKeys: ['git/pingcap/tidb/rev-']) {
+                        retry(2) {
+                            script {
+                                component.checkout('https://github.com/pingcap/tidb.git', 'tidb', REFS.base_ref, REFS.pulls[0].title, '')
+                            }
+                        }
+                    }
+                }
+                dir("tikv-copr-test") {
+                    cache(path: "./", includes: '**/*', key: "git/tikv/copr-test/rev-${REFS.base_sha}", restoreKeys: ['git/tikv/copr-test/rev-']) {
+                        retry(2) {
+                            script {
+                                component.checkout('https://github.com/tikv/copr-test.git', 'tikv-copr-test', REFS.base_ref, REFS.pulls[0].title, '')
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        stage('Prepare') {
+            steps {
+                dir('pd') {
+                    container("golang") {
+                        sh label: 'pd-server', script: '[ -f bin/pd-server ] || make'
+                        script {
+                            component.fetchAndExtractArtifact(FILE_SERVER_URL, 'tikv', REFS.base_ref, REFS.pulls[0].title, 'centos7/tikv-server.tar.gz', 'bin', trunkBranch="master", artifactVerify=true)
+                        }
+                        sh label: 'print component versions', script: '''
+                            bin/pd-server -V
+                            bin/tikv-server -V
+                        '''
+                    }
+                }
+            }
+        }
+        stage('Tests') {
+            options { timeout(time: 20, unit: 'MINUTES') }
+            steps {
+                //  TODO: open pull request to support tidb-server bin path in copr-test
+                //   https://github.com/tikv/copr-test/tree/master
+                dir('tikv-copr-test') {
+                    sh label: "Push Down Test", script: """
+                        pd_bin=${WORKSPACE}/pd/bin/pd-server \
+                        tikv_bin=${WORKSPACE}/pd/bin/tikv-server \
+                        tidb_src_dir=${WORKSPACE}/tidb \
+                        make push-down-test
+                    """
+                }
+            }
+        }
+    }
+}
diff --git a/pipelines/tikv/pd/release-8.5/ghpr_build.groovy b/pipelines/tikv/pd/release-8.5/ghpr_build.groovy
new file mode 100644
index 0000000000..5af7f679f0
--- /dev/null
+++ b/pipelines/tikv/pd/release-8.5/ghpr_build.groovy
@@ -0,0 +1,91 @@
+// REF: https://www.jenkins.io/doc/book/pipeline/syntax/#declarative-pipeline
+// Keep small than 400 lines: https://issues.jenkins.io/browse/JENKINS-37984
+@Library('tipipeline') _
+
+final K8S_NAMESPACE = "jenkins-pd"
+final GIT_CREDENTIALS_ID = 'github-sre-bot-ssh'
+final GIT_FULL_REPO_NAME = 'tikv/pd'
+final POD_TEMPLATE_FILE = 'pipelines/tikv/pd/release-8.5/pod-ghpr_build.yaml'
+final REFS = readJSON(text: params.JOB_SPEC).refs
+
+pipeline {
+    agent {
+        kubernetes {
+            namespace K8S_NAMESPACE
+            yamlFile POD_TEMPLATE_FILE
+            defaultContainer 'golang'
+        }
+    }
+    environment {
+        FILE_SERVER_URL = 'http://fileserver.pingcap.net'
+    }
+    options {
+        timeout(time: 15, unit: 'MINUTES')
+        parallelsAlwaysFailFast()
+        skipDefaultCheckout()
+    }
+    stages {
+        stage('Debug info') {
+            steps {
+                sh label: 'Debug info', script: """
+                    printenv
+                    echo "-------------------------"
+                    go env
+                    echo "-------------------------"
+                    echo "debug command: kubectl -n ${K8S_NAMESPACE} exec -ti ${NODE_NAME} bash"
+                """
+                container(name: 'net-tool') {
+                    sh 'dig github.com'
+                    script {
+                        prow.setPRDescription(REFS)
+                    }
+                }
+            }
+        }
+        stage('Checkout') {
+            options { timeout(time: 5, unit: 'MINUTES') }
+            steps {
+                dir("pd") {
+                    cache(path: "./", includes: '**/*', key: prow.getCacheKey('git', REFS), restoreKeys: prow.getRestoreKeys('git', REFS)) {
+                        retry(2) {
+                            script {
+                                prow.checkoutRefs(REFS)
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        stage('Build') {             
+            steps {
+                dir('pd') {
+                    sh '''
+                        WITH_RACE=1 make && mv bin/pd-server bin/pd-server-race
+                        make
+                    '''
+                }
+            }
+        }
+        stage("Upload") {
+            options {
+                timeout(time: 5, unit: 'MINUTES')
+            }
+            steps {
+                dir('pd') {
+                    sh label: "create pd-server tarball", script: """
+                        rm -rf .git
+                        tar czvf pd-server.tar.gz bin
+                        echo "pr/${REFS.pulls[0].sha}" > sha1
+                        """
+                    // FIXME(wuhuizuo): filepath is wrong, should renew to tikv/pd
+                    sh label: 'upload to pd dir', script: """
+                        filepath="builds/pingcap/pd/pr/${REFS.pulls[0].sha}/centos7/pd-server.tar.gz"
+                        refspath="refs/pingcap/pd/pr/${REFS.pulls[0].number}/sha1"
+                        curl -F \${filepath}=@pd-server.tar.gz \${FILE_SERVER_URL}/upload
+                        curl -F \${refspath}=@sha1 \${FILE_SERVER_URL}/upload
+                        """
+                }
+            }
+        }
+    }
+}
diff --git a/pipelines/tikv/pd/release-8.5/pod-ghpr_build.yaml b/pipelines/tikv/pd/release-8.5/pod-ghpr_build.yaml
new file mode 100644
index 0000000000..d4eeff6efd
--- /dev/null
+++ b/pipelines/tikv/pd/release-8.5/pod-ghpr_build.yaml
@@ -0,0 +1,32 @@
+apiVersion: v1
+kind: Pod
+spec:
+  securityContext:
+    fsGroup: 1000
+  containers:
+    - name: golang
+      image: "hub.pingcap.net/jenkins/centos7_golang-1.23:latest"
+      tty: true
+      resources:
+        requests:
+          memory: 8Gi
+          cpu: "4"
+        limits:
+          memory: 8Gi
+          cpu: "4"
+    - name: net-tool
+      image: hub.pingcap.net/jenkins/network-multitool
+      tty: true
+      resources:
+        limits:
+          memory: 128Mi
+          cpu: 100m
+  affinity:
+    nodeAffinity:
+      requiredDuringSchedulingIgnoredDuringExecution:
+        nodeSelectorTerms:
+          - matchExpressions:
+              - key: kubernetes.io/arch
+                operator: In
+                values:
+                  - amd64
diff --git a/pipelines/tikv/pd/release-8.5/pod-pull_integration_copr_test.yaml b/pipelines/tikv/pd/release-8.5/pod-pull_integration_copr_test.yaml
new file mode 100644
index 0000000000..8b8d761e33
--- /dev/null
+++ b/pipelines/tikv/pd/release-8.5/pod-pull_integration_copr_test.yaml
@@ -0,0 +1,32 @@
+apiVersion: v1
+kind: Pod
+spec:
+  securityContext:
+    fsGroup: 1000
+  containers:
+    - name: golang
+      image: "hub.pingcap.net/jenkins/centos7_golang-1.23:latest"
+      tty: true
+      resources:
+        requests:
+          memory: 12Gi
+          cpu: "4"
+        limits:
+          memory: 16Gi
+          cpu: "6"
+    - name: net-tool
+      image: hub.pingcap.net/jenkins/network-multitool
+      tty: true
+      resources:
+        limits:
+          memory: 128Mi
+          cpu: 100m
+  affinity:
+    nodeAffinity:
+      requiredDuringSchedulingIgnoredDuringExecution:
+        nodeSelectorTerms:
+          - matchExpressions:
+              - key: kubernetes.io/arch
+                operator: In
+                values:
+                  - amd64
diff --git a/pipelines/tikv/pd/release-8.5/pull_integration_copr_test.groovy b/pipelines/tikv/pd/release-8.5/pull_integration_copr_test.groovy
new file mode 100644
index 0000000000..d31cf90f48
--- /dev/null
+++ b/pipelines/tikv/pd/release-8.5/pull_integration_copr_test.groovy
@@ -0,0 +1,108 @@
+// REF: https://www.jenkins.io/doc/book/pipeline/syntax/#declarative-pipeline
+// Keep small than 400 lines: https://issues.jenkins.io/browse/JENKINS-37984
+@Library('tipipeline') _
+
+final K8S_NAMESPACE = "jenkins-pd"
+final GIT_CREDENTIALS_ID = 'github-sre-bot-ssh'
+final GIT_FULL_REPO_NAME = 'tikv/pd'
+final POD_TEMPLATE_FILE = 'pipelines/tikv/pd/release-8.5/pod-pull_integration_copr_test.yaml'
+final REFS = readJSON(text: params.JOB_SPEC).refs
+
+pipeline {
+    agent {
+        kubernetes {
+            namespace K8S_NAMESPACE
+            yamlFile POD_TEMPLATE_FILE
+            defaultContainer 'golang'
+        }
+    }
+    environment {
+        FILE_SERVER_URL = 'http://fileserver.pingcap.net'
+    }
+    options {
+        timeout(time: 40, unit: 'MINUTES')
+        parallelsAlwaysFailFast()
+    }
+    stages {
+        stage('Debug info') {
+            steps {
+                sh label: 'Debug info', script: """
+                    printenv
+                    echo "-------------------------"
+                    go env
+                    echo "-------------------------"
+                    echo "debug command: kubectl -n ${K8S_NAMESPACE} exec -ti ${NODE_NAME} bash"
+                """
+                container(name: 'net-tool') {
+                    sh 'dig github.com'
+                    script {
+                        prow.setPRDescription(REFS)
+                    }
+                }
+            }
+        }
+        stage('Checkout') {
+            options { timeout(time: 10, unit: 'MINUTES') }
+            steps {
+                dir("pd") {
+                    cache(path: "./", includes: '**/*', key: prow.getCacheKey('git', REFS), restoreKeys: prow.getRestoreKeys('git', REFS)) {
+                        retry(2) {
+                            script {
+                                prow.checkoutRefs(REFS)
+                            }
+                        }
+                    }
+                }
+                dir("tidb") {
+                    cache(path: "./", includes: '**/*', key: "git/pingcap/tidb/rev-${REFS.base_sha}", restoreKeys: ['git/pingcap/tidb/rev-']) {
+                        retry(2) {
+                            script {
+                                component.checkout('https://github.com/pingcap/tidb.git', 'tidb', REFS.base_ref, REFS.pulls[0].title, '')
+                            }
+                        }
+                    }
+                }
+                dir("tikv-copr-test") {
+                    cache(path: "./", includes: '**/*', key: "git/tikv/copr-test/rev-${REFS.base_sha}", restoreKeys: ['git/tikv/copr-test/rev-']) {
+                        retry(2) {
+                            script {
+                                component.checkout('https://github.com/tikv/copr-test.git', 'tikv-copr-test', REFS.base_ref, REFS.pulls[0].title, '')
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        stage('Prepare') {
+            steps {
+                dir('pd') {
+                    container("golang") {
+                        sh label: 'pd-server', script: '[ -f bin/pd-server ] || make'
+                        script {
+                            component.fetchAndExtractArtifact(FILE_SERVER_URL, 'tikv', REFS.base_ref, REFS.pulls[0].title, 'centos7/tikv-server.tar.gz', 'bin', trunkBranch="master", artifactVerify=true)
+                        }
+                        sh label: 'print component versions', script: '''
+                            bin/pd-server -V
+                            bin/tikv-server -V
+                        '''
+                    }
+                }
+            }
+        }
+        stage('Tests') {
+            options { timeout(time: 20, unit: 'MINUTES') }
+            steps {
+                //  TODO: open pull request to support tidb-server bin path in copr-test
+                //   https://github.com/tikv/copr-test/tree/master
+                dir('tikv-copr-test') {
+                    sh label: "Push Down Test", script: """
+                        pd_bin=${WORKSPACE}/pd/bin/pd-server \
+                        tikv_bin=${WORKSPACE}/pd/bin/tikv-server \
+                        tidb_src_dir=${WORKSPACE}/tidb \
+                        make push-down-test
+                    """
+                }
+            }
+        }
+    }
+}
diff --git a/prow-jobs/kustomization.yaml b/prow-jobs/kustomization.yaml
index 525488dd7c..4b934459c4 100644
--- a/prow-jobs/kustomization.yaml
+++ b/prow-jobs/kustomization.yaml
@@ -111,7 +111,9 @@ configMapGenerator:
       - tikv_pd_release-6.5-fips-presubmits.yaml=tikv/pd/release-6.5-fips-presubmits.yaml
       - tikv_pd_release-6.5-presubmits.yaml=tikv/pd/release-6.5-presubmits.yaml
       - tikv_pd_release-7.1-presubmits.yaml=tikv/pd/release-7.1-presubmits.yaml
+      - tikv_pd_release-7.5-presubmits.yaml=tikv/pd/release-7.5-presubmits.yaml
       - tikv_pd_release-8.1-presubmits.yaml=tikv/pd/release-8.1-presubmits.yaml
+      - tikv_pd_release-8.5-presubmits.yaml=tikv/pd/release-8.5-presubmits.yaml
       - tikv_raft-engine_presubmits.yaml=tikv/raft-engine/presubmits.yaml
       - tikv_tikv_latest-presubmits.yaml=tikv/tikv/latest-presubmits.yaml
       - tikv_tikv_release-6.1-presubmits.yaml=tikv/tikv/release-6.1-presubmits.yaml
diff --git a/prow-jobs/tikv/pd/latest-presubmits.yaml b/prow-jobs/tikv/pd/latest-presubmits.yaml
index 89be0460d6..d0b08eca17 100644
--- a/prow-jobs/tikv/pd/latest-presubmits.yaml
+++ b/prow-jobs/tikv/pd/latest-presubmits.yaml
@@ -15,7 +15,6 @@ presubmits:
       branches:
         - ^master$
         - ^feature/.+
-        - ^release-8\.[4-9](\.\d+)?(-\d+)?(-v[\.\d]+)?$
         - ^release-6\.5-20241101-v6\.5\.7$ # trigger for specific hotfix branch
       skip_branches: *skip_branches
 
@@ -42,7 +41,6 @@ presubmits:
       branches:
         - ^master$
         - ^feature/.+
-        - ^release-8\.[4-9](\.\d+)?(-\d+)?(-v[\.\d]+)?$
       skip_branches: *skip_branches
 
     - name: tikv/pd/pull_integration_realcluster_test
diff --git a/prow-jobs/tikv/pd/release-6.5-presubmits.yaml b/prow-jobs/tikv/pd/release-6.5-presubmits.yaml
index bb02f82267..d54f8a0149 100644
--- a/prow-jobs/tikv/pd/release-6.5-presubmits.yaml
+++ b/prow-jobs/tikv/pd/release-6.5-presubmits.yaml
@@ -1,4 +1,9 @@
 # struct ref: https://pkg.go.dev/sigs.k8s.io/prow/pkg/config#Presubmit
+global_definitions:
+  branches: &branches
+    - ^release-6\.5(\.\d+)?(-\d+)?(-v[\.\d]+)?(-\d+)?$
+    - ^feature/release-6.5(.\d+)?-.+$
+
 presubmits:
   tikv/pd:
     - name: tikv/pd/release-6.5/ghpr_build
@@ -8,7 +13,6 @@ presubmits:
       context: idc-jenkins-ci/build
       trigger: "(?m)^/test (?:.*? )?build(?: .*?)?$"
       rerun_command: "/test build"
-      branches:
-        - ^release-6\.[5-9](\.\d+)?(-\d+)?(-v[\.\d]+)?$
+      branches: *branches
       skip_branches:
         - ^release-6\.5-20241101-v6\.5\.7$ # exclude release-6.5-20241101-v6.5.7 hotfix branch
diff --git a/prow-jobs/tikv/pd/release-7.1-presubmits.yaml b/prow-jobs/tikv/pd/release-7.1-presubmits.yaml
index 7014e28997..d82b5e9bea 100644
--- a/prow-jobs/tikv/pd/release-7.1-presubmits.yaml
+++ b/prow-jobs/tikv/pd/release-7.1-presubmits.yaml
@@ -1,4 +1,10 @@
 # struct ref: https://pkg.go.dev/sigs.k8s.io/prow/pkg/config#Presubmit
+global_definitions:
+  branches: &branches
+    - ^release-7\.1(\.\d+)?(-\d+)?(-v[\.\d]+)?(-\d+)?$
+    # for feature branch based on release versions
+    - ^feature/release-7.1(.\d+)?-.+$
+
 presubmits:
   tikv/pd:
     - name: tikv/pd/release-7.1/ghpr_build
@@ -8,8 +14,8 @@ presubmits:
       context: idc-jenkins-ci/build
       trigger: "(?m)^/test (?:.*? )?build(?: .*?)?$"
       rerun_command: "/test build"
-      branches:
-        - ^release-7\.[0-3](\.\d+)?(-\d+)?(-v[\.\d]+)?$
+      branches: *branches
+
     - name: tikv/pd/release-7.1/pull_integration_copr_test
       agent: jenkins
       decorate: false # need add this.
@@ -17,5 +23,4 @@ presubmits:
       context: pull-integration-copr-test
       trigger: "(?m)^/test (?:.*? )?integration-copr-test(?: .*?)?$"
       rerun_command: "/test integration-copr-test"
-      branches:
-        - ^release-7\.[0-3](\.\d+)?(-\d+)?(-v[\.\d]+)?$
+      branches: *branches
diff --git a/prow-jobs/tikv/pd/release-7.5-presubmits.yaml b/prow-jobs/tikv/pd/release-7.5-presubmits.yaml
new file mode 100644
index 0000000000..0493a3a240
--- /dev/null
+++ b/prow-jobs/tikv/pd/release-7.5-presubmits.yaml
@@ -0,0 +1,26 @@
+global_definitions:
+  branches: &branches
+    - ^release-7\.5(\.\d+)?(-\d+)?(-v[\.\d]+)?(-\d+)?$
+    # for feature branch based on release versions
+    - ^feature/release-7.5(.\d+)?-.+$
+
+# struct ref: https://pkg.go.dev/sigs.k8s.io/prow/pkg/config#Presubmit
+presubmits:
+  tikv/pd:
+    - name: tikv/pd/release-7.5/ghpr_build
+      agent: jenkins
+      decorate: false # need add this.
+      always_run: true
+      context: idc-jenkins-ci/build
+      trigger: "(?m)^/test (?:.*? )?build(?: .*?)?$"
+      rerun_command: "/test build"
+      branches: *branches
+
+    - name: tikv/pd/release-7.5/pull_integration_copr_test
+      agent: jenkins
+      decorate: false # need add this.
+      always_run: false
+      context: pull-integration-copr-test
+      trigger: "(?m)^/test (?:.*? )?integration-copr-test(?: .*?)?$"
+      rerun_command: "/test integration-copr-test"
+      branches: *branches
diff --git a/prow-jobs/tikv/pd/release-8.1-presubmits.yaml b/prow-jobs/tikv/pd/release-8.1-presubmits.yaml
index d464fe1708..a813b71088 100644
--- a/prow-jobs/tikv/pd/release-8.1-presubmits.yaml
+++ b/prow-jobs/tikv/pd/release-8.1-presubmits.yaml
@@ -1,10 +1,8 @@
 global_definitions:
   branches: &branches
-    - ^release-7\.[4-9](\.\d+)?(-\d+)?(-v[\.\d]+)?$
-    - ^release-8\.[0-3](\.\d+)?(-\d+)?(-v[\.\d]+)?$
+    - ^release-8\.1(\.\d+)?(-\d+)?(-v[\.\d]+)?(-\d+)?$
     # for feature branch based on release versions
-    - ^feature/release-7.[4-9](.\d+)?-.+$
-    - ^feature/release-8.[0-3](.\d+)?-.+$
+    - ^feature/release-8.1(.\d+)?-.+$
 
 # struct ref: https://pkg.go.dev/sigs.k8s.io/prow/pkg/config#Presubmit
 presubmits:
diff --git a/prow-jobs/tikv/pd/release-8.5-presubmits.yaml b/prow-jobs/tikv/pd/release-8.5-presubmits.yaml
new file mode 100644
index 0000000000..36cb1cacde
--- /dev/null
+++ b/prow-jobs/tikv/pd/release-8.5-presubmits.yaml
@@ -0,0 +1,25 @@
+global_definitions:
+  branches: &branches
+    - ^release-8\.5(\.\d+)?(-\d+)?(-v[\.\d]+)?(-\d+)?$
+    - ^feature/release-8.5(.\d+)?-.+$
+
+# struct ref: https://pkg.go.dev/sigs.k8s.io/prow/pkg/config#Presubmit
+presubmits:
+  tikv/pd:
+    - name: tikv/pd/release-8.5/ghpr_build
+      agent: jenkins
+      decorate: false # need add this.
+      always_run: true
+      context: idc-jenkins-ci/build
+      trigger: "(?m)^/test (?:.*? )?build(?: .*?)?$"
+      rerun_command: "/test build"
+      branches: *branches
+
+    - name: tikv/pd/release-8.5/pull_integration_copr_test
+      agent: jenkins
+      decorate: false # need add this.
+      always_run: false
+      context: pull-integration-copr-test
+      trigger: "(?m)^/test (?:.*? )?integration-copr-test(?: .*?)?$"
+      rerun_command: "/test integration-copr-test"
+      branches: *branches


Reviews:
user: login: gemini-code-assist[bot]
body: Hello @purelind, I'm Gemini Code Assist[^1]! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

## Summary of Changes
This pull request refactors the Jenkins job configuration by splitting the jobs for the 7.5 and 8.5 LTS branches of the `tikv/pd` repository into separate pipelines. This change aims to improve maintainability and facilitate future updates for each LTS branch independently. The changes involve creating new folders and pipeline jobs for each LTS version, as well as updating the prow job configurations to reflect these changes.

### Highlights
* **Refactor**: Splits the Jenkins jobs for PD LTS branches (7.5 and 8.5) into separate pipelines for better maintenance.
* **New Jobs**: Creates new Jenkins folder and pipeline jobs specifically for the 7.5 and 8.5 releases.
* **Prow Configuration**: Updates Prow job configurations to align with the new pipeline structure, defining branch-specific triggers.

### Changelog
<details>
<summary>Click here to see the changelog</summary>

* **jobs/tikv/pd/release-7.5/aa_folder.groovy**
  * Creates a new Jenkins folder for the tikv/pd release-7.5 pipelines.
  * Adds a description for the folder.
* **jobs/tikv/pd/release-7.5/ghpr_build.groovy**
  * Creates a new Jenkins pipeline job for the ghpr build of tikv/pd release-7.5.
  * Configures log rotation, parameters, properties, and the pipeline definition using CPS SCM.
* **jobs/tikv/pd/release-7.5/pull_integration_copr_test.groovy**
  * Creates a new Jenkins pipeline job for the pull integration copr test of tikv/pd release-7.5.
  * Configures log rotation, parameters, properties (disabling failure analysis), and the pipeline definition using CPS SCM.
* **jobs/tikv/pd/release-8.5/aa_folder.groovy**
  * Creates a new Jenkins folder for the tikv/pd release-8.5 pipelines.
  * Adds a description for the folder.
* **jobs/tikv/pd/release-8.5/ghpr_build.groovy**
  * Creates a new Jenkins pipeline job for the ghpr build of tikv/pd release-8.5.
  * Configures log rotation, parameters, properties, and the pipeline definition using CPS SCM.
* **jobs/tikv/pd/release-8.5/pull_integration_copr_test.groovy**
  * Creates a new Jenkins pipeline job for the pull integration copr test of tikv/pd release-8.5.
  * Configures log rotation, parameters, properties (disabling failure analysis), and the pipeline definition using CPS SCM.
* **pipelines/tikv/pd/release-7.5/ghpr_build.groovy**
  * Creates a new Jenkins pipeline script for the ghpr build of tikv/pd release-7.5.
  * Defines the pipeline agent, environment, options, and stages for debug info, checkout, build, and upload.
* **pipelines/tikv/pd/release-7.5/pod-ghpr_build.yaml**
  * Creates a new pod template for the ghpr build pipeline of tikv/pd release-7.5.
  * Defines the pod's security context, containers (golang and net-tool), resources, and node affinity.
* **pipelines/tikv/pd/release-7.5/pod-pull_integration_copr_test.yaml**
  * Creates a new pod template for the pull integration copr test pipeline of tikv/pd release-7.5.
  * Defines the pod's security context, containers (golang and net-tool), resources, and node affinity.
* **pipelines/tikv/pd/release-7.5/pull_integration_copr_test.groovy**
  * Creates a new Jenkins pipeline script for the pull integration copr test of tikv/pd release-7.5.
  * Defines the pipeline agent, environment, options, and stages for debug info, checkout, prepare, and tests.
* **pipelines/tikv/pd/release-8.5/ghpr_build.groovy**
  * Creates a new Jenkins pipeline script for the ghpr build of tikv/pd release-8.5.
  * Defines the pipeline agent, environment, options, and stages for debug info, checkout, build, and upload.
* **pipelines/tikv/pd/release-8.5/pod-ghpr_build.yaml**
  * Creates a new pod template for the ghpr build pipeline of tikv/pd release-8.5.
  * Defines the pod's security context, containers (golang and net-tool), resources, and node affinity. Uses golang 1.23 image.
* **pipelines/tikv/pd/release-8.5/pod-pull_integration_copr_test.yaml**
  * Creates a new pod template for the pull integration copr test pipeline of tikv/pd release-8.5.
  * Defines the pod's security context, containers (golang and net-tool), resources, and node affinity. Uses golang 1.23 image.
* **pipelines/tikv/pd/release-8.5/pull_integration_copr_test.groovy**
  * Creates a new Jenkins pipeline script for the pull integration copr test of tikv/pd release-8.5.
  * Defines the pipeline agent, environment, options, and stages for debug info, checkout, prepare, and tests.
* **prow-jobs/tikv/pd/latest-presubmits.yaml**
  * Removes the release-8.[4-9] branch from the latest-presubmits.yaml file.
  * Removes the release-8.[4-9] branch from the pull_integration_realcluster_test job.
* **prow-jobs/tikv/pd/release-6.5-presubmits.yaml**
  * Adds global definitions for branches to be used in the presubmit jobs.
  * Adds support for feature branches based on release versions.
  * Uses the defined branches in the ghpr_build job.
* **prow-jobs/tikv/pd/release-7.1-presubmits.yaml**
  * Adds global definitions for branches to be used in the presubmit jobs.
  * Adds support for feature branches based on release versions.
  * Uses the defined branches in the ghpr_build and pull_integration_copr_test jobs.
* **prow-jobs/tikv/pd/release-7.5-presubmits.yaml**
  * Creates a new presubmit configuration file for release-7.5.
  * Defines global definitions for branches and configures ghpr_build and pull_integration_copr_test jobs.
* **prow-jobs/tikv/pd/release-8.1-presubmits.yaml**
  * Updates the branch definitions to only include release-8.1.
  * Removes the release-7.[4-9] and release-8.[0-3] branches.
* **prow-jobs/tikv/pd/release-8.5-presubmits.yaml**
  * Creates a new presubmit configuration file for release-8.5.
  * Defines global definitions for branches and configures ghpr_build and pull_integration_copr_test jobs.

</details>


<details>

<summary><b>Using Gemini Code Assist</b></summary>
<br>

The full guide for Gemini Code Assist can be found on our [documentation page](https://developers.google.com/gemini-code-assist/docs/review-github-code), here are some quick tips.

<b>Invoking Gemini</b>

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either `/gemini <command>` or `@gemini-code-assist <command>`. Below is a summary of the supported commands.

Feature | Command | Description
--- | --- | ---
Code Review | `/gemini review` | Performs a code review for the current pull request in its current state.
Pull Request Summary | `/gemini summary` | Provides a summary of the current pull request in its current state.
Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments.
Help | `/gemini help` | Displays a list of available commands.

<b>Customization</b>

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a `.gemini/` folder in the base of the repository. Detailed instructions can be found [here](https://developers.google.com/gemini-code-assist/docs/review-github-code).

<b>Limitations & Feedback</b>

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with :thumbsup: and :thumbsdown: on @gemini-code-assist comments to provide feedback.

</details>

<b>You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the [Gemini Code Assist IDE Extension](https://cloud.google.com/products/gemini/code-assist).</b>


[^1]: Review the [Privacy Notices](https://policies.google.com/privacy), [Generative AI Prohibited Use Policy](https://policies.google.com/terms/generative-ai/use-policy), [Terms of Service](https://policies.google.com/terms), and learn how to configure Gemini Code Assist in GitHub [here](https://developers.google.com/gemini-code-assist/docs/review-github-code). Gemini can make mistakes, so double check it and [use code with caution](https://support.google.com/legal/answer/13505487).

---

> In Jenkins' realm, where jobs reside,
> LTS branches, now neatly divide.
> For 7.5 and 8.5's grace,
> Separate pipelines find their place,
> Maintenance ease, a future's guide.


state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-08T04:19:19Z
user: login: gemini-code-assist[bot]
body: ## Code Review
The pull request aims to split the Jenkins jobs for PD into separate pipelines for the 7.5 and 8.5 LTS branches. This should improve maintainability and make future updates easier. The changes look good overall, but there are a few points that could be improved.

### Summary of Findings
* **Duplicated Code**: The groovy files for 7.5 and 8.5 are almost identical. Consider creating a template or shared function to reduce code duplication.
* **Inconsistent Golang Image Versions**: The golang image versions in the pod yaml files are different for 7.5 and 8.5. Ensure consistency or document the reason for the difference.
* **FIXME comment**: The FIXME comment in `pipelines/tikv/pd/release-7.5/ghpr_build.groovy` and `pipelines/tikv/pd/release-8.5/ghpr_build.groovy` should be addressed.

### Merge Readiness
The pull request is almost ready for merging. Addressing the duplicated code and the FIXME comment would improve the quality of the code. I am unable to approve the pull request, and users should have others review and approve this code before merging. I would recommend addressing the high severity issues before merging.
state: CHANGES_REQUESTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-08T04:19:32Z

Review comments:
diff_hunk: @@ -0,0 +1,91 @@
+// REF: https://www.jenkins.io/doc/book/pipeline/syntax/#declarative-pipeline
+// Keep small than 400 lines: https://issues.jenkins.io/browse/JENKINS-37984
+@Library('tipipeline') _
+
+final K8S_NAMESPACE = "jenkins-pd"
+final GIT_CREDENTIALS_ID = 'github-sre-bot-ssh'
+final GIT_FULL_REPO_NAME = 'tikv/pd'
+final POD_TEMPLATE_FILE = 'pipelines/tikv/pd/release-7.5/pod-ghpr_build.yaml'
+final REFS = readJSON(text: params.JOB_SPEC).refs
+
+pipeline {
+    agent {
+        kubernetes {
+            namespace K8S_NAMESPACE
+            yamlFile POD_TEMPLATE_FILE
+            defaultContainer 'golang'
+        }
+    }
+    environment {
+        FILE_SERVER_URL = 'http://fileserver.pingcap.net'
+    }
+    options {
+        timeout(time: 15, unit: 'MINUTES')
+        parallelsAlwaysFailFast()
+        skipDefaultCheckout()
+    }
+    stages {
+        stage('Debug info') {
+            steps {
+                sh label: 'Debug info', script: """
+                    printenv
+                    echo "-------------------------"
+                    go env
+                    echo "-------------------------"
+                    echo "debug command: kubectl -n ${K8S_NAMESPACE} exec -ti ${NODE_NAME} bash"
+                """
+                container(name: 'net-tool') {
+                    sh 'dig github.com'
+                    script {
+                        prow.setPRDescription(REFS)
+                    }
+                }
+            }
+        }
+        stage('Checkout') {
+            options { timeout(time: 5, unit: 'MINUTES') }
+            steps {
+                dir("pd") {
+                    cache(path: "./", includes: '**/*', key: prow.getCacheKey('git', REFS), restoreKeys: prow.getRestoreKeys('git', REFS)) {
+                        retry(2) {
+                            script {
+                                prow.checkoutRefs(REFS)
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        stage('Build') {             
+            steps {
+                dir('pd') {
+                    sh '''
+                        WITH_RACE=1 make && mv bin/pd-server bin/pd-server-race
+                        make
+                    '''
+                }
+            }
+        }
+        stage("Upload") {
+            options {
+                timeout(time: 5, unit: 'MINUTES')
+            }
+            steps {
+                dir('pd') {
+                    sh label: "create pd-server tarball", script: """
+                        rm -rf .git
+                        tar czvf pd-server.tar.gz bin
+                        echo "pr/${REFS.pulls[0].sha}" > sha1
+                        """
+                    // FIXME(wuhuizuo): filepath is wrong, should renew to tikv/pd
+                    sh label: 'upload to pd dir', script: """
+                        filepath="builds/pingcap/pd/pr/${REFS.pulls[0].sha}/centos7/pd-server.tar.gz"
+                        refspath="refs/pingcap/pd/pr/${REFS.pulls[0].number}/sha1"
+                        curl -F \${filepath}=@pd-server.tar.gz \${FILE_SERVER_URL}/upload
+                        curl -F \${refspath}=@sha1 \${FILE_SERVER_URL}/upload
+                        """
path: pipelines/tikv/pd/release-7.5/ghpr_build.groovy
user: login: gemini-code-assist[bot]
body: ![high](https://img.shields.io/badge/priority-high-orange)

This FIXME comment should be addressed. What is the correct filepath and how can it be renewed?
created_at: 2025-03-08T04:19:31Z
author_association: CONTRIBUTOR
diff_hunk: @@ -0,0 +1,91 @@
+// REF: https://www.jenkins.io/doc/book/pipeline/syntax/#declarative-pipeline
+// Keep small than 400 lines: https://issues.jenkins.io/browse/JENKINS-37984
+@Library('tipipeline') _
+
+final K8S_NAMESPACE = "jenkins-pd"
+final GIT_CREDENTIALS_ID = 'github-sre-bot-ssh'
+final GIT_FULL_REPO_NAME = 'tikv/pd'
+final POD_TEMPLATE_FILE = 'pipelines/tikv/pd/release-8.5/pod-ghpr_build.yaml'
+final REFS = readJSON(text: params.JOB_SPEC).refs
+
+pipeline {
+    agent {
+        kubernetes {
+            namespace K8S_NAMESPACE
+            yamlFile POD_TEMPLATE_FILE
+            defaultContainer 'golang'
+        }
+    }
+    environment {
+        FILE_SERVER_URL = 'http://fileserver.pingcap.net'
+    }
+    options {
+        timeout(time: 15, unit: 'MINUTES')
+        parallelsAlwaysFailFast()
+        skipDefaultCheckout()
+    }
+    stages {
+        stage('Debug info') {
+            steps {
+                sh label: 'Debug info', script: """
+                    printenv
+                    echo "-------------------------"
+                    go env
+                    echo "-------------------------"
+                    echo "debug command: kubectl -n ${K8S_NAMESPACE} exec -ti ${NODE_NAME} bash"
+                """
+                container(name: 'net-tool') {
+                    sh 'dig github.com'
+                    script {
+                        prow.setPRDescription(REFS)
+                    }
+                }
+            }
+        }
+        stage('Checkout') {
+            options { timeout(time: 5, unit: 'MINUTES') }
+            steps {
+                dir("pd") {
+                    cache(path: "./", includes: '**/*', key: prow.getCacheKey('git', REFS), restoreKeys: prow.getRestoreKeys('git', REFS)) {
+                        retry(2) {
+                            script {
+                                prow.checkoutRefs(REFS)
+                            }
+                        }
+                    }
+                }
+            }
+        }
+        stage('Build') {             
+            steps {
+                dir('pd') {
+                    sh '''
+                        WITH_RACE=1 make && mv bin/pd-server bin/pd-server-race
+                        make
+                    '''
+                }
+            }
+        }
+        stage("Upload") {
+            options {
+                timeout(time: 5, unit: 'MINUTES')
+            }
+            steps {
+                dir('pd') {
+                    sh label: "create pd-server tarball", script: """
+                        rm -rf .git
+                        tar czvf pd-server.tar.gz bin
+                        echo "pr/${REFS.pulls[0].sha}" > sha1
+                        """
+                    // FIXME(wuhuizuo): filepath is wrong, should renew to tikv/pd
+                    sh label: 'upload to pd dir', script: """
+                        filepath="builds/pingcap/pd/pr/${REFS.pulls[0].sha}/centos7/pd-server.tar.gz"
+                        refspath="refs/pingcap/pd/pr/${REFS.pulls[0].number}/sha1"
+                        curl -F \${filepath}=@pd-server.tar.gz \${FILE_SERVER_URL}/upload
+                        curl -F \${refspath}=@sha1 \${FILE_SERVER_URL}/upload
+                        """
path: pipelines/tikv/pd/release-8.5/ghpr_build.groovy
user: login: gemini-code-assist[bot]
body: ![high](https://img.shields.io/badge/priority-high-orange)

This FIXME comment should be addressed. What is the correct filepath and how can it be renewed?
created_at: 2025-03-08T04:19:32Z
author_association: CONTRIBUTOR

PR comments:
user: login: ti-chi-bot[bot]
created_at: 2025-03-08T04:19:33Z
body: > **I have already done a preliminary review for you, and I hope to help you do a better job.**

Summary of the changes:

1. The pull request primarily aims to refactor the CI/CD jobs for the `tikv/pd` project by splitting jobs for long term support (LTS) versions 7.5 and 8.5 into separate pipelines. This will facilitate better management and updates in the future.
2. Six new folders corresponding to the LTS versions have been added under `jobs/tikv/pd/` and `pipelines/tikv/pd/`.
3. Each new folder contains Groovy script files that define the pipeline jobs, and YAML files that outline the pod specifications for these jobs.
4. The pipelines include stages for debugging, checking out the code, building the project, and uploading the build.
5. The Groovy scripts also use the Jenkins Job DSL plugin to create and configure the pipeline jobs.
6. Modifications have been made to the `prow-jobs/tikv/pd/latest-presubmits.yaml`, `prow-jobs/tikv/pd/release-6.5-presubmits.yaml`, and `prow-jobs/tikv/pd/release-7.1-presubmits.yaml` files to update the branches that trigger the jobs.
7. New `prow-jobs/tikv/pd/release-7.5-presubmits.yaml` and `prow-jobs/tikv/pd/release-8.5-presubmits.yaml` files have been added to define the CI/CD jobs for the LTS versions.

Potential issues:

1. The Groovy scripts seem to hardcode certain values such as the GitHub repository URL and the branch to clone. It might be better to parameterize these values so that they can be easily changed if needed.
2. There is a comment in the `ghpr_build.groovy` files that the filepath needs to be updated. This should be addressed.
3. The `latest-presubmits.yaml` file seems to remove the branches for version 8.4 and above. Ensure that this is intentional and won't disrupt any existing workflows.
4. In the `release-7.5-presubmits.yaml` and `release-8.5-presubmits.yaml` files, the `always_run` option is set to `true` for the `ghpr_build` job. This means that the job will always run, even if it doesn't need to. This could consume unnecessary resources.
5. The `release-7.1-presubmits.yaml` and `release-8.1-presubmits.yaml` files have similar branch patterns for the `release-7.*` and `release-8.*` versions. This could potentially overlap with the new `release-7.5-presubmits.yaml` and `release-8.5-presubmits.yaml` files.

Suggestions for fixing:

1. Make the values that are currently hardcoded in the Groovy scripts configurable. This could be done by using environment variables or Jenkins parameters.
2. Update the filepath in the `ghpr_build.groovy` files as per the comment. If the comment is outdated, remove it.
3. Review the changes to the `latest-presubmits.yaml` file to ensure that they won't disrupt any existing workflows.
4. Consider setting the `always_run` option to `false` for the `ghpr_build` job, unless there is a specific reason it needs to always run.
5. Check the branch patterns in the `release-7.1-presubmits.yaml` and `release-8.1-presubmits.yaml` files to ensure that they don't overlap with the new `release-7.5-presubmits.yaml` and `release-8.5-presubmits.yaml` files. If they do, adjust the patterns as needed.
author_association: NONE
user: login: ti-chi-bot[bot]
created_at: 2025-03-08T04:19:34Z
body: @gemini-code-assist[bot]: adding LGTM is restricted to approvers and reviewers in OWNERS files.

<details>

In response to [this](https://github.com/PingCAP-QE/ci/pull/3407#pullrequestreview-2668893590):

>## Code Review
>The pull request aims to split the Jenkins jobs for PD into separate pipelines for the 7.5 and 8.5 LTS branches. This should improve maintainability and make future updates easier. The changes look good overall, but there are a few points that could be improved.
>
>### Summary of Findings
>* **Duplicated Code**: The groovy files for 7.5 and 8.5 are almost identical. Consider creating a template or shared function to reduce code duplication.
>* **Inconsistent Golang Image Versions**: The golang image versions in the pod yaml files are different for 7.5 and 8.5. Ensure consistency or document the reason for the difference.
>* **FIXME comment**: The FIXME comment in `pipelines/tikv/pd/release-7.5/ghpr_build.groovy` and `pipelines/tikv/pd/release-8.5/ghpr_build.groovy` should be addressed.
>
>### Merge Readiness
>The pull request is almost ready for merging. Addressing the duplicated code and the FIXME comment would improve the quality of the code. I am unable to approve the pull request, and users should have others review and approve this code before merging. I would recommend addressing the high severity issues before merging.


Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md).  If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
</details>
author_association: NONE
user: login: ti-chi-bot[bot]
created_at: 2025-03-08T04:20:53Z
body: > **I have already done a preliminary review for you, and I hope to help you do a better job.**

The pull request titled "refactor(pd): split 7.5 and 8.5 lts jobs" is aimed at restructuring the pipelines for better maintenance and updates in the future. The pipelines for the two LTS branches are divided into separate files.

Key Changes:
1. Addition of new folders and jobs for release 7.5 and 8.5.
2. Each version has its own `folder.groovy`, `ghpr_build.groovy`, and `pull_integration_copr_test.groovy`.
3. Each version has its own pipeline scripts and pod YAML configurations.
4. The `kustomization.yaml` is updated to include the new job files.
5. The pipelines for the older versions are updated to exclude the new versions.

Potential Problems:
1. If the scripts or configurations for the pipelines are not yet ready, it could cause the pipelines to fail.
2. The change does not delete or modify the existing pipelines. If the old and new pipelines are both active, it could lead to confusion.
3. The pull requests only have the initial setup and does not include any test cases or validation checks.

Fixing Suggestions:
1. Make sure that the scripts and configurations for the new pipelines are ready and tested before merging the pull request.
2. If the old pipelines are no longer needed, consider deleting or deactivating them to avoid confusion.
3. Add test cases or validation checks to ensure that the new pipelines work as expected.
4. Ensure that the URLs and paths in the new pipelines are correct and accessible.
author_association: NONE
user: login: ti-chi-bot[bot]
created_at: 2025-03-08T05:49:18Z
body: [APPROVALNOTIFIER] This PR is **APPROVED**

Approval requirements bypassed by manually added approval.

This pull-request has been approved by:

The full list of commands accepted by this bot can be found [here](https://prow.tidb.net/command-help?repo=PingCAP-QE%2Fci).

The pull request process is described [here](https://book.prow.tidb.net/#/workflows/pr)

<details >
Needs approval from an approver in each of these files:

- **[jobs/OWNERS](https://github.com/PingCAP-QE/ci/blob/main/jobs/OWNERS)**
- **[pipelines/OWNERS](https://github.com/PingCAP-QE/ci/blob/main/pipelines/OWNERS)**
- **[prow-jobs/OWNERS](https://github.com/PingCAP-QE/ci/blob/main/prow-jobs/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["purelind"]} -->
author_association: NONE