-
Notifications
You must be signed in to change notification settings - Fork 41
/
Jenkinsfile-reporeports
46 lines (46 loc) · 1.7 KB
/
Jenkinsfile-reporeports
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
pipeline {
agent {
node {
label 'promotion-vm'
}
}
tools {
jdk 'openjdk-jdk17-latest'
maven 'apache-maven-latest'
}
options {
disableConcurrentBuilds()
timeout(time: 2, unit: 'HOURS')
}
environment {
TRAIN_NAME = "2025-03"
STAGING_DIR = "/home/data/httpd/download.eclipse.org/staging/${TRAIN_NAME}"
}
stages {
stage('Create repo reports') {
//this job expects the staging dir to exist and contain a repo
//files are created in the staging dir directly (not in the workspace!)
steps {
script {
lock ('staging-repository') {
sh 'mvn clean test -Preport'
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=370194 - add the name of the release on top of the repo reports main page
sh "sed -i 's/<h1>Software Repository Reports<\\/h1>/<h1>Software Repository Reports - ${TRAIN_NAME}<\\/h1>/g' ${STAGING_DIR}/buildInfo/reporeports/index.html"
//archiveArtifacts artifacts: "${STAGING_DIR}/buildInfo/reporeports/**/*", fingerprint: true, allowEmptyArchive: true
}
}
}
}
}
post {
failure {
emailext (
subject: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'",
body: """FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':
Check console output at ${env.BUILD_URL}console""",
recipientProviders: [[$class: 'DevelopersRecipientProvider']],
to: '[email protected]'
)
}
}
}