Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(pingcap/tiflash): add refactored jobs for release-8.1 #3064

Merged
merged 5 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions jobs/pingcap/tiflash/release-8.1/aa_folder.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
folder('pingcap/tiflash/release-8.1') {
description("Folder for pipelines of pingcap/tiflash repo for v8.1")
}
41 changes: 41 additions & 0 deletions jobs/pingcap/tiflash/release-8.1/pull_integration_test.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// REF: https://<your-jenkins-server>/plugin/job-dsl/api-viewer/index.html
final folder = 'pingcap/tiflash/release-8.1'
final jobName = 'pull_integration_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 {
// priority(0) // 0 fast than 1
githubProjectUrl("https://github.com/pingcap/tiflash")
}

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)
}
}
}
}
}
}
}
41 changes: 41 additions & 0 deletions jobs/pingcap/tiflash/release-8.1/pull_unit_test.groovy
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// REF: https://<your-jenkins-server>/plugin/job-dsl/api-viewer/index.html
final folder = 'pingcap/tiflash/release-8.1'
final jobName = 'pull_unit_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 {
// priority(0) // 0 fast than 1
githubProjectUrl("https://github.com/pingcap/tiflash")
}

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)
}
}
}
}
}
}
}
135 changes: 135 additions & 0 deletions pipelines/pingcap/tiflash/release-8.1/pod-pull_build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
apiVersion: v1
kind: Pod
spec:
securityContext:
fsGroup: 1000
containers:
- name: runner
image: "hub.pingcap.net/tiflash/tiflash-llvm-base:amd64-llvmorg-14.0.6"
command:
- "/bin/bash"
- "-c"
- "cat"
tty: true
resources:
requests:
memory: 32Gi
cpu: "12"
limits:
memory: 32Gi
cpu: "12"
volumeMounts:
- mountPath: "/home/jenkins/agent/rust"
name: "volume-0"
readOnly: false
- mountPath: "/home/jenkins/agent/ccache"
name: "volume-1"
readOnly: false
- mountPath: "/home/jenkins/agent/dependency"
name: "volume-2"
readOnly: false
- mountPath: "/home/jenkins/agent/ci-cached-code-daily"
name: "volume-4"
readOnly: false
- mountPath: "/home/jenkins/agent/proxy-cache"
name: "volume-5"
readOnly: false
- mountPath: "/tmp"
name: "volume-6"
readOnly: false
- mountPath: "/tmp-memfs"
name: "volume-7"
readOnly: false
- name: jnlp
image: "jenkins/inbound-agent:3148.v532a_7e715ee3-1"
resources:
requests:
cpu: "500m"
memory: "500Mi"
limits:
cpu: "500m"
memory: "500Mi"
volumeMounts:
- mountPath: "/home/jenkins/agent/rust"
name: "volume-0"
readOnly: false
- mountPath: "/home/jenkins/agent/ccache"
name: "volume-1"
readOnly: false
- mountPath: "/home/jenkins/agent/dependency"
name: "volume-2"
readOnly: false
- mountPath: "/home/jenkins/agent/ci-cached-code-daily"
name: "volume-4"
readOnly: false
- mountPath: "/home/jenkins/agent/proxy-cache"
name: "volume-5"
readOnly: false
- mountPath: "/tmp"
name: "volume-6"
readOnly: false
- mountPath: "/tmp-memfs"
name: "volume-7"
readOnly: false
- name: util
image: hub.pingcap.net/jenkins/ks3util
args: ["sleep", "infinity"]
resources:
requests:
cpu: "500m"
memory: "500Mi"
limits:
cpu: "500m"
memory: "500Mi"
- name: net-tool
image: hub.pingcap.net/jenkins/network-multitool
tty: true
resources:
limits:
memory: 128Mi
cpu: 100m
volumes:
- name: "volume-0"
nfs:
path: "/data/nvme1n1/nfs/tiflash/rust"
readOnly: false
server: "10.2.12.82"
- name: "volume-2"
nfs:
path: "/data/nvme1n1/nfs/tiflash/dependency"
readOnly: true
server: "10.2.12.82"
- name: "volume-1"
nfs:
path: "/data/nvme1n1/nfs/tiflash/ccache"
readOnly: true
server: "10.2.12.82"
- name: "volume-4"
nfs:
path: "/data/nvme1n1/nfs/git"
readOnly: true
server: "10.2.12.82"
- name: "volume-5"
nfs:
path: "/data/nvme1n1/nfs/tiflash/proxy-cache"
readOnly: true
server: "10.2.12.82"
- name: "volume-6"
emptyDir: {}
- name: "volume-7"
emptyDir:
medium: Memory
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- amd64
- key: ci-nvme-high-performance
operator: In
values:
- "true"

Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
apiVersion: "v1"
kind: "Pod"
spec:
containers:
- image: "docker:18.09.6-dind"
imagePullPolicy: "IfNotPresent"
name: "dockerd"
resources:
limits:
memory: "32Gi"
cpu: "16000m"
requests:
memory: "10Gi"
cpu: "5000m"
securityContext:
privileged: true
tty: false
volumeMounts:
- mountPath: "/home/jenkins"
name: "volume-0"
readOnly: false
- mountPath: "/tmp"
name: "volume-3"
readOnly: false
- mountPath: "/home/jenkins/agent"
name: "workspace-volume"
readOnly: false
- command:
- "cat"
env:
- name: "DOCKER_HOST"
value: "tcp://localhost:2375"
image: "hub.pingcap.net/jenkins/docker:build-essential-java"
imagePullPolicy: "Always"
name: "docker"
resources:
requests:
memory: "8Gi"
cpu: "5000m"
tty: true
volumeMounts:
- mountPath: "/home/jenkins"
name: "volume-0"
readOnly: false
- mountPath: "/tmp"
name: "volume-3"
readOnly: false
- mountPath: "/home/jenkins/agent"
name: "workspace-volume"
readOnly: false
- image: "jenkins/inbound-agent:3148.v532a_7e715ee3-1"
name: "jnlp" # TODO: remove this default container
resources:
requests:
memory: "256Mi"
cpu: "100m"
limits:
memory: "256Mi"
cpu: "100m"
volumeMounts:
- mountPath: "/home/jenkins"
name: "volume-0"
readOnly: false
- mountPath: "/tmp"
name: "volume-3"
readOnly: false
- mountPath: "/home/jenkins/agent"
name: "workspace-volume"
readOnly: false
volumes:
- emptyDir:
medium: ""
name: "volume-0"
- emptyDir:
medium: ""
name: "workspace-volume"
- emptyDir:
medium: ""
name: "volume-3"
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: kubernetes.io/arch
operator: In
values:
- amd64
- key: ci-nvme-high-performance
operator: In
values:
- "true"
Loading