stage('Building docker image for tai and pushing it'){
stage('Building docker image for tai and pushing it'){
steps{
steps{
script{
script{
...
@@ -65,7 +45,7 @@ pipeline {
...
@@ -65,7 +45,7 @@ pipeline {
ws("$WORKSPACE"+'/tai_build/'){
ws("$WORKSPACE"+'/tai_build/'){
script{
script{
docker.withRegistry('','docker-hub-ndiop'){
docker.withRegistry('','docker-hub-ndiop'){
defimage=docker.build('baamtu/tai')
defimage=docker.buildregistry+":$BUILD_NUMBER"
image.push()
image.push()
}
}
}
}
...
@@ -79,12 +59,12 @@ pipeline {
...
@@ -79,12 +59,12 @@ pipeline {
// Post-build actions
// Post-build actions
post{
post{
success{
success{
slackSendchannel:'tai',
slackSendchannel:'odoo-demo',
color:COLOR_MAP[currentBuild.currentResult],
color:COLOR_MAP[currentBuild.currentResult],
message:"*${currentBuild.currentResult}:* JOB ${env.JOB_NAME} | BUILD N° = ${env.BUILD_NUMBER}\n Plus d'infos: ${env.BUILD_URL} \n Une nouvelle image est disponible pour le projet TAI sur l'environnement MASTER\n Message du commit : ${env.GIT_COMMIT_MSG} \n Lien du commit: https://gitlab.baamtu.com/root/tai/commit/${env.GIT_COMMIT} "
message:"*${currentBuild.currentResult}:* JOB ${env.JOB_NAME} | BUILD N° = ${env.BUILD_NUMBER}\n Plus d'infos: ${env.BUILD_URL} \n Une nouvelle image est disponible pour le projet TAI sur l'environnement MASTER\n Message du commit : ${env.GIT_COMMIT_MSG} \n Lien du commit: https://gitlab.baamtu.com/root/tai/commit/${env.GIT_COMMIT} "
}
}
failure{
failure{
slackSendchannel:'tai',
slackSendchannel:'odoo-demo',
color:COLOR_MAP[currentBuild.currentResult],
color:COLOR_MAP[currentBuild.currentResult],
message:"*${currentBuild.currentResult}:* JOB ${env.JOB_NAME} | BUILD N° = ${env.BUILD_NUMBER} | Stage : "+last_stage+"\n Plus d'infos: ${env.BUILD_URL} \n Message du commit : ${env.GIT_COMMIT_MSG} \n Lien du commit: https://gitlab.baamtu.com/root/tai/commit/${env.GIT_COMMIT}"
message:"*${currentBuild.currentResult}:* JOB ${env.JOB_NAME} | BUILD N° = ${env.BUILD_NUMBER} | Stage : "+last_stage+"\n Plus d'infos: ${env.BUILD_URL} \n Message du commit : ${env.GIT_COMMIT_MSG} \n Lien du commit: https://gitlab.baamtu.com/root/tai/commit/${env.GIT_COMMIT}"