Commit 4128aa78 authored by lixiaofang's avatar lixiaofang

Merge branch 'test' of git.wanmeizhensuo.com:rank/dymas into test

parents e9a1c6bc 85bd463c
...@@ -32,8 +32,20 @@ pipeline { ...@@ -32,8 +32,20 @@ pipeline {
dingNotify "before" dingNotify "before"
} }
} }
stage('Check Code') {
//when { branch 'test' }
steps {
script {
currentBuild.displayName = "Check-Code"
checkCode "3.6"
}
}
}
stage('Build') { stage('Build') {
steps { steps {
script {
currentBuild.displayName = "Build-Image"
}
sh "docker build . ${params.cache} -f ./Dockerfile -t $IMAGE" sh "docker build . ${params.cache} -f ./Dockerfile -t $IMAGE"
sh "docker push $IMAGE" sh "docker push $IMAGE"
} }
...@@ -43,7 +55,16 @@ pipeline { ...@@ -43,7 +55,16 @@ pipeline {
post { post {
always { always {
script {
def stage = "${currentBuild.displayName}"
if (stage == "Check-Code" && fileExists("./flake.output.txt")) {
def description = readFile("./flake.output.txt")
dingNotify "after", "${currentBuild.currentResult}", "${description}"
} else {
dingNotify "after", "${currentBuild.currentResult}" dingNotify "after", "${currentBuild.currentResult}"
} }
} }
recordIssues enabledForFailure: true, tools: [flake8()]
}
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment