blob: 84da1c9ad869743518287512ba23e80101160807 [file] [log] [blame]
Frederic Gurr78838f92018-07-06 19:06:02 +02001pipeline {
Frederic Gurrf3c6e032020-12-07 17:34:14 +01002 agent {
3 node {
4 label 'promotion-vm'
5 }
6 }
Frederic Gurr78838f92018-07-06 19:06:02 +02007 tools {
Frederic Gurrf3c6e032020-12-07 17:34:14 +01008 jdk 'openjdk-jdk11-latest'
Frederic Gurr0872f172019-03-20 18:17:17 +01009 maven 'apache-maven-latest'
Frederic Gurr78838f92018-07-06 19:06:02 +020010 }
Frederic Gurr5da031c2020-12-10 20:24:07 +010011 options {
12 disableConcurrentBuilds()
13 timeout(time: 3, unit: 'HOURS')
Frederic Gurr906eec32021-05-04 21:04:47 +020014 timestamps ()
Frederic Gurr5da031c2020-12-10 20:24:07 +010015 }
Frederic Gurr76a99732018-07-17 19:41:06 +020016 environment {
Frederic Gurr76a07252021-03-17 15:40:54 +010017 TRAIN_NAME = "2021-06"
Frederic Gurr76a99732018-07-17 19:41:06 +020018 STAGING_DIR = "/home/data/httpd/download.eclipse.org/staging/${TRAIN_NAME}"
19 }
Frederic Gurr78838f92018-07-06 19:06:02 +020020 stages {
21 stage('Checkout') {
22 steps {
23 cleanWs()
Frederic Gurr76a99732018-07-17 19:41:06 +020024 git branch: 'master',
25 url: 'git://git.eclipse.org/gitroot/simrel/org.eclipse.simrel.build'
Frederic Gurr78838f92018-07-06 19:06:02 +020026 }
27 }
28 stage('Validate') {
29 steps {
30 sh 'mvn clean test -Pbuilt-at-eclipse.org -Pvalidate'
31 }
32 }
33 stage('Build clean') {
34 steps {
Frederic Gurr65264572021-01-14 19:08:03 +010035 sh 'mvn clean verify -Pbuilt-at-eclipse.org -Pbuild'
Frederic Gurr78838f92018-07-06 19:06:02 +020036 }
37 }
Frederic Gurr76a99732018-07-17 19:41:06 +020038 stage('Deploy to staging') {
Frederic Gurr76a99732018-07-17 19:41:06 +020039 steps {
Frederic Gurr007565c2018-10-17 14:23:17 +020040 // Create staging dir (if it does not exist already)
41 sh 'mkdir -p ${STAGING_DIR}'
42 // Clean staging dir
Frederic Gurr76a99732018-07-17 19:41:06 +020043 sh 'rm -rf ${STAGING_DIR}/*'
44 // Copying files to staging dir
45 sh 'cp -R ${WORKSPACE}/target/repository/final/* ${STAGING_DIR}/'
46 sh 'ls -al ${STAGING_DIR}'
47 // Trigger EPP job
Frederic Gurr906eec32021-05-04 21:04:47 +020048 sh 'curl https://ci.eclipse.org/packaging/job/simrel.epp-tycho-build/buildWithParameters?delay=600sec&token=Yah6CohtYwO6b?6P'
Frederic Gurr76a99732018-07-17 19:41:06 +020049 }
50 }
Frederic Gurr79afd232019-12-18 16:16:10 +010051 stage('Start repository analysis') {
52 steps {
53 build job: 'simrel.oomph.repository-analyzer.test', parameters: [booleanParam(name: 'PROMOTE', value: true)], wait: false
54 }
55 }
Frederic Gurr78838f92018-07-06 19:06:02 +020056 }
Frederic Gurrbf9a4332018-09-12 18:43:29 +020057 post {
58 failure {
59 emailext (
60 subject: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]'",
Frederic Gurr5e0eeb72018-12-19 18:36:21 +010061 body: """FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':
62 Check console output at ${env.BUILD_URL}""",
Frederic Gurrbf9a4332018-09-12 18:43:29 +020063 recipientProviders: [[$class: 'DevelopersRecipientProvider']],
64 to: 'frederic.gurr@eclipse-foundation.org'
65 )
Frederic Gurrca88a942020-12-17 12:19:05 +010066 archiveArtifacts artifacts: 'target/eclipserun-work/configuration/*.log', allowEmptyArchive: true
Frederic Gurrbf9a4332018-09-12 18:43:29 +020067 }
Frederic Gurre4f5e3e2018-09-12 18:08:11 +020068 }
Frederic Gurr78838f92018-07-06 19:06:02 +020069}