Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pipelines/pingcap/tidb/release-8.5/pod-pull_check2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ spec:
limits:
memory: 256Mi
cpu: 100m
- name: utils
image: ghcr.io/pingcap-qe/cd/utils/release:v2025.10.12-7-gfdd779c
tty: true
resources:
requests:
memory: 256Mi
cpu: 100m
limits:
cpu: "1"
memory: 4Gi
volumes:
- name: gopathcache
persistentVolumeClaim:
Expand Down
10 changes: 10 additions & 0 deletions pipelines/pingcap/tidb/release-8.5/pod-pull_e2e_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ spec:
limits:
memory: 256Mi
cpu: 100m
- name: utils
image: ghcr.io/pingcap-qe/cd/utils/release:v2025.10.12-7-gfdd779c
tty: true
resources:
requests:
memory: 256Mi
cpu: 100m
limits:
cpu: "1"
memory: 4Gi
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ spec:
limits:
memory: 128Mi
cpu: 100m
- name: utils
image: ghcr.io/pingcap-qe/cd/utils/release:v2025.10.12-7-gfdd779c
tty: true
resources:
requests:
memory: 256Mi
cpu: 100m
limits:
cpu: "1"
memory: 4Gi
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@ spec:
limits:
memory: 256Mi
cpu: 100m
- name: utils
image: ghcr.io/pingcap-qe/cd/utils/release:v2025.10.12-7-gfdd779c
tty: true
resources:
requests:
memory: 256Mi
cpu: 100m
limits:
cpu: "1"
memory: 4Gi
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ spec:
limits:
memory: 128Mi
cpu: 100m
- name: utils
image: ghcr.io/pingcap-qe/cd/utils/release:v2025.10.12-7-gfdd779c
tty: true
resources:
requests:
memory: 256Mi
cpu: 100m
limits:
cpu: "1"
memory: 4Gi
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ spec:
limits:
memory: 256Mi
cpu: 100m
- name: utils
image: ghcr.io/pingcap-qe/cd/utils/release:v2025.10.12-7-gfdd779c
tty: true
resources:
requests:
memory: 256Mi
cpu: 100m
limits:
cpu: "1"
memory: 4Gi
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ spec:
limits:
memory: 256Mi
cpu: 100m
- name: utils
image: ghcr.io/pingcap-qe/cd/utils/release:v2025.10.12-7-gfdd779c
tty: true
resources:
requests:
memory: 256Mi
cpu: 100m
limits:
cpu: "1"
memory: 4Gi
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ spec:
limits:
memory: 256Mi
cpu: 100m
- name: utils
image: ghcr.io/pingcap-qe/cd/utils/release:v2025.10.12-7-gfdd779c
tty: true
resources:
requests:
memory: 256Mi
cpu: 100m
limits:
cpu: "1"
memory: 4Gi
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@ spec:
limits:
memory: 128Mi
cpu: 100m
- name: utils
image: ghcr.io/pingcap-qe/cd/utils/release:v2025.10.12-7-gfdd779c
tty: true
resources:
requests:
memory: 256Mi
cpu: 100m
limits:
cpu: "1"
memory: 4Gi
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ spec:
limits:
memory: 2Gi
cpu: "1"
- name: utils
image: ghcr.io/pingcap-qe/cd/utils/release:v2025.10.12-7-gfdd779c
tty: true
resources:
requests:
memory: 256Mi
cpu: 100m
limits:
cpu: "1"
memory: 4Gi
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand Down
51 changes: 0 additions & 51 deletions pipelines/pingcap/tidb/release-8.5/pull_build.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,11 @@ pipeline {
defaultContainer 'golang'
}
}
environment {
FILE_SERVER_URL = 'http://fileserver.pingcap.net'
}
options {
timeout(time: 90, unit: 'MINUTES')
parallelsAlwaysFailFast()
}
stages {
stage('Debug info') {
steps {
sh label: 'Debug info', script: """
printenv
echo "-------------------------"
go env
echo "-------------------------"
ls -l /dev/null
echo "debug command: kubectl -n ${K8S_NAMESPACE} exec -ti ${NODE_NAME} bash"
"""
container(name: 'net-tool') {
sh 'dig github.com'
}
}
}
stage('Checkout') {
steps {
dir(REFS.repo) {
Expand All @@ -62,30 +44,6 @@ pipeline {
}
}
post {
success {
dir(REFS.repo) {
sh label: "create tidb-server tarball", script: """
rm -rf .git
tar czvf tidb-server.tar.gz ./*
echo "pr/${REFS.pulls[0].sha}" > sha1
echo "done" > done
"""
sh label: 'upload to tidb dir', script: """
filepath="builds/${GIT_FULL_REPO_NAME}/pr/${REFS.pulls[0].sha}/centos7/tidb-server.tar.gz"
donepath="builds/${GIT_FULL_REPO_NAME}/pr/${REFS.pulls[0].sha}/centos7/done"
refspath="refs/${GIT_FULL_REPO_NAME}/pr/${REFS.pulls[0].number}/sha1"
curl -F \${filepath}=@tidb-server.tar.gz \${FILE_SERVER_URL}/upload
curl -F \${donepath}=@done \${FILE_SERVER_URL}/upload
curl -F \${refspath}=@sha1 \${FILE_SERVER_URL}/upload
"""
sh label: 'upload to tidb-checker dir', script: """
filepath="builds/pingcap/tidb-check/pr/${REFS.pulls[0].sha}/centos7/tidb-server.tar.gz"
donepath="builds/pingcap/tidb-check/pr/${REFS.pulls[0].sha}/centos7/done"
curl -F \${filepath}=@tidb-server.tar.gz \${FILE_SERVER_URL}/upload
curl -F \${donepath}=@done \${FILE_SERVER_URL}/upload
"""
}
}
always {
dir(REFS.repo) {
archiveArtifacts(artifacts: 'importer.log,tidb-server-check.log', allowEmptyArchive: true)
Expand Down Expand Up @@ -134,13 +92,4 @@ pipeline {
}
}
}
post {
// TODO(wuhuizuo): put into container lifecyle preStop hook.
always {
container('report') {
sh "bash scripts/plugins/report_job_result.sh ${currentBuild.result} result.json || true"
}
archiveArtifacts(artifacts: 'result.json', fingerprint: true, allowEmptyArchive: true)
}
}
}
72 changes: 25 additions & 47 deletions pipelines/pingcap/tidb/release-8.5/pull_check2.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -7,61 +7,51 @@ final K8S_NAMESPACE = "jenkins-tidb"
final GIT_FULL_REPO_NAME = 'pingcap/tidb'
final POD_TEMPLATE_FILE = 'pipelines/pingcap/tidb/release-8.5/pod-pull_check2.yaml'
final REFS = readJSON(text: params.JOB_SPEC).refs
final OCI_TAG_PD = component.computeArtifactOciTagFromPR('pd', REFS.base_ref, REFS.pulls[0].title, 'master')
final OCI_TAG_TIKV = component.computeArtifactOciTagFromPR('tikv', REFS.base_ref, REFS.pulls[0].title, 'master')
final GIT_CREDENTIALS_ID = 'github-sre-bot-ssh'

prow.setPRDescription(REFS)
pipeline {
agent {
kubernetes {
namespace K8S_NAMESPACE
yamlFile POD_TEMPLATE_FILE
defaultContainer 'golang'
}
}
agent none
options {
timeout(time: 65, unit: 'MINUTES')
parallelsAlwaysFailFast()
}
environment {
FILE_SERVER_URL = 'http://fileserver.pingcap.net'
OCI_ARTIFACT_HOST = 'hub-zot.pingcap.net/mirrors/hub' // cache mirror for us-docker.pkg.dev/pingcap-testing-account/hub
}
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'
stage('Checkout & Prepare') {
agent {
kubernetes {
namespace K8S_NAMESPACE
yamlFile POD_TEMPLATE_FILE
defaultContainer 'golang'
}
}
}
stage('Checkout') {
steps {
dir('tidb') {
dir(REFS.repo) {
cache(path: "./", includes: '**/*', key: prow.getCacheKey('git', REFS), restoreKeys: prow.getRestoreKeys('git', REFS)) {
retry(2) {
script {
prow.checkoutRefs(REFS, credentialsId = GIT_CREDENTIALS_ID)
}
}
}
}
}
}
stage("Prepare") {
steps {
dir('tidb') {
cache(path: "./bin", includes: '**/*', key: "binary/pingcap/tidb/tidb-server/rev-${REFS.base_sha}-${REFS.pulls[0].sha}") {
cache(path: "./bin", includes: 'tidb-server', key: prow.getCacheKey('binary', REFS)) {
sh label: 'tidb-server', script: 'ls bin/tidb-server || make server'
}
script {
component.fetchAndExtractArtifact(FILE_SERVER_URL, 'tikv', REFS.base_ref, REFS.pulls[0].title, 'centos7/tikv-server.tar.gz', 'bin')
component.fetchAndExtractArtifact(FILE_SERVER_URL, 'pd', REFS.base_ref, REFS.pulls[0].title, 'centos7/pd-server.tar.gz', 'bin')
container("utils") {
dir("bin") {
script {
retry(2) {
sh label: "download tidb components", script: """
${WORKSPACE}/scripts/artifacts/download_pingcap_oci_artifact.sh --pd=${OCI_TAG_PD} --tikv=${OCI_TAG_TIKV}
"""
}
}
}
}
// cache it for other pods
cache(path: "./", includes: '**/*', key: "ws/${BUILD_TAG}") {
Expand Down Expand Up @@ -110,7 +100,9 @@ pipeline {
}
stages {
stage('Test') {
environment { CODECOV_TOKEN = credentials('codecov-token-tidb') }
environment {
CODECOV_TOKEN = credentials('codecov-token-tidb')
}
options { timeout(time: 50, unit: 'MINUTES') }
steps {
dir('tidb') {
Expand Down Expand Up @@ -161,18 +153,4 @@ pipeline {
}
}
}
post {
success {
// Upload check flag to fileserver
sh "echo done > done && curl -F ci_check/${JOB_NAME}/${REFS.pulls[0].sha}=@done ${FILE_SERVER_URL}/upload"
}

// TODO(wuhuizuo): put into container lifecyle preStop hook.
always {
container('report') {
sh "bash scripts/plugins/report_job_result.sh ${currentBuild.result} result.json || true"
}
archiveArtifacts(artifacts: 'result.json', fingerprint: true, allowEmptyArchive: true)
}
}
}
1 change: 0 additions & 1 deletion pipelines/pingcap/tidb/release-8.5/pull_common_test.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ pipeline {
}
}
environment {
FILE_SERVER_URL = 'http://fileserver.pingcap.net'
GITHUB_TOKEN = credentials('github-bot-token')
}
options {
Expand Down
12 changes: 7 additions & 5 deletions pipelines/pingcap/tidb/release-8.5/pull_e2e_test.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
final K8S_NAMESPACE = "jenkins-tidb"
final POD_TEMPLATE_FILE = 'pipelines/pingcap/tidb/release-8.5/pod-pull_e2e_test.yaml'
final REFS = readJSON(text: params.JOB_SPEC).refs
final OCI_TAG_PD = component.computeArtifactOciTagFromPR('pd', REFS.base_ref, REFS.pulls[0].title, 'master')
final OCI_TAG_TIKV = component.computeArtifactOciTagFromPR('tikv', REFS.base_ref, REFS.pulls[0].title, 'master')
final GIT_CREDENTIALS_ID = 'github-sre-bot-ssh'

prow.setPRDescription(REFS)
Expand All @@ -18,7 +20,7 @@ pipeline {
}
}
environment {
FILE_SERVER_URL = 'http://fileserver.pingcap.net'
OCI_ARTIFACT_HOST = 'hub-zot.pingcap.net/mirrors/hub'
}
options {
timeout(time: 40, unit: 'MINUTES')
Expand Down Expand Up @@ -56,10 +58,10 @@ pipeline {
dir('tidb') {
sh label: 'tidb-server', script: '[ -f bin/tidb-server ] || make'
retry(3) {
script {
component.fetchAndExtractArtifact(FILE_SERVER_URL, 'tikv', REFS.base_ref, REFS.pulls[0].title, 'centos7/tikv-server.tar.gz', 'bin', trunkBranch="master")
component.fetchAndExtractArtifact(FILE_SERVER_URL, 'pd', REFS.base_ref, REFS.pulls[0].title, 'centos7/pd-server.tar.gz', 'bin', trunkBranch="master")
}
sh label: 'download binary', script: """
cd bin
${WORKSPACE}/scripts/artifacts/download_pingcap_oci_artifact.sh --pd=${OCI_TAG_PD} --tikv=${OCI_TAG_TIKV}
"""
}
}
}
Expand Down
Loading