forked from CaptainPawss/clob-client-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJenkinsfile
More file actions
39 lines (39 loc) · 1.38 KB
/
Copy pathJenkinsfile
File metadata and controls
39 lines (39 loc) · 1.38 KB
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
39
pipeline {
agent any
environment {
GH_ORG = "atelier-diginamic"
APP_REPO = "gdm-front"
BACKEND_PROD = "https://missions-back.cleverapps.io/"
}
stages {
stage('install') {
steps {
sh 'npm install'
}
}
stage('build') {
steps {
sh 'npm run prepare-prod'
sh 'npm run build'
}
}
stage('deploy') {
when {
branch 'master'
}
steps {
sh 'npm run deploy'
}
}
}
post {
success {
discordSend description: "${BUILD_URL}", footer: 'Succès', image: '', link: '', result: 'SUCCESS', thumbnail: '', title: "Succès ! ${env.JOB_NAME} commit ${env.GIT_COMMIT}", webhookURL: "${DISCORD_WEBHOOK_URL}"
slackSend channel: '#jenkins_nantes', color: 'good', message: "Succès ! ${env.JOB_NAME} commit ${env.GIT_COMMIT} (<${env.BUILD_URL}|Open>)"
}
failure {
discordSend description: "${BUILD_URL}", footer: 'Échec', image: '', link: '', result: 'FAILURE', thumbnail: '', title: "Oops ! ${env.JOB_NAME} commit ${env.GIT_COMMIT}", webhookURL: "${DISCORD_WEBHOOK_URL}"
slackSend channel: '#jenkins_nantes', color: 'danger', message: "Oops ! ${env.JOB_NAME} commit ${env.GIT_COMMIT} (<${env.BUILD_URL}|Open>)"
}
}
}