forked from Robin-lad/gestion-des-absences-front
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Jenkinsfile
38 lines (33 loc) · 1.12 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
pipeline {
agent any
tools {
nodejs "NodeJS"
}
stages {
stage('build') {
steps {
sh "npm install"
sh "npm run build"
}
}
stage('deploy') {
when {
branch "master"
}
steps {
echo "ng deploy --base-href=https://2020-d05-java-devops.github.io/gestion-des-absences-front/"
}
}
}
post {
failure {
discordSend description: "${BUILD_URL}", footer: 'Echec :( - Robin', image: '', link: '', result: 'FAILURE', thumbnail: '', title: "${env.JOB_NAME}-#${BUILD_NUMBER} - ${env.GIT_COMMIT}", webhookURL: 'https://discordapp.com/api/webhooks/748830347399266344/bwY-_bEjcLBJGm-gX_IuBib5eTV8g1bwyHX3vo5MS3Sdyhw9Bd5lr-JEgn4bF8k-n1ZS'
}
success {
script {
if ("${env.BRANCH_NAME}" == 'master')
discordSend description: "${BUILD_URL}", footer: 'Success :) - Robin', image: '', link: '', result: 'SUCCESS', thumbnail: '', title: "${env.JOB_NAME}-#${BUILD_NUMBER} - ${env.GIT_COMMIT}", webhookURL: 'https://discordapp.com/api/webhooks/748830347399266344/bwY-_bEjcLBJGm-gX_IuBib5eTV8g1bwyHX3vo5MS3Sdyhw9Bd5lr-JEgn4bF8k-n1ZS'
}
}
}
}