-
Notifications
You must be signed in to change notification settings - Fork 408
/
nightly.jenkins
64 lines (61 loc) · 2.16 KB
/
nightly.jenkins
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
/************************************************************************************
Nightly Build :
Build current branch and deploy it to eclipse nexus instance at :
https://repo.eclipse.org/content/repositories/leshan-snapshots/
*************************************************************************************/
pipeline {
agent any
tools {
maven 'apache-maven-latest'
jdk 'temurin-jdk17-latest'
}
options {
timeout (time: 60, unit: 'MINUTES')
buildDiscarder(logRotator(numToKeepStr: '3'))
disableConcurrentBuilds()
durabilityHint('PERFORMANCE_OPTIMIZED')
}
triggers {
pollSCM ignorePostCommitHooks: true, scmpoll_spec: 'H H * * *'
}
stages {
stage('Build') {
steps {
// Build
sh ''' mvn -B com.github.ekryd.sortpom:sortpom-maven-plugin:verify -PallPom '''
// This ssh agent is needed to cache npm/node to download.eclipse.org when using -PeclipseJenkins
// see : https://github.com/eclipse-leshan/leshan/pull/1484
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) {
sh ''' mvn -B clean install javadoc:javadoc -PeclipseJenkins -DskipTests'''
}
// test with minimal supported version
sh '''mvn -B test -PuseToolchain -Dskip.npm'''
// test with all LTS version
sh '''mvn -B test -PuseToolchain -Dskip.npm -Dtoolchain.version=11'''
sh '''mvn -B test -PuseToolchain -Dskip.npm -Dtoolchain.version=17'''
sh '''mvn -B test -PuseToolchain -Dskip.npm -Dtoolchain.version=21'''
}
}
stage('Deploy') {
steps {
// Deploy
sh '''mvn -B deploy -Prelease-nightly -DskipTests -Dskip.npm'''
}
}
}
post {
unsuccessful {
mail to: 'code@simonbernard.eu',
subject: "Build ${env.BUILD_TAG} failed!",
body: "Check console output at ${env.BUILD_URL} to view the results."
}
fixed {
mail to: 'code@simonbernard.eu',
subject: "Build ${env.BUILD_TAG} back to normal.",
body: "Check console output at ${env.BUILD_URL} to view the results."
}
always {
junit '**/target/surefire-reports/*.xml'
}
}
}