-
Notifications
You must be signed in to change notification settings - Fork 41
/
Jenkinsfile.deploy_website
65 lines (64 loc) · 2.22 KB
/
Jenkinsfile.deploy_website
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
def scmVars
@Library('jenkins-shared-lib') _
pipeline {
agent { label 'linux && java' }
options {
skipDefaultCheckout()
timeout(time: 1, unit: 'HOURS')
timestamps()
}
environment {
PATH = "${env.WORKSPACE}/releaseScripts/default/adds:${env.PATH}"
}
tools {
jdk 'JDK21'
maven 'Maven 3.9.8'
maven 'Maven 3.9.8'
}
stages {
stage('Checkout') {
steps {
script {
scmVars = checkout scm
}
sh 'git clean -f -x -d'
}
}
stage('Check environment') {
steps {
sh(label: 'check solvers', script: 'releaseScripts/default/check_solvers.sh')
}
}
stage('Build products') {
steps {
withMaven(mavenOpts: '-Xmx4g -Xss4m', publisherStrategy: 'EXPLICIT') {
sh 'cd releaseScripts/default && ./makeFresh.sh'
}
}
}
stage('Build website') {
steps {
sh(label: 'build website with Jekyll', script: 'releaseScripts/default/makeWebsite.sh')
}
}
stage('Deploy website') {
steps {
sshagent(credentials: ['jenkins-deploy-sopra-docker']) {
sh(label: 'deploy website to sopra-docker', script: 'releaseScripts/default/deploy_website.sh')
}
}
}
}
post {
unsuccessful {
script { string mmMessage = mattermost.create_mattermost_message(scmVars) }
emailext(body: '$DEFAULT_CONTENT', mimeType: 'text/plain', recipientProviders: [culprits(), developers(), requestor()], replyTo: '[email protected]', subject: '$DEFAULT_SUBJECT')
mattermostSend(color: "${env.mm_color}", message: "${mmMessage}", text: '', channel: '#ultimate', icon: 'https://jenkins.sopranium.de/static/0e41ff2a/images/jenkins-header-logo-v2.svg')
}
fixed {
script { string mmMessage = mattermost.create_mattermost_message(scmVars) }
emailext(body: '$DEFAULT_CONTENT', mimeType: 'text/plain', recipientProviders: [culprits(), developers(), requestor()], replyTo: '[email protected]', subject: '$DEFAULT_SUBJECT')
mattermostSend(color: "${env.mm_color}", message: "${mmMessage}", text: '', channel: '#ultimate', icon: 'https://jenkins.sopranium.de/static/0e41ff2a/images/jenkins-header-logo-v2.svg')
}
}
}