Skip to content

Commit

Permalink
Merge pull request #37 from DreamPWJ/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
DreamPWJ authored Sep 26, 2023
2 parents a360506 + b193c9b commit ac1fa0b
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 5.1.0
`2023-09-26`
- 新增K8S云原生的灰度发布、金丝雀发布、A/B测试功能
- 新增服务器端渲染SSR部署支持
- 完善Flutter For Web项目流水线

## 5.0.0
`2023-05-09`
- 企业级生产环境的K8S集群流水线大升级
Expand Down
25 changes: 25 additions & 0 deletions _linux/shell/init-disk.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

# Author: 潘维吉
# Description: 初始化磁盘相当于Linux恢复出厂设置 先安装expect,yum -y install expect
# 参考文档: https://segmentfault.com/a/1190000021700495

# 执行 fdisk -l 命令查看磁盘信息
expect<<-EOF
spawn fdisk /dev/sdb //启动进程并并跟踪
expect {
"获取帮助" {send "n\n";exp_continue} //捕捉spawn的输出,匹配到期望字符,则向进程输入字符串
"default p" {send "p\n";exp_continue} //n为新建分区,\n为回车,p为主分区,再回车
"默认 1" {send "1\n";exp_continue} //分区号
"默认为 2048" {send "\n";exp_continue} //分区大小
"+size" {send "\n"}
}
###当expect匹配到同样的字符串时的操作####
expect "获取帮助" {send "p\n";send "wq\n";exp_continue} //p显示已建分区,wq保存配置,注意exp_continue,否则无法继续输入wq
EOF

mkdir /data // 新建挂载目录
fdisk -l
mkfs.xfs /dev/sdb1 // 格式化
mount /dev/sdb1 /data // 挂载使用
df -Th
File renamed without changes
1 change: 1 addition & 0 deletions src/shared/library/GlobalVars.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -132,5 +132,6 @@ class GlobalVars implements Serializable {
static String gitCommitPerf = "perf" // 性能优化标识
static String gitCommitRefactor = "refactor" // 重构代码标识
static String gitCommitDocs = "docs" // 文档标识
static String gitCommitChangeLogDocs = "docs(changelog)" // 版本文档标识

}
5 changes: 3 additions & 2 deletions src/shared/library/devops/ChangeLog.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,13 @@ def genChangeLog(ctx, int maxRecordsNum = 100) {
perfChangeLog += combinationMsg
} else if (truncatedMsg.toString().startsWith(GlobalVars.gitCommitRefactor)) { // 重构代码标识
refactorChangeLog += combinationMsg
} else if (truncatedMsg.toString().startsWith(GlobalVars.gitCommitDocs)) { // 文档标识
} else if (truncatedMsg.toString().startsWith(GlobalVars.gitCommitDocs) && !combinationMsg.contains(GlobalVars.gitCommitChangeLogDocs)) {
// 文档标识
docsChangeLog += combinationMsg
} else {
// 过滤无需生成的变更日志类型
// combinationMsg.contains("revert") || combinationMsg.contains("chore") || combinationMsg.contains("test")
if (combinationMsg.contains("docs(changelog)")) {
if (combinationMsg.contains(GlobalVars.gitCommitChangeLogDocs)) {
combinationMsg = ""
} else {
otherChangeLog += combinationMsg
Expand Down
2 changes: 1 addition & 1 deletion src/shared/library/devops/GitTagLog.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def genTagAndLog(ctx, tagVersion, gitChangeLog, repoUrl, gitCredentialsId) {
try {
sh("""
git add ${changeLogFileName}
git commit ${changeLogFileName} -m "docs(changelog): 发布 v${tagVersion}"
git commit ${changeLogFileName} -m "${GlobalVars.gitCommitChangeLogDocs}: 发布 v${tagVersion}"
git push ${userPassWordUrl}
""")
} catch (e) {
Expand Down

0 comments on commit ac1fa0b

Please sign in to comment.