From b96eb3dcac5dafb9c535ed1a9458c4ded47f46b7 Mon Sep 17 00:00:00 2001
From: fqx <qingxufan0923@163.com>
Date: Mon, 22 Nov 2021 17:40:02 +0800
Subject: [PATCH] hotfix2
---
Jenkinsfile | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index 7370593..4fec215 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -12,6 +12,9 @@
//给日志加上时间错, 需安装 Timestamper 插件
timestamps()
ansiColor('xterm')
+ //丢弃旧的构建前两个为发布包保留天数(比此早的发布包将被删除,但构建的日志、操作历史、报告等将被保留)和构建个数
+ buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '7', numToKeepStr: '10')
+
}
stages {
stage('source') {
@@ -34,6 +37,9 @@
stage('version add') {
when {
allOf {
+ not {
+ branch 'master'
+ }
anyOf {
changeset "**/*.js"
changeset "**/*.css"
@@ -47,11 +53,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