This repository has been archived by the owner on Oct 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathJenkinsfile
67 lines (67 loc) · 2.93 KB
/
Jenkinsfile
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
66
67
pipeline {
options {
timestamps()
disableConcurrentBuilds()
timeout(time: 180, unit: 'MINUTES')
}
parameters {
booleanParam(defaultValue: true, description: 'Whether the latest-X repository should reference this build, if it succeeds. Enabled by default. Generally this is disabled when building for a service release.', name: 'UPDATE_LATEST_X')
string(defaultValue: 'main', description: 'The branch of the Git repositories that will be build. Committers should not need to touch this field.', name: 'BUILD_BRANCH')
string(defaultValue: '', description: 'If a value is set, this will create a composite p2 repository pointing to this resulting build (if successful), at the given name under the downloads page.<br/><br/>This is only ever set to the release name (eg. 2019-06) for a milestone (S) build. The purpose is to give consumers a static location that tracks the release.', name: 'SIMREL_NAME')
choice(choices: ['N', 'S', 'M', 'R'], description: 'Valid options : N, S, M, or R. Most committers should be using N. S, M, or R should be done by a project lead, or someone tasked with putting together the release.<br/>Note that I should not be used anymore as that URL redirects to the new simrel-orbit infrastructure.', name: 'BUILD_LABEL')
string(defaultValue: '', description: 'Description to appear on the downloads page.', name: 'DESCRIPTION')
}
agent {
kubernetes {
defaultContainer 'jnlp'
yamlFile 'pod.yml'
}
}
environment {
MAVEN_OPTS = "-Xmx2G"
repoDir = "releng/repository/target/repository"
}
stages {
stage('Prepare') {
steps {
script {
currentBuild.displayName = env.SIMREL_NAME + " " + env.BUILD_LABEL + "-build (#" + env.BUILD_NUMBER + ")"
currentBuild.description = env.DESCRIPTION
}
container('container') {
git branch: "${BUILD_BRANCH}", url: 'https://github.com/eclipse/orbit.git'
}
}
}
stage('Build') {
steps {
container('container') {
sh 'mvn -V -B -e clean install -Declipse-sign=true -Dartifact-comparator=true'
sh 'mvn -V -B -e clean install -Declipse-sign=true -Dartifact-comparator=true -f releng/aggregation-mirror-osgi/pom.xml'
sh 'mvn -V -B -e clean install -Declipse-sign=true -Dartifact-comparator=true -f releng/aggregationfeature/pom.xml'
}
}
}
stage('Generate-Repositories') {
steps {
container('container') {
sh 'mvn -V -B -e clean verify -Declipse-sign=true -Dartifact-comparator=true -DbuildType=${BUILD_LABEL} -f releng/pom.xml'
}
}
}
stage ('Deploy') {
steps {
container('container') {
sshagent ( ['projects-storage.eclipse.org-bot-ssh']) {
sh 'releng/scripts/deploy.sh'
}
}
}
post {
always {
archiveArtifacts artifacts: 'releng/repository/target/repository/**'
}
}
}
}
}