From 5f618132b41bbf2ad55aa75ebecd5e370263008f Mon Sep 17 00:00:00 2001
From: wangzilun <964606955@qq.com>
Date: Mon, 22 Nov 2021 15:01:27 +0800
Subject: [PATCH] 测试
---
Jenkinsfile | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 740fe3d..761a411 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -11,6 +11,7 @@
options {
//给日志加上时间错, 需安装 Timestamper 插件
timestamps()
+ ansiColor('xterm')
}
stages {
stage('source') {
@@ -27,12 +28,16 @@
}
stage('test') {
steps {
- sh 'echo test'
+ sh 'echo ${GIT_BRANCH}'
+ test("${project_name}","${GIT_CREDENTIALS_ID}","${url}","${GIT_BRANCH}")
}
}
stage('version add') {
when {
allOf {
+ not {
+ branch 'master'
+ }
anyOf {
changeset "**/*.js"
changeset "**/*.css"
@@ -46,11 +51,13 @@
}
}
}
- steps {
- versionAdd("${project_name}","${GIT_CREDENTIALS_ID}","${url}","${GIT_BRANCH}")
+ steps{
+ echo "todo add version"
}
+
}
stage('deploy') {
+ when { branch 'master' }
steps {
sh 'echo test'
}
--
Gitblit v1.9.1