Skip to content
Snippets Groups Projects
Commit c8f9cb6b authored by dudgns2947's avatar dudgns2947
Browse files

modify JenkinsFile

parent 05737ec4
Branches
No related tags found
1 merge request!9modify JenkinsFile
pipeline { pipeline {
agent any agent any
environment {
userId = "KYH"
}
stages { stages {
stage('Prepare'){ stage('Prepare'){
agent any agent any
steps { steps {
checkout scm checkout scm
} }
}post {
post {
success{ success{
echo 'prepare success' echo 'prepare success'
} }
always{ always{
echo 'done prepare' echo 'done prepare'
slackSend (channel: '#devops', color: '#FFFF00'),
message: "${env.userId}" STARTED:Job '${env.JOB_NAME}' [$(env.BUILD_NUMBER)](${env.BUILD_URL})
} }
cleanup{ cleanup{
echo 'after all other post conditions' echo 'after all other post conditions'
} }
} }
} }
stage('maven build'){
pipeline {
agent any
stages {
stage('Prepare') {
agent any
steps { steps {
sh 'mvn package'
checkout scm
} }
post { post {
success{ success{
echo 'maven build success'
echo 'prepare success'
} }
always{ always{
echo 'done maven build'
echo 'done prepare' slackSend (channel: '#devops', color: '#FFFF00'),
message: "${env.userId}" STARTED:Job '${env.JOB_NAME}' [$(env.BUILD_NUMBER)](${env.BUILD_URL})
} }
cleanup {
echo 'after all other post conditions'
} }
failure {
echo 'maven build failed'
}
} }
} }
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment