From 743e321d60741ef2102685b99dec09c87c4c977d Mon Sep 17 00:00:00 2001 From: wuhuizuo Date: Wed, 7 Aug 2024 14:14:41 +0800 Subject: [PATCH 1/6] feat(tikv/tikv): add refactored jobs for LTS branches Signed-off-by: wuhuizuo --- prow-jobs/tikv/tikv/latest-presubmits.yaml | 29 +++++++++++++++++-- .../tikv/tikv/release-6.1-presubmits.yaml | 29 +++++++++++++++++-- .../tikv/tikv/release-6.5-presubmits.yaml | 29 +++++++++++++++++-- .../tikv/tikv/release-7.1-presubmits.yaml | 29 +++++++++++++++++-- .../tikv/tikv/release-7.5-presubmits.yaml | 29 +++++++++++++++++-- .../tikv/tikv/release-8.1-presubmits.yaml | 29 +++++++++++++++++-- .../tikv/tikv/release-8.2-presubmits.yaml | 7 +++-- 7 files changed, 161 insertions(+), 20 deletions(-) diff --git a/prow-jobs/tikv/tikv/latest-presubmits.yaml b/prow-jobs/tikv/tikv/latest-presubmits.yaml index 3b3968a0f5..8d584e0538 100644 --- a/prow-jobs/tikv/tikv/latest-presubmits.yaml +++ b/prow-jobs/tikv/tikv/latest-presubmits.yaml @@ -1,4 +1,9 @@ # struct ref: https://pkg.go.dev/k8s.io/test-infra/prow/config#Presubmit +global_definitions: + branches: &branches + - ^master$ + - ^feature/.+ + presubmits: tikv/tikv: - name: tikv/tikv/pull_unit_test @@ -10,6 +15,24 @@ presubmits: context: pull-unit-test trigger: "(?m)^/test (?:.*? )?pull-unit-test(?: .*?)?$" rerun_command: "/test pull-unit-test" - branches: - - ^master$ - - ^feature/.+ + branches: *branches + - name: tikv/tikv/pull_integration_copr_test + agent: jenkins + decorate: false # need add this. + always_run: false # update here after test passed + optional: true # update here after test passed + skip_report: true # update here after test passed + context: wip/pull-integration-copr-test + trigger: "(?m)^/debug (?:.*? )?pull-integration-copr-test(?: .*?)?$" + rerun_command: "/debug pull-integration-copr-test" + branches: *branches + - name: tikv/tikv/pull_integration_compatibility_test + agent: jenkins + decorate: false # need add this. + always_run: false # update here after test passed + optional: true # update here after test passed + skip_report: true # update here after test passed + context: wip/pull-integration-compatibility-test + trigger: "(?m)^/debug (?:.*? )?pull-integration-compatibility-test(?: .*?)?$" + rerun_command: "/debug pull-integration-compatibility-test" + branches: *branches diff --git a/prow-jobs/tikv/tikv/release-6.1-presubmits.yaml b/prow-jobs/tikv/tikv/release-6.1-presubmits.yaml index fff0f08322..0ce3a10aed 100644 --- a/prow-jobs/tikv/tikv/release-6.1-presubmits.yaml +++ b/prow-jobs/tikv/tikv/release-6.1-presubmits.yaml @@ -1,14 +1,37 @@ # struct ref: https://pkg.go.dev/k8s.io/test-infra/prow/config#Presubmit +global_definitions: + branches: &branches + - ^release-6\.1(\.\d+)?(-\d+)?(-v[\.\d]+)?$ + presubmits: tikv/tikv: - name: tikv/tikv/release-6.1/pull_unit_test agent: jenkins decorate: false # need add this. - always_run: false # update here after test passed + always_run: false # update here after test passed optional: true # update here after test passed skip_report: true # update here after test passed context: wip/pull-unit-test trigger: "(?m)^/debug (?:.*? )?pull-unit-test(?: .*?)?$" rerun_command: "/debug pull-unit-test" - branches: - - ^release-6\.1(\.\d+)?(-\d+)?(-v[\.\d]+)?$ + branches: *branches + - name: tikv/tikv/release-6.1/pull_integration_copr_test + agent: jenkins + decorate: false # need add this. + always_run: false # update here after test passed + optional: true # update here after test passed + skip_report: true # update here after test passed + context: wip/pull-integration-copr-test + trigger: "(?m)^/debug (?:.*? )?pull-integration-copr-test(?: .*?)?$" + rerun_command: "/debug pull-integration-copr-test" + branches: *branches + - name: tikv/tikv/release-6.1/pull_integration_compatibility_test + agent: jenkins + decorate: false # need add this. + always_run: false # update here after test passed + optional: true # update here after test passed + skip_report: true # update here after test passed + context: wip/pull-integration-compatibility-test + trigger: "(?m)^/debug (?:.*? )?pull-integration-compatibility-test(?: .*?)?$" + rerun_command: "/debug pull-integration-compatibility-test" + branches: *branches diff --git a/prow-jobs/tikv/tikv/release-6.5-presubmits.yaml b/prow-jobs/tikv/tikv/release-6.5-presubmits.yaml index 2961aa9c9c..c785c2ef61 100644 --- a/prow-jobs/tikv/tikv/release-6.5-presubmits.yaml +++ b/prow-jobs/tikv/tikv/release-6.5-presubmits.yaml @@ -1,14 +1,37 @@ # struct ref: https://pkg.go.dev/k8s.io/test-infra/prow/config#Presubmit +global_definitions: + branches: &branches + - ^release-6\.5(\.\d+)?(-\d+)?(-v[\.\d]+)?$ + presubmits: tikv/tikv: - name: tikv/tikv/release-6.5/pull_unit_test agent: jenkins decorate: false # need add this. - always_run: false # update here after test passed + always_run: false # update here after test passed optional: true # update here after test passed skip_report: true # update here after test passed context: wip/pull-unit-test trigger: "(?m)^/debug (?:.*? )?pull-unit-test(?: .*?)?$" rerun_command: "/debug pull-unit-test" - branches: - - ^release-6\.5(\.\d+)?(-\d+)?(-v[\.\d]+)?$ + branches: *branches + - name: tikv/tikv/release-6.5/pull_integration_copr_test + agent: jenkins + decorate: false # need add this. + always_run: false # update here after test passed + optional: true # update here after test passed + skip_report: true # update here after test passed + context: wip/pull-integration-copr-test + trigger: "(?m)^/debug (?:.*? )?pull-integration-copr-test(?: .*?)?$" + rerun_command: "/debug pull-integration-copr-test" + branches: *branches + - name: tikv/tikv/release-6.5/pull_integration_compatibility_test + agent: jenkins + decorate: false # need add this. + always_run: false # update here after test passed + optional: true # update here after test passed + skip_report: true # update here after test passed + context: wip/pull-integration-compatibility-test + trigger: "(?m)^/debug (?:.*? )?pull-integration-compatibility-test(?: .*?)?$" + rerun_command: "/debug pull-integration-compatibility-test" + branches: *branches diff --git a/prow-jobs/tikv/tikv/release-7.1-presubmits.yaml b/prow-jobs/tikv/tikv/release-7.1-presubmits.yaml index 94c6cf5641..e6a3ec96b2 100644 --- a/prow-jobs/tikv/tikv/release-7.1-presubmits.yaml +++ b/prow-jobs/tikv/tikv/release-7.1-presubmits.yaml @@ -1,14 +1,37 @@ # struct ref: https://pkg.go.dev/k8s.io/test-infra/prow/config#Presubmit +global_definitions: + branches: &branches + - ^release-7\.1(\.\d+)?(-\d+)?(-v[\.\d]+)?$ + presubmits: tikv/tikv: - name: tikv/tikv/release-7.1/pull_unit_test agent: jenkins decorate: false # need add this. - always_run: false # update here after test passed + always_run: false # update here after test passed optional: true # update here after test passed skip_report: true # update here after test passed context: wip/pull-unit-test trigger: "(?m)^/debug (?:.*? )?pull-unit-test(?: .*?)?$" rerun_command: "/debug pull-unit-test" - branches: - - ^release-7\.1(\.\d+)?(-\d+)?(-v[\.\d]+)?$ + branches: *branches + - name: tikv/tikv/release-7.1/pull_integration_copr_test + agent: jenkins + decorate: false # need add this. + always_run: false # update here after test passed + optional: true # update here after test passed + skip_report: true # update here after test passed + context: wip/pull-integration-copr-test + trigger: "(?m)^/debug (?:.*? )?pull-integration-copr-test(?: .*?)?$" + rerun_command: "/debug pull-integration-copr-test" + branches: *branches + - name: tikv/tikv/release-7.1/pull_integration_compatibility_test + agent: jenkins + decorate: false # need add this. + always_run: false # update here after test passed + optional: true # update here after test passed + skip_report: true # update here after test passed + context: wip/pull-integration-compatibility-test + trigger: "(?m)^/debug (?:.*? )?pull-integration-compatibility-test(?: .*?)?$" + rerun_command: "/debug pull-integration-compatibility-test" + branches: *branches diff --git a/prow-jobs/tikv/tikv/release-7.5-presubmits.yaml b/prow-jobs/tikv/tikv/release-7.5-presubmits.yaml index aabd0bb0cc..1d25b55305 100644 --- a/prow-jobs/tikv/tikv/release-7.5-presubmits.yaml +++ b/prow-jobs/tikv/tikv/release-7.5-presubmits.yaml @@ -1,14 +1,37 @@ # struct ref: https://pkg.go.dev/k8s.io/test-infra/prow/config#Presubmit +global_definitions: + branches: &branches + - ^release-7\.5(\.\d+)?(-\d+)?(-v[\.\d]+)?$ + presubmits: tikv/tikv: - name: tikv/tikv/release-7.5/pull_unit_test agent: jenkins decorate: false # need add this. - always_run: false # update here after test passed + always_run: false # update here after test passed optional: true # update here after test passed skip_report: true # update here after test passed context: wip/pull-unit-test trigger: "(?m)^/debug (?:.*? )?pull-unit-test(?: .*?)?$" rerun_command: "/debug pull-unit-test" - branches: - - ^release-7\.5(\.\d+)?(-\d+)?(-v[\.\d]+)?$ + branches: *branches + - name: tikv/tikv/release-7.5/pull_integration_copr_test + agent: jenkins + decorate: false # need add this. + always_run: false # update here after test passed + optional: true # update here after test passed + skip_report: true # update here after test passed + context: wip/pull-integration-copr-test + trigger: "(?m)^/debug (?:.*? )?pull-integration-copr-test(?: .*?)?$" + rerun_command: "/debug pull-integration-copr-test" + branches: *branches + - name: tikv/tikv/release-7.5/pull_integration_compatibility_test + agent: jenkins + decorate: false # need add this. + always_run: false # update here after test passed + optional: true # update here after test passed + skip_report: true # update here after test passed + context: wip/pull-integration-compatibility-test + trigger: "(?m)^/debug (?:.*? )?pull-integration-compatibility-test(?: .*?)?$" + rerun_command: "/debug pull-integration-compatibility-test" + branches: *branches diff --git a/prow-jobs/tikv/tikv/release-8.1-presubmits.yaml b/prow-jobs/tikv/tikv/release-8.1-presubmits.yaml index eb0bb95fa2..72abc47f2b 100644 --- a/prow-jobs/tikv/tikv/release-8.1-presubmits.yaml +++ b/prow-jobs/tikv/tikv/release-8.1-presubmits.yaml @@ -1,14 +1,37 @@ # struct ref: https://pkg.go.dev/k8s.io/test-infra/prow/config#Presubmit +global_definitions: + branches: &branches + - ^release-8\.1(\.\d+)?(-\d+)?(-v[\.\d]+)?$ + presubmits: tikv/tikv: - name: tikv/tikv/release-8.1/pull_unit_test agent: jenkins decorate: false # need add this. - always_run: false # update here after test passed + always_run: false # update here after test passed optional: true # update here after test passed skip_report: true # update here after test passed context: wip/pull-unit-test trigger: "(?m)^/debug (?:.*? )?pull-unit-test(?: .*?)?$" rerun_command: "/debug pull-unit-test" - branches: - - ^release-8\.1(\.\d+)?(-\d+)?(-v[\.\d]+)?$ + branches: *branches + - name: tikv/tikv/release-8.1/pull_integration_copr_test + agent: jenkins + decorate: false # need add this. + always_run: false # update here after test passed + optional: true # update here after test passed + skip_report: true # update here after test passed + context: wip/pull-integration-copr-test + trigger: "(?m)^/debug (?:.*? )?pull-integration-copr-test(?: .*?)?$" + rerun_command: "/debug pull-integration-copr-test" + branches: *branches + - name: tikv/tikv/release-8.1/pull_integration_compatibility_test + agent: jenkins + decorate: false # need add this. + always_run: false # update here after test passed + optional: true # update here after test passed + skip_report: true # update here after test passed + context: wip/pull-integration-compatibility-test + trigger: "(?m)^/debug (?:.*? )?pull-integration-compatibility-test(?: .*?)?$" + rerun_command: "/debug pull-integration-compatibility-test" + branches: *branches diff --git a/prow-jobs/tikv/tikv/release-8.2-presubmits.yaml b/prow-jobs/tikv/tikv/release-8.2-presubmits.yaml index 66557b96ed..c2918bc07c 100644 --- a/prow-jobs/tikv/tikv/release-8.2-presubmits.yaml +++ b/prow-jobs/tikv/tikv/release-8.2-presubmits.yaml @@ -1,4 +1,8 @@ # struct ref: https://pkg.go.dev/k8s.io/test-infra/prow/config#Presubmit +global_definitions: + branches: &branches + - ^release-8\.2(\.\d+)?(-\d+)?(-v[\.\d]+)?$ + presubmits: tikv/tikv: - name: tikv/tikv/release-8.2/pull_unit_test @@ -10,5 +14,4 @@ presubmits: context: pull-unit-test trigger: "(?m)^/test (?:.*? )?pull-unit-test(?: .*?)?$" rerun_command: "/test pull-unit-test" - branches: - - ^release-8\.2(\.\d+)?(-\d+)?(-v[\.\d]+)?$ + branches: *branches From c3e8b37e2703ba507d57cc0cd9b8b03aee06af9c Mon Sep 17 00:00:00 2001 From: wuhuizuo Date: Wed, 7 Aug 2024 14:22:04 +0800 Subject: [PATCH 2/6] refactor(jobs/tikv/tikv): refactor job DSLs Signed-off-by: wuhuizuo --- jobs/tikv/tikv/latest/pull_unit_test.groovy | 8 +++++--- jobs/tikv/tikv/release-6.1/pull_unit_test.groovy | 8 +++++--- jobs/tikv/tikv/release-6.5/pull_unit_test.groovy | 8 +++++--- jobs/tikv/tikv/release-7.1/pull_unit_test.groovy | 8 +++++--- jobs/tikv/tikv/release-7.5/pull_unit_test.groovy | 8 +++++--- jobs/tikv/tikv/release-8.1/pull_unit_test.groovy | 8 +++++--- jobs/tikv/tikv/release-8.2/pull_unit_test.groovy | 8 +++++--- 7 files changed, 35 insertions(+), 21 deletions(-) diff --git a/jobs/tikv/tikv/latest/pull_unit_test.groovy b/jobs/tikv/tikv/latest/pull_unit_test.groovy index 0774172c9c..0642de5326 100644 --- a/jobs/tikv/tikv/latest/pull_unit_test.groovy +++ b/jobs/tikv/tikv/latest/pull_unit_test.groovy @@ -1,6 +1,8 @@ // REF: https:///plugin/job-dsl/api-viewer/index.html -// For trunk branches. -pipelineJob('tikv/tikv/pull_unit_test') { +final folder = 'tikv/tikv' +final jobName = 'pull_unit_test' + +pipelineJob("${folder}/${jobName}") { logRotator { daysToKeep(30) } @@ -18,7 +20,7 @@ pipelineJob('tikv/tikv/pull_unit_test') { definition { cpsScm { lightweight(true) - scriptPath("pipelines/tikv/tikv/latest/pull_unit_test.groovy") + scriptPath("pipelines/${folder}/latest/${jobName}.groovy") scm { git{ remote { diff --git a/jobs/tikv/tikv/release-6.1/pull_unit_test.groovy b/jobs/tikv/tikv/release-6.1/pull_unit_test.groovy index 503a5e8a71..afdfefa819 100644 --- a/jobs/tikv/tikv/release-6.1/pull_unit_test.groovy +++ b/jobs/tikv/tikv/release-6.1/pull_unit_test.groovy @@ -1,6 +1,8 @@ // REF: https:///plugin/job-dsl/api-viewer/index.html -// For release branches. -pipelineJob('tikv/tikv/release-6.1/pull_unit_test') { +final folder = 'tikv/tikv/release-6.1' +final jobName = 'pull_unit_test' + +pipelineJob("${folder}/${jobName}") { logRotator { daysToKeep(30) } @@ -18,7 +20,7 @@ pipelineJob('tikv/tikv/release-6.1/pull_unit_test') { definition { cpsScm { lightweight(true) - scriptPath("pipelines/tikv/tikv/release-6.1/pull_unit_test.groovy") + scriptPath("pipelines/${folder}/${jobName}.groovy") scm { git{ remote { diff --git a/jobs/tikv/tikv/release-6.5/pull_unit_test.groovy b/jobs/tikv/tikv/release-6.5/pull_unit_test.groovy index 64e78a27d0..48408e3cc1 100644 --- a/jobs/tikv/tikv/release-6.5/pull_unit_test.groovy +++ b/jobs/tikv/tikv/release-6.5/pull_unit_test.groovy @@ -1,6 +1,8 @@ // REF: https:///plugin/job-dsl/api-viewer/index.html -// For release branches. -pipelineJob('tikv/tikv/release-6.5/pull_unit_test') { +final folder = 'tikv/tikv/release-6.5' +final jobName = 'pull_unit_test' + +pipelineJob("${folder}/${jobName}") { logRotator { daysToKeep(30) } @@ -18,7 +20,7 @@ pipelineJob('tikv/tikv/release-6.5/pull_unit_test') { definition { cpsScm { lightweight(true) - scriptPath("pipelines/tikv/tikv/release-6.5/pull_unit_test.groovy") + scriptPath("pipelines/${folder}/${jobName}.groovy") scm { git{ remote { diff --git a/jobs/tikv/tikv/release-7.1/pull_unit_test.groovy b/jobs/tikv/tikv/release-7.1/pull_unit_test.groovy index 1b60f15732..261048a8c4 100644 --- a/jobs/tikv/tikv/release-7.1/pull_unit_test.groovy +++ b/jobs/tikv/tikv/release-7.1/pull_unit_test.groovy @@ -1,6 +1,8 @@ // REF: https:///plugin/job-dsl/api-viewer/index.html -// For release branches. -pipelineJob('tikv/tikv/release-7.1/pull_unit_test') { +final folder = 'tikv/tikv/release-7.1' +final jobName = 'pull_unit_test' + +pipelineJob("${folder}/${jobName}") { logRotator { daysToKeep(30) } @@ -18,7 +20,7 @@ pipelineJob('tikv/tikv/release-7.1/pull_unit_test') { definition { cpsScm { lightweight(true) - scriptPath("pipelines/tikv/tikv/release-7.1/pull_unit_test.groovy") + scriptPath("pipelines/${folder}/${jobName}.groovy") scm { git{ remote { diff --git a/jobs/tikv/tikv/release-7.5/pull_unit_test.groovy b/jobs/tikv/tikv/release-7.5/pull_unit_test.groovy index cee343db2e..4fa65a7040 100644 --- a/jobs/tikv/tikv/release-7.5/pull_unit_test.groovy +++ b/jobs/tikv/tikv/release-7.5/pull_unit_test.groovy @@ -1,6 +1,8 @@ // REF: https:///plugin/job-dsl/api-viewer/index.html -// For release branches. -pipelineJob('tikv/tikv/release-7.5/pull_unit_test') { +final folder = 'tikv/tikv/release-7.5' +final jobName = 'pull_unit_test' + +pipelineJob("${folder}/${jobName}") { logRotator { daysToKeep(30) } @@ -18,7 +20,7 @@ pipelineJob('tikv/tikv/release-7.5/pull_unit_test') { definition { cpsScm { lightweight(true) - scriptPath("pipelines/tikv/tikv/release-7.5/pull_unit_test.groovy") + scriptPath("pipelines/${folder}/${jobName}.groovy") scm { git{ remote { diff --git a/jobs/tikv/tikv/release-8.1/pull_unit_test.groovy b/jobs/tikv/tikv/release-8.1/pull_unit_test.groovy index 15481864db..70f1659154 100644 --- a/jobs/tikv/tikv/release-8.1/pull_unit_test.groovy +++ b/jobs/tikv/tikv/release-8.1/pull_unit_test.groovy @@ -1,6 +1,8 @@ // REF: https:///plugin/job-dsl/api-viewer/index.html -// For release branches. -pipelineJob('tikv/tikv/release-8.1/pull_unit_test') { +final folder = 'tikv/tikv/release-8.1' +final jobName = 'pull_unit_test' + +pipelineJob("${folder}/${jobName}") { logRotator { daysToKeep(30) } @@ -18,7 +20,7 @@ pipelineJob('tikv/tikv/release-8.1/pull_unit_test') { definition { cpsScm { lightweight(true) - scriptPath("pipelines/tikv/tikv/release-8.1/pull_unit_test.groovy") + scriptPath("pipelines/${folder}/${jobName}.groovy") scm { git{ remote { diff --git a/jobs/tikv/tikv/release-8.2/pull_unit_test.groovy b/jobs/tikv/tikv/release-8.2/pull_unit_test.groovy index 1299b712c6..31cb210c7e 100644 --- a/jobs/tikv/tikv/release-8.2/pull_unit_test.groovy +++ b/jobs/tikv/tikv/release-8.2/pull_unit_test.groovy @@ -1,6 +1,8 @@ // REF: https:///plugin/job-dsl/api-viewer/index.html -// For release branches. -pipelineJob('tikv/tikv/release-8.2/pull_unit_test') { +final folder = 'tikv/tikv/release-8.2' +final jobName = 'pull_unit_test' + +pipelineJob("${folder}/${jobName}") { logRotator { daysToKeep(30) } @@ -18,7 +20,7 @@ pipelineJob('tikv/tikv/release-8.2/pull_unit_test') { definition { cpsScm { lightweight(true) - scriptPath("pipelines/tikv/tikv/release-8.2/pull_unit_test.groovy") + scriptPath("pipelines/${folder}/${jobName}.groovy") scm { git{ remote { From ea87458e362a61c8f16a7181260527f258cfcf61 Mon Sep 17 00:00:00 2001 From: wuhuizuo Date: Wed, 7 Aug 2024 14:28:25 +0800 Subject: [PATCH 3/6] feat(jobs/tikv/tikv): add new job DSLs for LTS branches add jobs: - pull_integration_compatibility_test - pull_integration_copr_test Signed-off-by: wuhuizuo --- ...pull_integration_compatibility_test.groovy | 41 +++++++++++++++++++ .../latest/pull_integration_copr_test.groovy | 41 +++++++++++++++++++ ...pull_integration_compatibility_test.groovy | 41 +++++++++++++++++++ .../pull_integration_copr_test.groovy | 41 +++++++++++++++++++ ...pull_integration_compatibility_test.groovy | 41 +++++++++++++++++++ .../pull_integration_copr_test.groovy | 41 +++++++++++++++++++ ...pull_integration_compatibility_test.groovy | 41 +++++++++++++++++++ .../pull_integration_copr_test.groovy | 41 +++++++++++++++++++ ...pull_integration_compatibility_test.groovy | 41 +++++++++++++++++++ .../pull_integration_copr_test.groovy | 41 +++++++++++++++++++ ...pull_integration_compatibility_test.groovy | 41 +++++++++++++++++++ .../pull_integration_copr_test.groovy | 41 +++++++++++++++++++ 12 files changed, 492 insertions(+) create mode 100644 jobs/tikv/tikv/latest/pull_integration_compatibility_test.groovy create mode 100644 jobs/tikv/tikv/latest/pull_integration_copr_test.groovy create mode 100644 jobs/tikv/tikv/release-6.1/pull_integration_compatibility_test.groovy create mode 100644 jobs/tikv/tikv/release-6.1/pull_integration_copr_test.groovy create mode 100644 jobs/tikv/tikv/release-6.5/pull_integration_compatibility_test.groovy create mode 100644 jobs/tikv/tikv/release-6.5/pull_integration_copr_test.groovy create mode 100644 jobs/tikv/tikv/release-7.1/pull_integration_compatibility_test.groovy create mode 100644 jobs/tikv/tikv/release-7.1/pull_integration_copr_test.groovy create mode 100644 jobs/tikv/tikv/release-7.5/pull_integration_compatibility_test.groovy create mode 100644 jobs/tikv/tikv/release-7.5/pull_integration_copr_test.groovy create mode 100644 jobs/tikv/tikv/release-8.1/pull_integration_compatibility_test.groovy create mode 100644 jobs/tikv/tikv/release-8.1/pull_integration_copr_test.groovy diff --git a/jobs/tikv/tikv/latest/pull_integration_compatibility_test.groovy b/jobs/tikv/tikv/latest/pull_integration_compatibility_test.groovy new file mode 100644 index 0000000000..036c137f3d --- /dev/null +++ b/jobs/tikv/tikv/latest/pull_integration_compatibility_test.groovy @@ -0,0 +1,41 @@ +// REF: https:///plugin/job-dsl/api-viewer/index.html +final folder = 'tikv/tikv' +final jobName = 'pull_integration_compatibility_test' + +pipelineJob("${folder}/${jobName}") { + 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/tikv") + } + + definition { + cpsScm { + lightweight(true) + scriptPath("pipelines/${folder}/latest/${jobName}.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/tikv/latest/pull_integration_copr_test.groovy b/jobs/tikv/tikv/latest/pull_integration_copr_test.groovy new file mode 100644 index 0000000000..5939720c47 --- /dev/null +++ b/jobs/tikv/tikv/latest/pull_integration_copr_test.groovy @@ -0,0 +1,41 @@ +// REF: https:///plugin/job-dsl/api-viewer/index.html +final folder = 'tikv/tikv' +final jobName = 'pull_integration_copr_test' + +pipelineJob("${folder}/${jobName}") { + 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/tikv") + } + + definition { + cpsScm { + lightweight(true) + scriptPath("pipelines/${folder}/latest/${jobName}.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/tikv/release-6.1/pull_integration_compatibility_test.groovy b/jobs/tikv/tikv/release-6.1/pull_integration_compatibility_test.groovy new file mode 100644 index 0000000000..7e9cbfa21a --- /dev/null +++ b/jobs/tikv/tikv/release-6.1/pull_integration_compatibility_test.groovy @@ -0,0 +1,41 @@ +// REF: https:///plugin/job-dsl/api-viewer/index.html +final folder = 'tikv/tikv/release-6.1' +final jobName = 'pull_integration_compatibility_test' + +pipelineJob("${folder}/${jobName}") { + 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/tikv") + } + + definition { + cpsScm { + lightweight(true) + scriptPath("pipelines/${folder}/${jobName}.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/tikv/release-6.1/pull_integration_copr_test.groovy b/jobs/tikv/tikv/release-6.1/pull_integration_copr_test.groovy new file mode 100644 index 0000000000..96bc5f5388 --- /dev/null +++ b/jobs/tikv/tikv/release-6.1/pull_integration_copr_test.groovy @@ -0,0 +1,41 @@ +// REF: https:///plugin/job-dsl/api-viewer/index.html +final folder = 'tikv/tikv/release-6.1' +final jobName = 'pull_integration_copr_test' + +pipelineJob("${folder}/${jobName}") { + 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/tikv") + } + + definition { + cpsScm { + lightweight(true) + scriptPath("pipelines/${folder}/${jobName}.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/tikv/release-6.5/pull_integration_compatibility_test.groovy b/jobs/tikv/tikv/release-6.5/pull_integration_compatibility_test.groovy new file mode 100644 index 0000000000..f7a87147c5 --- /dev/null +++ b/jobs/tikv/tikv/release-6.5/pull_integration_compatibility_test.groovy @@ -0,0 +1,41 @@ +// REF: https:///plugin/job-dsl/api-viewer/index.html +final folder = 'tikv/tikv/release-6.5' +final jobName = 'pull_integration_compatibility_test' + +pipelineJob("${folder}/${jobName}") { + 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/tikv") + } + + definition { + cpsScm { + lightweight(true) + scriptPath("pipelines/${folder}/${jobName}.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/tikv/release-6.5/pull_integration_copr_test.groovy b/jobs/tikv/tikv/release-6.5/pull_integration_copr_test.groovy new file mode 100644 index 0000000000..97fdf0c41c --- /dev/null +++ b/jobs/tikv/tikv/release-6.5/pull_integration_copr_test.groovy @@ -0,0 +1,41 @@ +// REF: https:///plugin/job-dsl/api-viewer/index.html +final folder = 'tikv/tikv/release-6.5' +final jobName = 'pull_integration_copr_test' + +pipelineJob("${folder}/${jobName}") { + 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/tikv") + } + + definition { + cpsScm { + lightweight(true) + scriptPath("pipelines/${folder}/${jobName}.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/tikv/release-7.1/pull_integration_compatibility_test.groovy b/jobs/tikv/tikv/release-7.1/pull_integration_compatibility_test.groovy new file mode 100644 index 0000000000..2ad8fc8eb7 --- /dev/null +++ b/jobs/tikv/tikv/release-7.1/pull_integration_compatibility_test.groovy @@ -0,0 +1,41 @@ +// REF: https:///plugin/job-dsl/api-viewer/index.html +final folder = 'tikv/tikv/release-7.1' +final jobName = 'pull_integration_compatibility_test' + +pipelineJob("${folder}/${jobName}") { + 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/tikv") + } + + definition { + cpsScm { + lightweight(true) + scriptPath("pipelines/${folder}/${jobName}.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/tikv/release-7.1/pull_integration_copr_test.groovy b/jobs/tikv/tikv/release-7.1/pull_integration_copr_test.groovy new file mode 100644 index 0000000000..3bd77b8835 --- /dev/null +++ b/jobs/tikv/tikv/release-7.1/pull_integration_copr_test.groovy @@ -0,0 +1,41 @@ +// REF: https:///plugin/job-dsl/api-viewer/index.html +final folder = 'tikv/tikv/release-7.1' +final jobName = 'pull_integration_copr_test' + +pipelineJob("${folder}/${jobName}") { + 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/tikv") + } + + definition { + cpsScm { + lightweight(true) + scriptPath("pipelines/${folder}/${jobName}.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/tikv/release-7.5/pull_integration_compatibility_test.groovy b/jobs/tikv/tikv/release-7.5/pull_integration_compatibility_test.groovy new file mode 100644 index 0000000000..9167d554b0 --- /dev/null +++ b/jobs/tikv/tikv/release-7.5/pull_integration_compatibility_test.groovy @@ -0,0 +1,41 @@ +// REF: https:///plugin/job-dsl/api-viewer/index.html +final folder = 'tikv/tikv/release-7.5' +final jobName = 'pull_integration_compatibility_test' + +pipelineJob("${folder}/${jobName}") { + 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/tikv") + } + + definition { + cpsScm { + lightweight(true) + scriptPath("pipelines/${folder}/${jobName}.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/tikv/release-7.5/pull_integration_copr_test.groovy b/jobs/tikv/tikv/release-7.5/pull_integration_copr_test.groovy new file mode 100644 index 0000000000..a4cf0ff640 --- /dev/null +++ b/jobs/tikv/tikv/release-7.5/pull_integration_copr_test.groovy @@ -0,0 +1,41 @@ +// REF: https:///plugin/job-dsl/api-viewer/index.html +final folder = 'tikv/tikv/release-7.5' +final jobName = 'pull_integration_copr_test' + +pipelineJob("${folder}/${jobName}") { + 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/tikv") + } + + definition { + cpsScm { + lightweight(true) + scriptPath("pipelines/${folder}/${jobName}.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/tikv/release-8.1/pull_integration_compatibility_test.groovy b/jobs/tikv/tikv/release-8.1/pull_integration_compatibility_test.groovy new file mode 100644 index 0000000000..8a2618ae24 --- /dev/null +++ b/jobs/tikv/tikv/release-8.1/pull_integration_compatibility_test.groovy @@ -0,0 +1,41 @@ +// REF: https:///plugin/job-dsl/api-viewer/index.html +final folder = 'tikv/tikv/release-8.1' +final jobName = 'pull_integration_compatibility_test' + +pipelineJob("${folder}/${jobName}") { + 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/tikv") + } + + definition { + cpsScm { + lightweight(true) + scriptPath("pipelines/${folder}/${jobName}.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/tikv/release-8.1/pull_integration_copr_test.groovy b/jobs/tikv/tikv/release-8.1/pull_integration_copr_test.groovy new file mode 100644 index 0000000000..de171b4780 --- /dev/null +++ b/jobs/tikv/tikv/release-8.1/pull_integration_copr_test.groovy @@ -0,0 +1,41 @@ +// REF: https:///plugin/job-dsl/api-viewer/index.html +final folder = 'tikv/tikv/release-8.1' +final jobName = 'pull_integration_copr_test' + +pipelineJob("${folder}/${jobName}") { + 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/tikv") + } + + definition { + cpsScm { + lightweight(true) + scriptPath("pipelines/${folder}/${jobName}.groovy") + scm { + git{ + remote { + url('https://github.com/PingCAP-QE/ci.git') + } + branch('main') + extensions { + cloneOptions { + depth(1) + shallow(true) + timeout(5) + } + } + } + } + } + } +} From acdd8989aa7e548f8db225c55c5c7e5034893ebf Mon Sep 17 00:00:00 2001 From: wuhuizuo Date: Wed, 7 Aug 2024 18:04:45 +0800 Subject: [PATCH 4/6] feat(jobs/tikv/tikv): add new job pipelines for LTS branches Signed-off-by: wuhuizuo --- .../tikv/latest/pull_integration_test.groovy | 133 ++++++++++++++++++ .../tikv/latest/pull_integration_test.yaml | 39 +++++ .../release-6.1/pull_integration_test.groovy | 133 ++++++++++++++++++ .../release-6.1/pull_integration_test.yaml | 39 +++++ .../release-6.5/pull_integration_test.groovy | 133 ++++++++++++++++++ .../release-6.5/pull_integration_test.yaml | 39 +++++ .../release-7.1/pull_integration_test.groovy | 133 ++++++++++++++++++ .../release-7.1/pull_integration_test.yaml | 39 +++++ .../release-7.5/pull_integration_test.groovy | 133 ++++++++++++++++++ .../release-7.5/pull_integration_test.yaml | 39 +++++ .../release-8.1/pull_integration_test.groovy | 133 ++++++++++++++++++ .../release-8.1/pull_integration_test.yaml | 39 +++++ scripts/tikv/tikv/run_compatible_tests.sh | 34 +++++ 13 files changed, 1066 insertions(+) create mode 100644 pipelines/tikv/tikv/latest/pull_integration_test.groovy create mode 100644 pipelines/tikv/tikv/latest/pull_integration_test.yaml create mode 100644 pipelines/tikv/tikv/release-6.1/pull_integration_test.groovy create mode 100644 pipelines/tikv/tikv/release-6.1/pull_integration_test.yaml create mode 100644 pipelines/tikv/tikv/release-6.5/pull_integration_test.groovy create mode 100644 pipelines/tikv/tikv/release-6.5/pull_integration_test.yaml create mode 100644 pipelines/tikv/tikv/release-7.1/pull_integration_test.groovy create mode 100644 pipelines/tikv/tikv/release-7.1/pull_integration_test.yaml create mode 100644 pipelines/tikv/tikv/release-7.5/pull_integration_test.groovy create mode 100644 pipelines/tikv/tikv/release-7.5/pull_integration_test.yaml create mode 100644 pipelines/tikv/tikv/release-8.1/pull_integration_test.groovy create mode 100644 pipelines/tikv/tikv/release-8.1/pull_integration_test.yaml create mode 100755 scripts/tikv/tikv/run_compatible_tests.sh diff --git a/pipelines/tikv/tikv/latest/pull_integration_test.groovy b/pipelines/tikv/tikv/latest/pull_integration_test.groovy new file mode 100644 index 0000000000..fbf49f1517 --- /dev/null +++ b/pipelines/tikv/tikv/latest/pull_integration_test.groovy @@ -0,0 +1,133 @@ +// 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-tikv" +final GIT_CREDENTIALS_ID = 'github-sre-bot-ssh' +final POD_TEMPLATE_FILE = 'pipelines/tikv/tikv/latest/pod-pull_integration_test.yaml' +final REFS = readJSON(text: params.JOB_SPEC).refs +prow.setPRDescription(REFS) + +pipeline { + agent { + kubernetes { + namespace K8S_NAMESPACE + yamlFile POD_TEMPLATE_FILE + defaultContainer 'runner' + } + } + environment { + FILE_SERVER_URL = 'http://fileserver.pingcap.net' + } + options { + timeout(time: 50, unit: 'MINUTES') + parallelsAlwaysFailFast() + skipDefaultCheckout() + } + stages { + stage('Checkout') { + options { timeout(time: 5, unit: 'MINUTES') } + steps { + dir(REFS.repo) { + cache(path: "./", includes: '**/*', key: prow.getCacheKey('git', REFS), restoreKeys: prow.getRestoreKeys('git', REFS)) { + retry(2) { + script { + prow.checkoutRefs(REFS) + } + } + } + } + } + } + stage('Prepare') { + steps { + dir(REFS.repo) { + sh label: 'Prepare tikv-server', script: 'make release' + } + dir('bin') { + script { + component.fetchAndExtractArtifact(FILE_SERVER_URL, 'pd', REFS.base_ref, REFS.pulls[0].title, 'centos7/pd-server.tar.gz', 'bin') + } + script { + component.fetchAndExtractArtifact(FILE_SERVER_URL, 'tikv', REFS.base_ref, REFS.pulls[0].title, 'centos7/tikv-server.tar.gz', 'bin') + } + script { + component.fetchAndExtractArtifact(FILE_SERVER_URL, 'tidb', REFS.base_ref, REFS.pulls[0].title, 'centos7/tidb-server.tar.gz', 'bin') + } + } + } + } + stage('Tests') { + stages{ + stage('copr test') { + options { timeout(time: 30, unit: 'MINUTES') } + steps { + dir('tidb') { + cache(path: "./", includes: '**/*', key: "git/pingcap/tidb/rev-${REFS.pulls[0].sha}", restoreKeys: ['git/pingcap/tidb/rev-']) { + retry(2) { + script { + component.checkoutSupportBatch('https://github.com/pingcap/tidb.git', 'tidb', REFS.base_ref, REFS.pulls[0].title, REFS, GIT_CREDENTIALS_ID) + } + } + } + } + dir('copr-test') { + cache(path: "./", includes: '**/*', key: "git/tikv/copr-test/rev-${REFS.pulls[0].sha}", restoreKeys: ['git/tikv/copr-test/rev-']) { + retry(2) { + script { + component.checkoutSupportBatch('https://github.com/tikv/copr-test.git', 'copr-test', REFS.base_ref, REFS.pulls[0].title, REFS, GIT_CREDENTIALS_ID) + } + } + } + container('golang') { + sh label: 'Push Down Test', script: ''' + pd_bin=${WORKSPACE}/bin/pd-server \ + tikv_bin=${WORKSPACE}/tikv/bin/tikv-server \ + tidb_src_dir=${WORKSPACE}/tidb \ + make push-down-test + ''' + } + } + } + post { + failure { + echo "TODO: archive logs" + } + } + } + stage('compatible test') { + steps { + dir("tidb-test") { + cache(path: "./", includes: '**/*', key: "git/PingCAP-QE/tidb-test/rev-${REFS.pulls[0].sha}", restoreKeys: ['git/PingCAP-QE/tidb-test/rev-']) { + retry(2) { + script { + component.checkoutSupportBatch('git@github.com:PingCAP-QE/tidb-test.git', 'tidb-test', REFS.base_ref, REFS.pulls[0].title, REFS, GIT_CREDENTIALS_ID) + } + } + } + } + container('golang') { + dir('tidb-test/compatible_test') { + sh label: 'compile test binary', script: './build.sh' + sh label: 'run test', script: ''' + chmod +x ${WORKSPACE}/scripts/tikv/tikv/run_compatible_tests.sh + + TIKV_PATH="${WORKSPACE}/tikv/bin/tikv-server" \ + TIDB_PATH="${WORKSPACE}/bin/tidb-server" \ + PD_PATH="${WORKSPACE}/bin/pd-server" \ + OLD_BINARY="${WORKSPACE}/bin/tikv-server" \ + ${WORKSPACE}/scripts/tikv/tikv/run_compatible_tests.sh + ''' + } + } + } + post { + failure { + echo "TODO: archive logs" + } + } + } + } + } + } +} diff --git a/pipelines/tikv/tikv/latest/pull_integration_test.yaml b/pipelines/tikv/tikv/latest/pull_integration_test.yaml new file mode 100644 index 0000000000..de87d7e562 --- /dev/null +++ b/pipelines/tikv/tikv/latest/pull_integration_test.yaml @@ -0,0 +1,39 @@ +apiVersion: v1 +kind: Pod +spec: + containers: + - name: runner + image: "hub.pingcap.net/jenkins/tikv-cached-master:latest" + tty: true + resources: + requests: + memory: 8Gi + cpu: "6" + limits: + memory: 32Gi + cpu: "16" + securityContext: + privileged: true + - name: golang + image: hub.pingcap.net/jenkins/centos7_golang-1.21:latest + tty: true + resources: + requests: + memory: 8Gi + cpu: '4' + limits: + memory: 32Gi + cpu: "16" + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/arch + operator: In + values: + - amd64 + - key: ci-nvme-high-performance + operator: In + values: + - "true" diff --git a/pipelines/tikv/tikv/release-6.1/pull_integration_test.groovy b/pipelines/tikv/tikv/release-6.1/pull_integration_test.groovy new file mode 100644 index 0000000000..5960dd52ea --- /dev/null +++ b/pipelines/tikv/tikv/release-6.1/pull_integration_test.groovy @@ -0,0 +1,133 @@ +// 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-tikv" +final GIT_CREDENTIALS_ID = 'github-sre-bot-ssh' +final POD_TEMPLATE_FILE = 'pipelines/tikv/tikv/relese-6.1/pod-pull_integration_test.yaml' +final REFS = readJSON(text: params.JOB_SPEC).refs +prow.setPRDescription(REFS) + +pipeline { + agent { + kubernetes { + namespace K8S_NAMESPACE + yamlFile POD_TEMPLATE_FILE + defaultContainer 'runner' + } + } + environment { + FILE_SERVER_URL = 'http://fileserver.pingcap.net' + } + options { + timeout(time: 50, unit: 'MINUTES') + parallelsAlwaysFailFast() + skipDefaultCheckout() + } + stages { + stage('Checkout') { + options { timeout(time: 5, unit: 'MINUTES') } + steps { + dir(REFS.repo) { + cache(path: "./", includes: '**/*', key: prow.getCacheKey('git', REFS), restoreKeys: prow.getRestoreKeys('git', REFS)) { + retry(2) { + script { + prow.checkoutRefs(REFS) + } + } + } + } + } + } + stage('Prepare') { + steps { + dir(REFS.repo) { + sh label: 'Prepare tikv-server', script: 'make release' + } + dir('bin') { + script { + component.fetchAndExtractArtifact(FILE_SERVER_URL, 'pd', REFS.base_ref, REFS.pulls[0].title, 'centos7/pd-server.tar.gz', 'bin') + } + script { + component.fetchAndExtractArtifact(FILE_SERVER_URL, 'tikv', REFS.base_ref, REFS.pulls[0].title, 'centos7/tikv-server.tar.gz', 'bin') + } + script { + component.fetchAndExtractArtifact(FILE_SERVER_URL, 'tidb', REFS.base_ref, REFS.pulls[0].title, 'centos7/tidb-server.tar.gz', 'bin') + } + } + } + } + stage('Tests') { + stages{ + stage('copr test') { + options { timeout(time: 30, unit: 'MINUTES') } + steps { + dir('tidb') { + cache(path: "./", includes: '**/*', key: "git/pingcap/tidb/rev-${REFS.pulls[0].sha}", restoreKeys: ['git/pingcap/tidb/rev-']) { + retry(2) { + script { + component.checkoutSupportBatch('https://github.com/pingcap/tidb.git', 'tidb', REFS.base_ref, REFS.pulls[0].title, REFS, GIT_CREDENTIALS_ID) + } + } + } + } + dir('copr-test') { + cache(path: "./", includes: '**/*', key: "git/tikv/copr-test/rev-${REFS.pulls[0].sha}", restoreKeys: ['git/tikv/copr-test/rev-']) { + retry(2) { + script { + component.checkoutSupportBatch('https://github.com/tikv/copr-test.git', 'copr-test', REFS.base_ref, REFS.pulls[0].title, REFS, GIT_CREDENTIALS_ID) + } + } + } + container('golang') { + sh label: 'Push Down Test', script: ''' + pd_bin=${WORKSPACE}/bin/pd-server \ + tikv_bin=${WORKSPACE}/tikv/bin/tikv-server \ + tidb_src_dir=${WORKSPACE}/tidb \ + make push-down-test + ''' + } + } + } + post { + failure { + echo "TODO: archive logs" + } + } + } + stage('compatible test') { + steps { + dir("tidb-test") { + cache(path: "./", includes: '**/*', key: "git/PingCAP-QE/tidb-test/rev-${REFS.pulls[0].sha}", restoreKeys: ['git/PingCAP-QE/tidb-test/rev-']) { + retry(2) { + script { + component.checkoutSupportBatch('git@github.com:PingCAP-QE/tidb-test.git', 'tidb-test', REFS.base_ref, REFS.pulls[0].title, REFS, GIT_CREDENTIALS_ID) + } + } + } + } + container('golang') { + dir('tidb-test/compatible_test') { + sh label: 'compile test binary', script: './build.sh' + sh label: 'run test', script: ''' + chmod +x ${WORKSPACE}/scripts/tikv/tikv/run_compatible_tests.sh + + TIKV_PATH="${WORKSPACE}/tikv/bin/tikv-server" \ + TIDB_PATH="${WORKSPACE}/bin/tidb-server" \ + PD_PATH="${WORKSPACE}/bin/pd-server" \ + OLD_BINARY="${WORKSPACE}/bin/tikv-server" \ + ${WORKSPACE}/scripts/tikv/tikv/run_compatible_tests.sh + ''' + } + } + } + post { + failure { + echo "TODO: archive logs" + } + } + } + } + } + } +} diff --git a/pipelines/tikv/tikv/release-6.1/pull_integration_test.yaml b/pipelines/tikv/tikv/release-6.1/pull_integration_test.yaml new file mode 100644 index 0000000000..baa68330b9 --- /dev/null +++ b/pipelines/tikv/tikv/release-6.1/pull_integration_test.yaml @@ -0,0 +1,39 @@ +apiVersion: v1 +kind: Pod +spec: + containers: + - name: runner + image: "hub.pingcap.net/jenkins/tikv-cached-release-6.1:latest" + tty: true + resources: + requests: + memory: 8Gi + cpu: "6" + limits: + memory: 32Gi + cpu: "16" + securityContext: + privileged: true + - name: golang + image: hub.pingcap.net/jenkins/centos7_golang-1.19:latest + tty: true + resources: + requests: + memory: 8Gi + cpu: '4' + limits: + memory: 32Gi + cpu: "16" + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/arch + operator: In + values: + - amd64 + - key: ci-nvme-high-performance + operator: In + values: + - "true" diff --git a/pipelines/tikv/tikv/release-6.5/pull_integration_test.groovy b/pipelines/tikv/tikv/release-6.5/pull_integration_test.groovy new file mode 100644 index 0000000000..38b93f19de --- /dev/null +++ b/pipelines/tikv/tikv/release-6.5/pull_integration_test.groovy @@ -0,0 +1,133 @@ +// 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-tikv" +final GIT_CREDENTIALS_ID = 'github-sre-bot-ssh' +final POD_TEMPLATE_FILE = 'pipelines/tikv/tikv/release-6.5/pod-pull_integration_test.yaml' +final REFS = readJSON(text: params.JOB_SPEC).refs +prow.setPRDescription(REFS) + +pipeline { + agent { + kubernetes { + namespace K8S_NAMESPACE + yamlFile POD_TEMPLATE_FILE + defaultContainer 'runner' + } + } + environment { + FILE_SERVER_URL = 'http://fileserver.pingcap.net' + } + options { + timeout(time: 50, unit: 'MINUTES') + parallelsAlwaysFailFast() + skipDefaultCheckout() + } + stages { + stage('Checkout') { + options { timeout(time: 5, unit: 'MINUTES') } + steps { + dir(REFS.repo) { + cache(path: "./", includes: '**/*', key: prow.getCacheKey('git', REFS), restoreKeys: prow.getRestoreKeys('git', REFS)) { + retry(2) { + script { + prow.checkoutRefs(REFS) + } + } + } + } + } + } + stage('Prepare') { + steps { + dir(REFS.repo) { + sh label: 'Prepare tikv-server', script: 'make release' + } + dir('bin') { + script { + component.fetchAndExtractArtifact(FILE_SERVER_URL, 'pd', REFS.base_ref, REFS.pulls[0].title, 'centos7/pd-server.tar.gz', 'bin') + } + script { + component.fetchAndExtractArtifact(FILE_SERVER_URL, 'tikv', REFS.base_ref, REFS.pulls[0].title, 'centos7/tikv-server.tar.gz', 'bin') + } + script { + component.fetchAndExtractArtifact(FILE_SERVER_URL, 'tidb', REFS.base_ref, REFS.pulls[0].title, 'centos7/tidb-server.tar.gz', 'bin') + } + } + } + } + stage('Tests') { + stages{ + stage('copr test') { + options { timeout(time: 30, unit: 'MINUTES') } + steps { + dir('tidb') { + cache(path: "./", includes: '**/*', key: "git/pingcap/tidb/rev-${REFS.pulls[0].sha}", restoreKeys: ['git/pingcap/tidb/rev-']) { + retry(2) { + script { + component.checkoutSupportBatch('https://github.com/pingcap/tidb.git', 'tidb', REFS.base_ref, REFS.pulls[0].title, REFS, GIT_CREDENTIALS_ID) + } + } + } + } + dir('copr-test') { + cache(path: "./", includes: '**/*', key: "git/tikv/copr-test/rev-${REFS.pulls[0].sha}", restoreKeys: ['git/tikv/copr-test/rev-']) { + retry(2) { + script { + component.checkoutSupportBatch('https://github.com/tikv/copr-test.git', 'copr-test', REFS.base_ref, REFS.pulls[0].title, REFS, GIT_CREDENTIALS_ID) + } + } + } + container('golang') { + sh label: 'Push Down Test', script: ''' + pd_bin=${WORKSPACE}/bin/pd-server \ + tikv_bin=${WORKSPACE}/tikv/bin/tikv-server \ + tidb_src_dir=${WORKSPACE}/tidb \ + make push-down-test + ''' + } + } + } + post { + failure { + echo "TODO: archive logs" + } + } + } + stage('compatible test') { + steps { + dir("tidb-test") { + cache(path: "./", includes: '**/*', key: "git/PingCAP-QE/tidb-test/rev-${REFS.pulls[0].sha}", restoreKeys: ['git/PingCAP-QE/tidb-test/rev-']) { + retry(2) { + script { + component.checkoutSupportBatch('git@github.com:PingCAP-QE/tidb-test.git', 'tidb-test', REFS.base_ref, REFS.pulls[0].title, REFS, GIT_CREDENTIALS_ID) + } + } + } + } + container('golang') { + dir('tidb-test/compatible_test') { + sh label: 'compile test binary', script: './build.sh' + sh label: 'run test', script: ''' + chmod +x ${WORKSPACE}/scripts/tikv/tikv/run_compatible_tests.sh + + TIKV_PATH="${WORKSPACE}/tikv/bin/tikv-server" \ + TIDB_PATH="${WORKSPACE}/bin/tidb-server" \ + PD_PATH="${WORKSPACE}/bin/pd-server" \ + OLD_BINARY="${WORKSPACE}/bin/tikv-server" \ + ${WORKSPACE}/scripts/tikv/tikv/run_compatible_tests.sh + ''' + } + } + } + post { + failure { + echo "TODO: archive logs" + } + } + } + } + } + } +} diff --git a/pipelines/tikv/tikv/release-6.5/pull_integration_test.yaml b/pipelines/tikv/tikv/release-6.5/pull_integration_test.yaml new file mode 100644 index 0000000000..6c8fa8c5cc --- /dev/null +++ b/pipelines/tikv/tikv/release-6.5/pull_integration_test.yaml @@ -0,0 +1,39 @@ +apiVersion: v1 +kind: Pod +spec: + containers: + - name: runner + image: "hub.pingcap.net/jenkins/tikv-cached-release-6.5:latest" + tty: true + resources: + requests: + memory: 8Gi + cpu: "6" + limits: + memory: 32Gi + cpu: "16" + securityContext: + privileged: true + - name: golang + image: hub.pingcap.net/jenkins/centos7_golang-1.19:latest + tty: true + resources: + requests: + memory: 8Gi + cpu: '4' + limits: + memory: 32Gi + cpu: "16" + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/arch + operator: In + values: + - amd64 + - key: ci-nvme-high-performance + operator: In + values: + - "true" diff --git a/pipelines/tikv/tikv/release-7.1/pull_integration_test.groovy b/pipelines/tikv/tikv/release-7.1/pull_integration_test.groovy new file mode 100644 index 0000000000..f9ba363811 --- /dev/null +++ b/pipelines/tikv/tikv/release-7.1/pull_integration_test.groovy @@ -0,0 +1,133 @@ +// 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-tikv" +final GIT_CREDENTIALS_ID = 'github-sre-bot-ssh' +final POD_TEMPLATE_FILE = 'pipelines/tikv/tikv/release-7.1/pod-pull_integration_test.yaml' +final REFS = readJSON(text: params.JOB_SPEC).refs +prow.setPRDescription(REFS) + +pipeline { + agent { + kubernetes { + namespace K8S_NAMESPACE + yamlFile POD_TEMPLATE_FILE + defaultContainer 'runner' + } + } + environment { + FILE_SERVER_URL = 'http://fileserver.pingcap.net' + } + options { + timeout(time: 50, unit: 'MINUTES') + parallelsAlwaysFailFast() + skipDefaultCheckout() + } + stages { + stage('Checkout') { + options { timeout(time: 5, unit: 'MINUTES') } + steps { + dir(REFS.repo) { + cache(path: "./", includes: '**/*', key: prow.getCacheKey('git', REFS), restoreKeys: prow.getRestoreKeys('git', REFS)) { + retry(2) { + script { + prow.checkoutRefs(REFS) + } + } + } + } + } + } + stage('Prepare') { + steps { + dir(REFS.repo) { + sh label: 'Prepare tikv-server', script: 'make release' + } + dir('bin') { + script { + component.fetchAndExtractArtifact(FILE_SERVER_URL, 'pd', REFS.base_ref, REFS.pulls[0].title, 'centos7/pd-server.tar.gz', 'bin') + } + script { + component.fetchAndExtractArtifact(FILE_SERVER_URL, 'tikv', REFS.base_ref, REFS.pulls[0].title, 'centos7/tikv-server.tar.gz', 'bin') + } + script { + component.fetchAndExtractArtifact(FILE_SERVER_URL, 'tidb', REFS.base_ref, REFS.pulls[0].title, 'centos7/tidb-server.tar.gz', 'bin') + } + } + } + } + stage('Tests') { + stages{ + stage('copr test') { + options { timeout(time: 30, unit: 'MINUTES') } + steps { + dir('tidb') { + cache(path: "./", includes: '**/*', key: "git/pingcap/tidb/rev-${REFS.pulls[0].sha}", restoreKeys: ['git/pingcap/tidb/rev-']) { + retry(2) { + script { + component.checkoutSupportBatch('https://github.com/pingcap/tidb.git', 'tidb', REFS.base_ref, REFS.pulls[0].title, REFS, GIT_CREDENTIALS_ID) + } + } + } + } + dir('copr-test') { + cache(path: "./", includes: '**/*', key: "git/tikv/copr-test/rev-${REFS.pulls[0].sha}", restoreKeys: ['git/tikv/copr-test/rev-']) { + retry(2) { + script { + component.checkoutSupportBatch('https://github.com/tikv/copr-test.git', 'copr-test', REFS.base_ref, REFS.pulls[0].title, REFS, GIT_CREDENTIALS_ID) + } + } + } + container('golang') { + sh label: 'Push Down Test', script: ''' + pd_bin=${WORKSPACE}/bin/pd-server \ + tikv_bin=${WORKSPACE}/tikv/bin/tikv-server \ + tidb_src_dir=${WORKSPACE}/tidb \ + make push-down-test + ''' + } + } + } + post { + failure { + echo "TODO: archive logs" + } + } + } + stage('compatible test') { + steps { + dir("tidb-test") { + cache(path: "./", includes: '**/*', key: "git/PingCAP-QE/tidb-test/rev-${REFS.pulls[0].sha}", restoreKeys: ['git/PingCAP-QE/tidb-test/rev-']) { + retry(2) { + script { + component.checkoutSupportBatch('git@github.com:PingCAP-QE/tidb-test.git', 'tidb-test', REFS.base_ref, REFS.pulls[0].title, REFS, GIT_CREDENTIALS_ID) + } + } + } + } + container('golang') { + dir('tidb-test/compatible_test') { + sh label: 'compile test binary', script: './build.sh' + sh label: 'run test', script: ''' + chmod +x ${WORKSPACE}/scripts/tikv/tikv/run_compatible_tests.sh + + TIKV_PATH="${WORKSPACE}/tikv/bin/tikv-server" \ + TIDB_PATH="${WORKSPACE}/bin/tidb-server" \ + PD_PATH="${WORKSPACE}/bin/pd-server" \ + OLD_BINARY="${WORKSPACE}/bin/tikv-server" \ + ${WORKSPACE}/scripts/tikv/tikv/run_compatible_tests.sh + ''' + } + } + } + post { + failure { + echo "TODO: archive logs" + } + } + } + } + } + } +} diff --git a/pipelines/tikv/tikv/release-7.1/pull_integration_test.yaml b/pipelines/tikv/tikv/release-7.1/pull_integration_test.yaml new file mode 100644 index 0000000000..3ed11fcc04 --- /dev/null +++ b/pipelines/tikv/tikv/release-7.1/pull_integration_test.yaml @@ -0,0 +1,39 @@ +apiVersion: v1 +kind: Pod +spec: + containers: + - name: runner + image: "hub.pingcap.net/jenkins/tikv-cached-release-7.1:latest" + tty: true + resources: + requests: + memory: 8Gi + cpu: "6" + limits: + memory: 32Gi + cpu: "16" + securityContext: + privileged: true + - name: golang + image: hub.pingcap.net/jenkins/centos7_golang-1.20:latest + tty: true + resources: + requests: + memory: 8Gi + cpu: '4' + limits: + memory: 32Gi + cpu: "16" + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/arch + operator: In + values: + - amd64 + - key: ci-nvme-high-performance + operator: In + values: + - "true" diff --git a/pipelines/tikv/tikv/release-7.5/pull_integration_test.groovy b/pipelines/tikv/tikv/release-7.5/pull_integration_test.groovy new file mode 100644 index 0000000000..8e466014ec --- /dev/null +++ b/pipelines/tikv/tikv/release-7.5/pull_integration_test.groovy @@ -0,0 +1,133 @@ +// 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-tikv" +final GIT_CREDENTIALS_ID = 'github-sre-bot-ssh' +final POD_TEMPLATE_FILE = 'pipelines/tikv/tikv/release-7.5/pod-pull_integration_test.yaml' +final REFS = readJSON(text: params.JOB_SPEC).refs +prow.setPRDescription(REFS) + +pipeline { + agent { + kubernetes { + namespace K8S_NAMESPACE + yamlFile POD_TEMPLATE_FILE + defaultContainer 'runner' + } + } + environment { + FILE_SERVER_URL = 'http://fileserver.pingcap.net' + } + options { + timeout(time: 50, unit: 'MINUTES') + parallelsAlwaysFailFast() + skipDefaultCheckout() + } + stages { + stage('Checkout') { + options { timeout(time: 5, unit: 'MINUTES') } + steps { + dir(REFS.repo) { + cache(path: "./", includes: '**/*', key: prow.getCacheKey('git', REFS), restoreKeys: prow.getRestoreKeys('git', REFS)) { + retry(2) { + script { + prow.checkoutRefs(REFS) + } + } + } + } + } + } + stage('Prepare') { + steps { + dir(REFS.repo) { + sh label: 'Prepare tikv-server', script: 'make release' + } + dir('bin') { + script { + component.fetchAndExtractArtifact(FILE_SERVER_URL, 'pd', REFS.base_ref, REFS.pulls[0].title, 'centos7/pd-server.tar.gz', 'bin') + } + script { + component.fetchAndExtractArtifact(FILE_SERVER_URL, 'tikv', REFS.base_ref, REFS.pulls[0].title, 'centos7/tikv-server.tar.gz', 'bin') + } + script { + component.fetchAndExtractArtifact(FILE_SERVER_URL, 'tidb', REFS.base_ref, REFS.pulls[0].title, 'centos7/tidb-server.tar.gz', 'bin') + } + } + } + } + stage('Tests') { + stages{ + stage('copr test') { + options { timeout(time: 30, unit: 'MINUTES') } + steps { + dir('tidb') { + cache(path: "./", includes: '**/*', key: "git/pingcap/tidb/rev-${REFS.pulls[0].sha}", restoreKeys: ['git/pingcap/tidb/rev-']) { + retry(2) { + script { + component.checkoutSupportBatch('https://github.com/pingcap/tidb.git', 'tidb', REFS.base_ref, REFS.pulls[0].title, REFS, GIT_CREDENTIALS_ID) + } + } + } + } + dir('copr-test') { + cache(path: "./", includes: '**/*', key: "git/tikv/copr-test/rev-${REFS.pulls[0].sha}", restoreKeys: ['git/tikv/copr-test/rev-']) { + retry(2) { + script { + component.checkoutSupportBatch('https://github.com/tikv/copr-test.git', 'copr-test', REFS.base_ref, REFS.pulls[0].title, REFS, GIT_CREDENTIALS_ID) + } + } + } + container('golang') { + sh label: 'Push Down Test', script: ''' + pd_bin=${WORKSPACE}/bin/pd-server \ + tikv_bin=${WORKSPACE}/tikv/bin/tikv-server \ + tidb_src_dir=${WORKSPACE}/tidb \ + make push-down-test + ''' + } + } + } + post { + failure { + echo "TODO: archive logs" + } + } + } + stage('compatible test') { + steps { + dir("tidb-test") { + cache(path: "./", includes: '**/*', key: "git/PingCAP-QE/tidb-test/rev-${REFS.pulls[0].sha}", restoreKeys: ['git/PingCAP-QE/tidb-test/rev-']) { + retry(2) { + script { + component.checkoutSupportBatch('git@github.com:PingCAP-QE/tidb-test.git', 'tidb-test', REFS.base_ref, REFS.pulls[0].title, REFS, GIT_CREDENTIALS_ID) + } + } + } + } + container('golang') { + dir('tidb-test/compatible_test') { + sh label: 'compile test binary', script: './build.sh' + sh label: 'run test', script: ''' + chmod +x ${WORKSPACE}/scripts/tikv/tikv/run_compatible_tests.sh + + TIKV_PATH="${WORKSPACE}/tikv/bin/tikv-server" \ + TIDB_PATH="${WORKSPACE}/bin/tidb-server" \ + PD_PATH="${WORKSPACE}/bin/pd-server" \ + OLD_BINARY="${WORKSPACE}/bin/tikv-server" \ + ${WORKSPACE}/scripts/tikv/tikv/run_compatible_tests.sh + ''' + } + } + } + post { + failure { + echo "TODO: archive logs" + } + } + } + } + } + } +} diff --git a/pipelines/tikv/tikv/release-7.5/pull_integration_test.yaml b/pipelines/tikv/tikv/release-7.5/pull_integration_test.yaml new file mode 100644 index 0000000000..fbaab2fa5b --- /dev/null +++ b/pipelines/tikv/tikv/release-7.5/pull_integration_test.yaml @@ -0,0 +1,39 @@ +apiVersion: v1 +kind: Pod +spec: + containers: + - name: runner + image: "hub.pingcap.net/jenkins/tikv-cached-release-7.5:latest" + tty: true + resources: + requests: + memory: 8Gi + cpu: "6" + limits: + memory: 32Gi + cpu: "16" + securityContext: + privileged: true + - name: golang + image: hub.pingcap.net/jenkins/centos7_golang-1.21:latest + tty: true + resources: + requests: + memory: 8Gi + cpu: '4' + limits: + memory: 32Gi + cpu: "16" + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/arch + operator: In + values: + - amd64 + - key: ci-nvme-high-performance + operator: In + values: + - "true" diff --git a/pipelines/tikv/tikv/release-8.1/pull_integration_test.groovy b/pipelines/tikv/tikv/release-8.1/pull_integration_test.groovy new file mode 100644 index 0000000000..81662a2e9e --- /dev/null +++ b/pipelines/tikv/tikv/release-8.1/pull_integration_test.groovy @@ -0,0 +1,133 @@ +// 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-tikv" +final GIT_CREDENTIALS_ID = 'github-sre-bot-ssh' +final POD_TEMPLATE_FILE = 'pipelines/tikv/tikv/release-8.1/pod-pull_integration_test.yaml' +final REFS = readJSON(text: params.JOB_SPEC).refs +prow.setPRDescription(REFS) + +pipeline { + agent { + kubernetes { + namespace K8S_NAMESPACE + yamlFile POD_TEMPLATE_FILE + defaultContainer 'runner' + } + } + environment { + FILE_SERVER_URL = 'http://fileserver.pingcap.net' + } + options { + timeout(time: 50, unit: 'MINUTES') + parallelsAlwaysFailFast() + skipDefaultCheckout() + } + stages { + stage('Checkout') { + options { timeout(time: 5, unit: 'MINUTES') } + steps { + dir(REFS.repo) { + cache(path: "./", includes: '**/*', key: prow.getCacheKey('git', REFS), restoreKeys: prow.getRestoreKeys('git', REFS)) { + retry(2) { + script { + prow.checkoutRefs(REFS) + } + } + } + } + } + } + stage('Prepare') { + steps { + dir(REFS.repo) { + sh label: 'Prepare tikv-server', script: 'make release' + } + dir('bin') { + script { + component.fetchAndExtractArtifact(FILE_SERVER_URL, 'pd', REFS.base_ref, REFS.pulls[0].title, 'centos7/pd-server.tar.gz', 'bin') + } + script { + component.fetchAndExtractArtifact(FILE_SERVER_URL, 'tikv', REFS.base_ref, REFS.pulls[0].title, 'centos7/tikv-server.tar.gz', 'bin') + } + script { + component.fetchAndExtractArtifact(FILE_SERVER_URL, 'tidb', REFS.base_ref, REFS.pulls[0].title, 'centos7/tidb-server.tar.gz', 'bin') + } + } + } + } + stage('Tests') { + stages{ + stage('copr test') { + options { timeout(time: 30, unit: 'MINUTES') } + steps { + dir('tidb') { + cache(path: "./", includes: '**/*', key: "git/pingcap/tidb/rev-${REFS.pulls[0].sha}", restoreKeys: ['git/pingcap/tidb/rev-']) { + retry(2) { + script { + component.checkoutSupportBatch('https://github.com/pingcap/tidb.git', 'tidb', REFS.base_ref, REFS.pulls[0].title, REFS, GIT_CREDENTIALS_ID) + } + } + } + } + dir('copr-test') { + cache(path: "./", includes: '**/*', key: "git/tikv/copr-test/rev-${REFS.pulls[0].sha}", restoreKeys: ['git/tikv/copr-test/rev-']) { + retry(2) { + script { + component.checkoutSupportBatch('https://github.com/tikv/copr-test.git', 'copr-test', REFS.base_ref, REFS.pulls[0].title, REFS, GIT_CREDENTIALS_ID) + } + } + } + container('golang') { + sh label: 'Push Down Test', script: ''' + pd_bin=${WORKSPACE}/bin/pd-server \ + tikv_bin=${WORKSPACE}/tikv/bin/tikv-server \ + tidb_src_dir=${WORKSPACE}/tidb \ + make push-down-test + ''' + } + } + } + post { + failure { + echo "TODO: archive logs" + } + } + } + stage('compatible test') { + steps { + dir("tidb-test") { + cache(path: "./", includes: '**/*', key: "git/PingCAP-QE/tidb-test/rev-${REFS.pulls[0].sha}", restoreKeys: ['git/PingCAP-QE/tidb-test/rev-']) { + retry(2) { + script { + component.checkoutSupportBatch('git@github.com:PingCAP-QE/tidb-test.git', 'tidb-test', REFS.base_ref, REFS.pulls[0].title, REFS, GIT_CREDENTIALS_ID) + } + } + } + } + container('golang') { + dir('tidb-test/compatible_test') { + sh label: 'compile test binary', script: './build.sh' + sh label: 'run test', script: ''' + chmod +x ${WORKSPACE}/scripts/tikv/tikv/run_compatible_tests.sh + + TIKV_PATH="${WORKSPACE}/tikv/bin/tikv-server" \ + TIDB_PATH="${WORKSPACE}/bin/tidb-server" \ + PD_PATH="${WORKSPACE}/bin/pd-server" \ + OLD_BINARY="${WORKSPACE}/bin/tikv-server" \ + ${WORKSPACE}/scripts/tikv/tikv/run_compatible_tests.sh + ''' + } + } + } + post { + failure { + echo "TODO: archive logs" + } + } + } + } + } + } +} diff --git a/pipelines/tikv/tikv/release-8.1/pull_integration_test.yaml b/pipelines/tikv/tikv/release-8.1/pull_integration_test.yaml new file mode 100644 index 0000000000..438f3bbed4 --- /dev/null +++ b/pipelines/tikv/tikv/release-8.1/pull_integration_test.yaml @@ -0,0 +1,39 @@ +apiVersion: v1 +kind: Pod +spec: + containers: + - name: runner + image: "hub.pingcap.net/jenkins/tikv-cached-release-8.1:latest" + tty: true + resources: + requests: + memory: 8Gi + cpu: "6" + limits: + memory: 32Gi + cpu: "16" + securityContext: + privileged: true + - name: golang + image: hub.pingcap.net/jenkins/centos7_golang-1.21:latest + tty: true + resources: + requests: + memory: 8Gi + cpu: '4' + limits: + memory: 32Gi + cpu: "16" + affinity: + nodeAffinity: + requiredDuringSchedulingIgnoredDuringExecution: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/arch + operator: In + values: + - amd64 + - key: ci-nvme-high-performance + operator: In + values: + - "true" diff --git a/scripts/tikv/tikv/run_compatible_tests.sh b/scripts/tikv/tikv/run_compatible_tests.sh new file mode 100755 index 0000000000..6cf93bb032 --- /dev/null +++ b/scripts/tikv/tikv/run_compatible_tests.sh @@ -0,0 +1,34 @@ +#! /usr/bin/env bash + +function main() { + cleanup + rm -rf /tmp/tidb + + log_level=debug \ + UPGRADE_PART="tikv" \ + TIKV_PATH="${TIKV_PATH:-bin/tikv-server}" \ + TIDB_PATH="${TIDB_PATH:-bin/tidb-server}" \ + PD_PATH="${PD_PATH:-bin/pd-server}" \ + OLD_BINARY="${OLD_BINARY:-bin/tikv-server-old}" \ + NEW_BINARY="${TIKV_PATH:-bin/tikv-server}" \ + ./test.sh 2>&1 +} + +function cleanup() { + killall -9 -r -q tidb-server + killall -9 -r -q tikv-server + killall -9 -r -q pd-server +} + +exit_code=0 +{ # try block + main "$@" +} || { # catch block + exit_code="$?" # exit code of last command which is 44 +} +# finally block: +cleanup + +if [[ "$exit_code" != '0' ]]; then + exit ${exit_code} +fi From 284f6e41e17f421c9de32e6749b1785878c0e50b Mon Sep 17 00:00:00 2001 From: wuhuizuo Date: Wed, 7 Aug 2024 18:05:43 +0800 Subject: [PATCH 5/6] fix(script/pingcap/tidb): fix try cache exit code judging in scripts Signed-off-by: wuhuizuo --- pipelines/tikv/tikv/release-8.2/pull_unit_test.groovy | 3 +-- scripts/pingcap/tidb/integrationtest.sh | 2 +- scripts/pingcap/tidb/integrationtest_v2.sh | 2 +- scripts/pingcap/tidb/integrationtest_with_tikv.sh | 2 +- scripts/pingcap/tidb/run_real_tikv_tests.sh | 2 +- scripts/pingcap/tidb/run_real_tikv_tests_with_gotest.sh | 2 +- 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/pipelines/tikv/tikv/release-8.2/pull_unit_test.groovy b/pipelines/tikv/tikv/release-8.2/pull_unit_test.groovy index 5851a81e4b..08a2332839 100644 --- a/pipelines/tikv/tikv/release-8.2/pull_unit_test.groovy +++ b/pipelines/tikv/tikv/release-8.2/pull_unit_test.groovy @@ -7,7 +7,6 @@ final GIT_CREDENTIALS_ID = 'github-sre-bot-ssh' final GIT_FULL_REPO_NAME = 'tikv/tikv' final POD_TEMPLATE_FILE = 'pipelines/tikv/tikv/release-8.2/pod-pull_unit_test.yaml' final REFS = readJSON(text: params.JOB_SPEC).refs - final EXTRA_NEXTEST_ARGS = "-j 8" @@ -44,7 +43,7 @@ pipeline { container(name: 'net-tool') { sh 'dig github.com' script { - currentBuild.description = "PR #${REFS.pulls[0].number}: ${REFS.pulls[0].title} ${REFS.pulls[0].link}" + prow.setPRDescription(REFS) } } } diff --git a/scripts/pingcap/tidb/integrationtest.sh b/scripts/pingcap/tidb/integrationtest.sh index 1fde151620..69832f7ee3 100755 --- a/scripts/pingcap/tidb/integrationtest.sh +++ b/scripts/pingcap/tidb/integrationtest.sh @@ -54,6 +54,6 @@ exit_code=0 # finally block: cleanup -if [[ "exit_code" != '0' ]]; then +if [[ "$exit_code" != '0' ]]; then exit ${exit_code} fi diff --git a/scripts/pingcap/tidb/integrationtest_v2.sh b/scripts/pingcap/tidb/integrationtest_v2.sh index c2780d262a..a544d326a2 100755 --- a/scripts/pingcap/tidb/integrationtest_v2.sh +++ b/scripts/pingcap/tidb/integrationtest_v2.sh @@ -54,6 +54,6 @@ exit_code=0 # finally block: cleanup -if [[ "exit_code" != '0' ]]; then +if [[ "$exit_code" != '0' ]]; then exit ${exit_code} fi diff --git a/scripts/pingcap/tidb/integrationtest_with_tikv.sh b/scripts/pingcap/tidb/integrationtest_with_tikv.sh index 9877c5ddc1..af327dc501 100755 --- a/scripts/pingcap/tidb/integrationtest_with_tikv.sh +++ b/scripts/pingcap/tidb/integrationtest_with_tikv.sh @@ -56,6 +56,6 @@ exit_code=0 # finally block: cleanup -if [[ "exit_code" != '0' ]]; then +if [[ "$exit_code" != '0' ]]; then exit ${exit_code} fi diff --git a/scripts/pingcap/tidb/run_real_tikv_tests.sh b/scripts/pingcap/tidb/run_real_tikv_tests.sh index 6a547c73af..5ab03f337b 100755 --- a/scripts/pingcap/tidb/run_real_tikv_tests.sh +++ b/scripts/pingcap/tidb/run_real_tikv_tests.sh @@ -42,6 +42,6 @@ exit_code=0 # finally block: cleanup -if [[ "exit_code" != '0' ]]; then +if [[ "$exit_code" != '0' ]]; then exit ${exit_code} fi diff --git a/scripts/pingcap/tidb/run_real_tikv_tests_with_gotest.sh b/scripts/pingcap/tidb/run_real_tikv_tests_with_gotest.sh index c9a1c13ea3..607a612f12 100755 --- a/scripts/pingcap/tidb/run_real_tikv_tests_with_gotest.sh +++ b/scripts/pingcap/tidb/run_real_tikv_tests_with_gotest.sh @@ -42,6 +42,6 @@ exit_code=0 # finally block: cleanup -if [[ "exit_code" != '0' ]]; then +if [[ "$exit_code" != '0' ]]; then exit ${exit_code} fi From c6595d64ca122b92c56aca86885097b4a3c8ed33 Mon Sep 17 00:00:00 2001 From: wuhuizuo Date: Wed, 7 Aug 2024 18:11:19 +0800 Subject: [PATCH 6/6] refactor(tikv/tikv): combine copr test with compatibility test Signed-off-by: wuhuizuo --- ...pull_integration_compatibility_test.groovy | 41 ------------------- ...st.groovy => pull_integration_test.groovy} | 0 ...pull_integration_compatibility_test.groovy | 41 ------------------- ...st.groovy => pull_integration_test.groovy} | 0 ...pull_integration_compatibility_test.groovy | 41 ------------------- ...st.groovy => pull_integration_test.groovy} | 0 ...pull_integration_compatibility_test.groovy | 41 ------------------- ...st.groovy => pull_integration_test.groovy} | 0 ...pull_integration_compatibility_test.groovy | 41 ------------------- ...st.groovy => pull_integration_test.groovy} | 0 ...pull_integration_compatibility_test.groovy | 41 ------------------- ...st.groovy => pull_integration_test.groovy} | 0 prow-jobs/tikv/tikv/latest-presubmits.yaml | 18 ++------ .../tikv/tikv/release-6.1-presubmits.yaml | 18 ++------ .../tikv/tikv/release-6.5-presubmits.yaml | 18 ++------ .../tikv/tikv/release-7.1-presubmits.yaml | 18 ++------ .../tikv/tikv/release-7.5-presubmits.yaml | 18 ++------ .../tikv/tikv/release-8.1-presubmits.yaml | 18 ++------ 18 files changed, 24 insertions(+), 330 deletions(-) delete mode 100644 jobs/tikv/tikv/latest/pull_integration_compatibility_test.groovy rename jobs/tikv/tikv/latest/{pull_integration_copr_test.groovy => pull_integration_test.groovy} (100%) delete mode 100644 jobs/tikv/tikv/release-6.1/pull_integration_compatibility_test.groovy rename jobs/tikv/tikv/release-6.1/{pull_integration_copr_test.groovy => pull_integration_test.groovy} (100%) delete mode 100644 jobs/tikv/tikv/release-6.5/pull_integration_compatibility_test.groovy rename jobs/tikv/tikv/release-6.5/{pull_integration_copr_test.groovy => pull_integration_test.groovy} (100%) delete mode 100644 jobs/tikv/tikv/release-7.1/pull_integration_compatibility_test.groovy rename jobs/tikv/tikv/release-7.1/{pull_integration_copr_test.groovy => pull_integration_test.groovy} (100%) delete mode 100644 jobs/tikv/tikv/release-7.5/pull_integration_compatibility_test.groovy rename jobs/tikv/tikv/release-7.5/{pull_integration_copr_test.groovy => pull_integration_test.groovy} (100%) delete mode 100644 jobs/tikv/tikv/release-8.1/pull_integration_compatibility_test.groovy rename jobs/tikv/tikv/release-8.1/{pull_integration_copr_test.groovy => pull_integration_test.groovy} (100%) diff --git a/jobs/tikv/tikv/latest/pull_integration_compatibility_test.groovy b/jobs/tikv/tikv/latest/pull_integration_compatibility_test.groovy deleted file mode 100644 index 036c137f3d..0000000000 --- a/jobs/tikv/tikv/latest/pull_integration_compatibility_test.groovy +++ /dev/null @@ -1,41 +0,0 @@ -// REF: https:///plugin/job-dsl/api-viewer/index.html -final folder = 'tikv/tikv' -final jobName = 'pull_integration_compatibility_test' - -pipelineJob("${folder}/${jobName}") { - 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/tikv") - } - - definition { - cpsScm { - lightweight(true) - scriptPath("pipelines/${folder}/latest/${jobName}.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/tikv/latest/pull_integration_copr_test.groovy b/jobs/tikv/tikv/latest/pull_integration_test.groovy similarity index 100% rename from jobs/tikv/tikv/latest/pull_integration_copr_test.groovy rename to jobs/tikv/tikv/latest/pull_integration_test.groovy diff --git a/jobs/tikv/tikv/release-6.1/pull_integration_compatibility_test.groovy b/jobs/tikv/tikv/release-6.1/pull_integration_compatibility_test.groovy deleted file mode 100644 index 7e9cbfa21a..0000000000 --- a/jobs/tikv/tikv/release-6.1/pull_integration_compatibility_test.groovy +++ /dev/null @@ -1,41 +0,0 @@ -// REF: https:///plugin/job-dsl/api-viewer/index.html -final folder = 'tikv/tikv/release-6.1' -final jobName = 'pull_integration_compatibility_test' - -pipelineJob("${folder}/${jobName}") { - 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/tikv") - } - - definition { - cpsScm { - lightweight(true) - scriptPath("pipelines/${folder}/${jobName}.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/tikv/release-6.1/pull_integration_copr_test.groovy b/jobs/tikv/tikv/release-6.1/pull_integration_test.groovy similarity index 100% rename from jobs/tikv/tikv/release-6.1/pull_integration_copr_test.groovy rename to jobs/tikv/tikv/release-6.1/pull_integration_test.groovy diff --git a/jobs/tikv/tikv/release-6.5/pull_integration_compatibility_test.groovy b/jobs/tikv/tikv/release-6.5/pull_integration_compatibility_test.groovy deleted file mode 100644 index f7a87147c5..0000000000 --- a/jobs/tikv/tikv/release-6.5/pull_integration_compatibility_test.groovy +++ /dev/null @@ -1,41 +0,0 @@ -// REF: https:///plugin/job-dsl/api-viewer/index.html -final folder = 'tikv/tikv/release-6.5' -final jobName = 'pull_integration_compatibility_test' - -pipelineJob("${folder}/${jobName}") { - 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/tikv") - } - - definition { - cpsScm { - lightweight(true) - scriptPath("pipelines/${folder}/${jobName}.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/tikv/release-6.5/pull_integration_copr_test.groovy b/jobs/tikv/tikv/release-6.5/pull_integration_test.groovy similarity index 100% rename from jobs/tikv/tikv/release-6.5/pull_integration_copr_test.groovy rename to jobs/tikv/tikv/release-6.5/pull_integration_test.groovy diff --git a/jobs/tikv/tikv/release-7.1/pull_integration_compatibility_test.groovy b/jobs/tikv/tikv/release-7.1/pull_integration_compatibility_test.groovy deleted file mode 100644 index 2ad8fc8eb7..0000000000 --- a/jobs/tikv/tikv/release-7.1/pull_integration_compatibility_test.groovy +++ /dev/null @@ -1,41 +0,0 @@ -// REF: https:///plugin/job-dsl/api-viewer/index.html -final folder = 'tikv/tikv/release-7.1' -final jobName = 'pull_integration_compatibility_test' - -pipelineJob("${folder}/${jobName}") { - 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/tikv") - } - - definition { - cpsScm { - lightweight(true) - scriptPath("pipelines/${folder}/${jobName}.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/tikv/release-7.1/pull_integration_copr_test.groovy b/jobs/tikv/tikv/release-7.1/pull_integration_test.groovy similarity index 100% rename from jobs/tikv/tikv/release-7.1/pull_integration_copr_test.groovy rename to jobs/tikv/tikv/release-7.1/pull_integration_test.groovy diff --git a/jobs/tikv/tikv/release-7.5/pull_integration_compatibility_test.groovy b/jobs/tikv/tikv/release-7.5/pull_integration_compatibility_test.groovy deleted file mode 100644 index 9167d554b0..0000000000 --- a/jobs/tikv/tikv/release-7.5/pull_integration_compatibility_test.groovy +++ /dev/null @@ -1,41 +0,0 @@ -// REF: https:///plugin/job-dsl/api-viewer/index.html -final folder = 'tikv/tikv/release-7.5' -final jobName = 'pull_integration_compatibility_test' - -pipelineJob("${folder}/${jobName}") { - 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/tikv") - } - - definition { - cpsScm { - lightweight(true) - scriptPath("pipelines/${folder}/${jobName}.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/tikv/release-7.5/pull_integration_copr_test.groovy b/jobs/tikv/tikv/release-7.5/pull_integration_test.groovy similarity index 100% rename from jobs/tikv/tikv/release-7.5/pull_integration_copr_test.groovy rename to jobs/tikv/tikv/release-7.5/pull_integration_test.groovy diff --git a/jobs/tikv/tikv/release-8.1/pull_integration_compatibility_test.groovy b/jobs/tikv/tikv/release-8.1/pull_integration_compatibility_test.groovy deleted file mode 100644 index 8a2618ae24..0000000000 --- a/jobs/tikv/tikv/release-8.1/pull_integration_compatibility_test.groovy +++ /dev/null @@ -1,41 +0,0 @@ -// REF: https:///plugin/job-dsl/api-viewer/index.html -final folder = 'tikv/tikv/release-8.1' -final jobName = 'pull_integration_compatibility_test' - -pipelineJob("${folder}/${jobName}") { - 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/tikv") - } - - definition { - cpsScm { - lightweight(true) - scriptPath("pipelines/${folder}/${jobName}.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/tikv/release-8.1/pull_integration_copr_test.groovy b/jobs/tikv/tikv/release-8.1/pull_integration_test.groovy similarity index 100% rename from jobs/tikv/tikv/release-8.1/pull_integration_copr_test.groovy rename to jobs/tikv/tikv/release-8.1/pull_integration_test.groovy diff --git a/prow-jobs/tikv/tikv/latest-presubmits.yaml b/prow-jobs/tikv/tikv/latest-presubmits.yaml index 8d584e0538..e62a46ffab 100644 --- a/prow-jobs/tikv/tikv/latest-presubmits.yaml +++ b/prow-jobs/tikv/tikv/latest-presubmits.yaml @@ -16,23 +16,13 @@ presubmits: trigger: "(?m)^/test (?:.*? )?pull-unit-test(?: .*?)?$" rerun_command: "/test pull-unit-test" branches: *branches - - name: tikv/tikv/pull_integration_copr_test + - name: tikv/tikv/pull_integration_test agent: jenkins decorate: false # need add this. always_run: false # update here after test passed optional: true # update here after test passed skip_report: true # update here after test passed - context: wip/pull-integration-copr-test - trigger: "(?m)^/debug (?:.*? )?pull-integration-copr-test(?: .*?)?$" - rerun_command: "/debug pull-integration-copr-test" - branches: *branches - - name: tikv/tikv/pull_integration_compatibility_test - agent: jenkins - decorate: false # need add this. - always_run: false # update here after test passed - optional: true # update here after test passed - skip_report: true # update here after test passed - context: wip/pull-integration-compatibility-test - trigger: "(?m)^/debug (?:.*? )?pull-integration-compatibility-test(?: .*?)?$" - rerun_command: "/debug pull-integration-compatibility-test" + context: wip/pull-integration-test + trigger: "(?m)^/debug (?:.*? )?pull-integration-test(?: .*?)?$" + rerun_command: "/debug pull-integration-test" branches: *branches diff --git a/prow-jobs/tikv/tikv/release-6.1-presubmits.yaml b/prow-jobs/tikv/tikv/release-6.1-presubmits.yaml index 0ce3a10aed..be68cdc7b0 100644 --- a/prow-jobs/tikv/tikv/release-6.1-presubmits.yaml +++ b/prow-jobs/tikv/tikv/release-6.1-presubmits.yaml @@ -15,23 +15,13 @@ presubmits: trigger: "(?m)^/debug (?:.*? )?pull-unit-test(?: .*?)?$" rerun_command: "/debug pull-unit-test" branches: *branches - - name: tikv/tikv/release-6.1/pull_integration_copr_test + - name: tikv/tikv/release-6.1/pull_integration_test agent: jenkins decorate: false # need add this. always_run: false # update here after test passed optional: true # update here after test passed skip_report: true # update here after test passed - context: wip/pull-integration-copr-test - trigger: "(?m)^/debug (?:.*? )?pull-integration-copr-test(?: .*?)?$" - rerun_command: "/debug pull-integration-copr-test" - branches: *branches - - name: tikv/tikv/release-6.1/pull_integration_compatibility_test - agent: jenkins - decorate: false # need add this. - always_run: false # update here after test passed - optional: true # update here after test passed - skip_report: true # update here after test passed - context: wip/pull-integration-compatibility-test - trigger: "(?m)^/debug (?:.*? )?pull-integration-compatibility-test(?: .*?)?$" - rerun_command: "/debug pull-integration-compatibility-test" + context: wip/pull-integration-test + trigger: "(?m)^/debug (?:.*? )?pull-integration-test(?: .*?)?$" + rerun_command: "/debug pull-integration-test" branches: *branches diff --git a/prow-jobs/tikv/tikv/release-6.5-presubmits.yaml b/prow-jobs/tikv/tikv/release-6.5-presubmits.yaml index c785c2ef61..ac393d417a 100644 --- a/prow-jobs/tikv/tikv/release-6.5-presubmits.yaml +++ b/prow-jobs/tikv/tikv/release-6.5-presubmits.yaml @@ -15,23 +15,13 @@ presubmits: trigger: "(?m)^/debug (?:.*? )?pull-unit-test(?: .*?)?$" rerun_command: "/debug pull-unit-test" branches: *branches - - name: tikv/tikv/release-6.5/pull_integration_copr_test + - name: tikv/tikv/release-6.5/pull_integration_test agent: jenkins decorate: false # need add this. always_run: false # update here after test passed optional: true # update here after test passed skip_report: true # update here after test passed - context: wip/pull-integration-copr-test - trigger: "(?m)^/debug (?:.*? )?pull-integration-copr-test(?: .*?)?$" - rerun_command: "/debug pull-integration-copr-test" - branches: *branches - - name: tikv/tikv/release-6.5/pull_integration_compatibility_test - agent: jenkins - decorate: false # need add this. - always_run: false # update here after test passed - optional: true # update here after test passed - skip_report: true # update here after test passed - context: wip/pull-integration-compatibility-test - trigger: "(?m)^/debug (?:.*? )?pull-integration-compatibility-test(?: .*?)?$" - rerun_command: "/debug pull-integration-compatibility-test" + context: wip/pull-integration-test + trigger: "(?m)^/debug (?:.*? )?pull-integration-test(?: .*?)?$" + rerun_command: "/debug pull-integration-test" branches: *branches diff --git a/prow-jobs/tikv/tikv/release-7.1-presubmits.yaml b/prow-jobs/tikv/tikv/release-7.1-presubmits.yaml index e6a3ec96b2..715b66274d 100644 --- a/prow-jobs/tikv/tikv/release-7.1-presubmits.yaml +++ b/prow-jobs/tikv/tikv/release-7.1-presubmits.yaml @@ -15,23 +15,13 @@ presubmits: trigger: "(?m)^/debug (?:.*? )?pull-unit-test(?: .*?)?$" rerun_command: "/debug pull-unit-test" branches: *branches - - name: tikv/tikv/release-7.1/pull_integration_copr_test + - name: tikv/tikv/release-7.1/pull_integration_test agent: jenkins decorate: false # need add this. always_run: false # update here after test passed optional: true # update here after test passed skip_report: true # update here after test passed - context: wip/pull-integration-copr-test - trigger: "(?m)^/debug (?:.*? )?pull-integration-copr-test(?: .*?)?$" - rerun_command: "/debug pull-integration-copr-test" - branches: *branches - - name: tikv/tikv/release-7.1/pull_integration_compatibility_test - agent: jenkins - decorate: false # need add this. - always_run: false # update here after test passed - optional: true # update here after test passed - skip_report: true # update here after test passed - context: wip/pull-integration-compatibility-test - trigger: "(?m)^/debug (?:.*? )?pull-integration-compatibility-test(?: .*?)?$" - rerun_command: "/debug pull-integration-compatibility-test" + context: wip/pull-integration-test + trigger: "(?m)^/debug (?:.*? )?pull-integration-test(?: .*?)?$" + rerun_command: "/debug pull-integration-test" branches: *branches diff --git a/prow-jobs/tikv/tikv/release-7.5-presubmits.yaml b/prow-jobs/tikv/tikv/release-7.5-presubmits.yaml index 1d25b55305..3ce6351938 100644 --- a/prow-jobs/tikv/tikv/release-7.5-presubmits.yaml +++ b/prow-jobs/tikv/tikv/release-7.5-presubmits.yaml @@ -15,23 +15,13 @@ presubmits: trigger: "(?m)^/debug (?:.*? )?pull-unit-test(?: .*?)?$" rerun_command: "/debug pull-unit-test" branches: *branches - - name: tikv/tikv/release-7.5/pull_integration_copr_test + - name: tikv/tikv/release-7.5/pull_integration_test agent: jenkins decorate: false # need add this. always_run: false # update here after test passed optional: true # update here after test passed skip_report: true # update here after test passed - context: wip/pull-integration-copr-test - trigger: "(?m)^/debug (?:.*? )?pull-integration-copr-test(?: .*?)?$" - rerun_command: "/debug pull-integration-copr-test" - branches: *branches - - name: tikv/tikv/release-7.5/pull_integration_compatibility_test - agent: jenkins - decorate: false # need add this. - always_run: false # update here after test passed - optional: true # update here after test passed - skip_report: true # update here after test passed - context: wip/pull-integration-compatibility-test - trigger: "(?m)^/debug (?:.*? )?pull-integration-compatibility-test(?: .*?)?$" - rerun_command: "/debug pull-integration-compatibility-test" + context: wip/pull-integration-test + trigger: "(?m)^/debug (?:.*? )?pull-integration-test(?: .*?)?$" + rerun_command: "/debug pull-integration-test" branches: *branches diff --git a/prow-jobs/tikv/tikv/release-8.1-presubmits.yaml b/prow-jobs/tikv/tikv/release-8.1-presubmits.yaml index 72abc47f2b..74d9c4516c 100644 --- a/prow-jobs/tikv/tikv/release-8.1-presubmits.yaml +++ b/prow-jobs/tikv/tikv/release-8.1-presubmits.yaml @@ -15,23 +15,13 @@ presubmits: trigger: "(?m)^/debug (?:.*? )?pull-unit-test(?: .*?)?$" rerun_command: "/debug pull-unit-test" branches: *branches - - name: tikv/tikv/release-8.1/pull_integration_copr_test + - name: tikv/tikv/release-8.1/pull_integration_test agent: jenkins decorate: false # need add this. always_run: false # update here after test passed optional: true # update here after test passed skip_report: true # update here after test passed - context: wip/pull-integration-copr-test - trigger: "(?m)^/debug (?:.*? )?pull-integration-copr-test(?: .*?)?$" - rerun_command: "/debug pull-integration-copr-test" - branches: *branches - - name: tikv/tikv/release-8.1/pull_integration_compatibility_test - agent: jenkins - decorate: false # need add this. - always_run: false # update here after test passed - optional: true # update here after test passed - skip_report: true # update here after test passed - context: wip/pull-integration-compatibility-test - trigger: "(?m)^/debug (?:.*? )?pull-integration-compatibility-test(?: .*?)?$" - rerun_command: "/debug pull-integration-compatibility-test" + context: wip/pull-integration-test + trigger: "(?m)^/debug (?:.*? )?pull-integration-test(?: .*?)?$" + rerun_command: "/debug pull-integration-test" branches: *branches