From 82c7154abe41e87176bc6b90c51098f82d80bf46 Mon Sep 17 00:00:00 2001
From: fqx <qingxufan0923@163.com>
Date: Tue, 23 Nov 2021 10:13:38 +0800
Subject: [PATCH] Merge branch 'feature'
---
Jenkinsfile | 29 ++++++++++++-----------------
1 files changed, 12 insertions(+), 17 deletions(-)
diff --git a/Jenkinsfile b/Jenkinsfile
index b3d2fef..4fec215 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -2,20 +2,7 @@
@Library('utils')_
pipeline {
agent { label '103' }
- triggers {
- GenericTrigger(
- genericVariables: [
- [key: 'ref', value: '$.ref']
- ],
- causeString: 'Triggered on $ref',
- tokenCredentialId: '6abafc9e-1f0e-4d27-8389-7c81d69bcdb2',
- printContributedVariables: true,
- printPostContent: true,
- silentResponse: false,
- regexpFilterText: '$ref',
- regexpFilterExpression: 'refs/heads/' + BRANCH_NAME
- )
- }
+
environment {
project_name = 'git_study'
url = 'http://47.92.145.232:8998/r/git_study.git'
@@ -24,6 +11,9 @@
options {
//给日志加上时间错, 需安装 Timestamper 插件
timestamps()
+ ansiColor('xterm')
+ //丢弃旧的构建前两个为发布包保留天数(比此早的发布包将被删除,但构建的日志、操作历史、报告等将被保留)和构建个数
+ buildDiscarder logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '7', numToKeepStr: '10')
}
stages {
@@ -47,6 +37,9 @@
stage('version add') {
when {
allOf {
+ not {
+ branch 'master'
+ }
anyOf {
changeset "**/*.js"
changeset "**/*.css"
@@ -60,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