ci: auto semver versioning, remove manual params, add demo-service
- Remove VERSION_STRATEGY/CUSTOM_VERSION/CHANGELOG/DEPLOY params - Auto patch-bump from VERSION file (reset to 1.0.0 semver) - Push :VERSION + :latest tags per service for one-click update - Add demo-service to build choices - Always deploy; merge-update versions.json (no web entry overwrite) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
这个提交包含在:
父节点
81dfb2910b
当前提交
5593ad790e
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@ -4,8 +4,8 @@ pipeline {
|
|||||||
parameters {
|
parameters {
|
||||||
choice(
|
choice(
|
||||||
name: 'SERVICE',
|
name: 'SERVICE',
|
||||||
choices: ['all', 'tenant-service', 'im-service', 'push-service', 'update-service', 'file-service', 'license-service'],
|
choices: ['all', 'tenant-service', 'im-service', 'push-service', 'update-service', 'file-service', 'license-service', 'demo-service'],
|
||||||
description: '要构建的服务模块(all = 全部)'
|
description: '要构建的服务模块(all = 全部,包含所有微服务)'
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -58,7 +58,7 @@ pipeline {
|
|||||||
withCredentials([string(credentialsId: 'ACR_PASSWORD', variable: 'ACR_PASS')]) {
|
withCredentials([string(credentialsId: 'ACR_PASSWORD', variable: 'ACR_PASS')]) {
|
||||||
script {
|
script {
|
||||||
def services = params.SERVICE == 'all'
|
def services = params.SERVICE == 'all'
|
||||||
? ['tenant-service', 'im-service', 'push-service', 'update-service', 'file-service', 'license-service']
|
? ['tenant-service', 'im-service', 'push-service', 'update-service', 'file-service', 'license-service', 'demo-service']
|
||||||
: [params.SERVICE]
|
: [params.SERVICE]
|
||||||
|
|
||||||
for (svc in services) {
|
for (svc in services) {
|
||||||
@ -91,7 +91,7 @@ pipeline {
|
|||||||
withCredentials([sshUserPrivateKey(credentialsId: 'PROD_SSH_KEY', keyFileVariable: 'SSH_KEY')]) {
|
withCredentials([sshUserPrivateKey(credentialsId: 'PROD_SSH_KEY', keyFileVariable: 'SSH_KEY')]) {
|
||||||
script {
|
script {
|
||||||
def services = params.SERVICE == 'all'
|
def services = params.SERVICE == 'all'
|
||||||
? ['tenant-service', 'im-service', 'push-service', 'update-service', 'file-service', 'license-service']
|
? ['tenant-service', 'im-service', 'push-service', 'update-service', 'file-service', 'license-service', 'demo-service']
|
||||||
: [params.SERVICE]
|
: [params.SERVICE]
|
||||||
|
|
||||||
for (svc in services) {
|
for (svc in services) {
|
||||||
@ -106,7 +106,7 @@ pipeline {
|
|||||||
|
|
||||||
// Update versions.json on server for deployed services
|
// Update versions.json on server for deployed services
|
||||||
def deployedServices = params.SERVICE == 'all'
|
def deployedServices = params.SERVICE == 'all'
|
||||||
? ['tenant-service', 'im-service', 'push-service', 'update-service', 'file-service', 'license-service']
|
? ['tenant-service', 'im-service', 'push-service', 'update-service', 'file-service', 'license-service', 'demo-service']
|
||||||
: [params.SERVICE]
|
: [params.SERVICE]
|
||||||
def releasedAt = new Date().format("yyyy-MM-dd'T'HH:mm:ss'Z'", TimeZone.getTimeZone('UTC'))
|
def releasedAt = new Date().format("yyyy-MM-dd'T'HH:mm:ss'Z'", TimeZone.getTimeZone('UTC'))
|
||||||
def serviceEntries = deployedServices.collect { svc ->
|
def serviceEntries = deployedServices.collect { svc ->
|
||||||
|
|||||||
正在加载...
在新工单中引用
屏蔽一个用户