diff --git a/jobs/tikv/migration/latest/pull_unit_test.groovy b/jobs/tikv/migration/latest/pull_unit_test.groovy deleted file mode 100644 index 33a34dd4da..0000000000 --- a/jobs/tikv/migration/latest/pull_unit_test.groovy +++ /dev/null @@ -1,39 +0,0 @@ -// REF: https:///plugin/job-dsl/api-viewer/index.html -// For trunk and latest release branches. -pipelineJob('tikv/migration/pull_unit_test') { - logRotator { - daysToKeep(30) - } - parameters { - // Ref: https://docs.prow.k8s.io/docs/jobs/#job-environment-variables - stringParam("BUILD_ID") - stringParam("PROW_JOB_ID") - stringParam("JOB_SPEC") - } - properties { - // priority(0) // 0 fast than 1 - githubProjectUrl("https://github.com/tikv/migration") - } - - definition { - cpsScm { - lightweight(true) - scriptPath("pipelines/tikv/migration/latest/pull_unit_test.groovy") - scm { - git{ - remote { - url('https://github.com/PingCAP-QE/ci.git') - } - branch('main') - extensions { - cloneOptions { - depth(1) - shallow(true) - timeout(5) - } - } - } - } - } - } -} diff --git a/pipelines/tikv/migration/latest/pod-pull_unit_test.yaml b/pipelines/tikv/migration/latest/pod-pull_unit_test.yaml deleted file mode 100644 index 6c4a2696a6..0000000000 --- a/pipelines/tikv/migration/latest/pod-pull_unit_test.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: v1 -kind: Pod -spec: - securityContext: - fsGroup: 1000 - containers: - - name: golang - image: "hub.pingcap.net/jenkins/centos7_golang-1.21:latest" - tty: true - resources: - requests: - memory: 8Gi - cpu: "4" - limits: - memory: 8Gi - cpu: "4" - - name: net-tool - image: hub.pingcap.net/jenkins/network-multitool - tty: true - resources: - limits: - memory: 128Mi - cpu: 100m - - name: report - image: hub.pingcap.net/jenkins/python3-requests:latest - tty: true - resources: - limits: - memory: 256Mi - cpu: 100m - affinity: - nodeAffinity: - requiredDuringSchedulingIgnoredDuringExecution: - nodeSelectorTerms: - - matchExpressions: - - key: kubernetes.io/arch - operator: In - values: - - amd64 diff --git a/pipelines/tikv/migration/latest/pull_unit_test.groovy b/pipelines/tikv/migration/latest/pull_unit_test.groovy deleted file mode 100644 index 2345c6fc84..0000000000 --- a/pipelines/tikv/migration/latest/pull_unit_test.groovy +++ /dev/null @@ -1,83 +0,0 @@ -// REF: https://www.jenkins.io/doc/book/pipeline/syntax/#declarative-pipeline -// Keep small than 400 lines: https://issues.jenkins.io/browse/JENKINS-37984 -// should triggerd for master and latest release branches -@Library('tipipeline') _ - -final K8S_NAMESPACE = "jenkins-tidb" -final GIT_FULL_REPO_NAME = 'tikv/migration' -final GIT_CREDENTIALS_ID = 'github-sre-bot-ssh' -final POD_TEMPLATE_FILE = 'pipelines/tikv/migration/latest/pod-pull_unit_test.yaml' -final REFS = readJSON(text: params.JOB_SPEC).refs - -pipeline { - agent { - kubernetes { - namespace K8S_NAMESPACE - yamlFile POD_TEMPLATE_FILE - defaultContainer 'golang' - } - } - environment { - FILE_SERVER_URL = 'http://fileserver.pingcap.net' - } - options { - timeout(time: 40, unit: 'MINUTES') - parallelsAlwaysFailFast() - skipDefaultCheckout() - } - stages { - stage('Debug info') { - steps { - sh label: 'Debug info', script: """ - printenv - echo "-------------------------" - go env - echo "-------------------------" - echo "debug command: kubectl -n ${K8S_NAMESPACE} exec -ti ${NODE_NAME} bash" - """ - container(name: 'net-tool') { - sh 'dig github.com' - script { - currentBuild.description = "PR #${REFS.pulls[0].number}: ${REFS.pulls[0].title} ${REFS.pulls[0].link}" - } - } - } - } - stage('Checkout') { - options { timeout(time: 5, unit: 'MINUTES') } - steps { - dir("migration") { - cache(path: "./", includes: '**/*', key: prow.getCacheKey('git', REFS), restoreKeys: prow.getRestoreKeys('git', REFS)) { - retry(2) { - script { - prow.checkoutRefs(REFS) - } - } - } - sh """ - git rev-parse --show-toplevel - git status - git status -s . - """ - } - } - } - stage('Unit Tests') { - options { timeout(time: 25, unit: 'MINUTES') } - environment { TIKV_MIGRATION_CODECOV_TOKEN = credentials('codecov-token-tikv-migration') } - steps { - dir('migration') { - sh """#!/usr/bin/env bash - cd cdc/ - make unit_test_in_verify_ci - """ - } - } - post{ - always { - junit(testResults: "**/cdc-junit-report.xml") - } - } - } - } -} diff --git a/prow-jobs/tikv/migration/latest-presubmits.yaml b/prow-jobs/tikv/migration/latest-presubmits.yaml index b755b798b0..68c3026de9 100644 --- a/prow-jobs/tikv/migration/latest-presubmits.yaml +++ b/prow-jobs/tikv/migration/latest-presubmits.yaml @@ -27,16 +27,3 @@ presubmits: - ^main$ - ^cdc-release-.*$ - ^br-release-.*$ - - name: tikv/migration/pull_unit_test - agent: jenkins - labels: - master: "0" - decorate: false # need add this. - always_run: true - context: pull-unit-test - trigger: "(?m)^/test (?:.*? )?pull-unit-test(?: .*?)?$" - rerun_command: "/test pull-unit-test" - branches: - - ^main$ - - ^cdc-release-.*$ - - ^br-release-.*$