We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b2a4e29 commit 8849097Copy full SHA for 8849097
1 file changed
Jenkinsfile
@@ -7,6 +7,10 @@ pipeline {
7
buildDiscarder(logRotator(numToKeepStr: '20'))
8
}
9
10
+ parameters {
11
+ booleanParam(name: 'RUN_TESTS', defaultValue: false, description: '是否执行 Test 阶段;默认跳过以加快构建')
12
+ }
13
+
14
environment {
15
IMAGE = 'tolink-rag'
16
TAG = "${env.GIT_COMMIT?.take(8) ?: env.BUILD_NUMBER}"
@@ -19,6 +23,9 @@ pipeline {
19
23
20
24
21
25
stage('Test') {
26
+ when {
27
+ expression { return params.RUN_TESTS }
28
22
29
agent {
30
// 挂载 pip 缓存到 jenkins_home,跨构建复用已下载的包
31
docker { image 'python:3.11-slim'; args '-v $HOME/.cache/pip:/root/.cache/pip'; reuseNode true }
0 commit comments