-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
25 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,6 +112,26 @@ pipeline { | |
} | ||
} | ||
|
||
stage('restart container') { | ||
|
||
when { | ||
anyOf { | ||
branch 'dev' | ||
} | ||
} | ||
agent { | ||
docker { | ||
image 'node:14.18.0' | ||
reuseNode true | ||
} | ||
} | ||
|
||
steps { | ||
sh 'restart' | ||
sh './jenkins/script/restart.sh' | ||
} | ||
} | ||
|
||
stage("artifacts-manage"){ | ||
when { | ||
expression{ | ||
|
@@ -130,13 +150,13 @@ pipeline { | |
expression{ | ||
return fileExists("${resetFlagFile}") | ||
} | ||
anyOf { | ||
anyOf { | ||
branch 'dev' | ||
branch 'release' | ||
branch 'master' | ||
} | ||
} | ||
|
||
steps { | ||
echo "是回滚啊啊啊啊" | ||
//当然我们这里为了方便下载 | ||
|
@@ -174,7 +194,7 @@ pipeline { | |
} | ||
|
||
//post 就是流水线的运行结果状态啦,我们慢点会在这里设置邮件通 | ||
post { | ||
post { | ||
changed{ | ||
echo 'I changed!' | ||
} | ||
|
@@ -187,7 +207,7 @@ pipeline { | |
emailext( | ||
subject: "Job [${env.JOB_NAME}] - Status: fail", | ||
body: """${template}""", | ||
recipientProviders: [culprits(),requestor(),developers()], | ||
recipientProviders: [culprits(),requestor(),developers()], | ||
to: "[email protected]", | ||
) | ||
} | ||
|
@@ -203,7 +223,7 @@ pipeline { | |
emailext( | ||
subject: "Job [${env.JOB_NAME}] - Status: Success", | ||
body: """${template}""", | ||
recipientProviders: [requestor(),developers()], | ||
recipientProviders: [requestor(),developers()], | ||
to: "[email protected]", | ||
) | ||
} | ||
|