-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
73 lines (67 loc) · 1.87 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
68
69
70
71
72
73
@Library('merritt-build-library')
import org.cdlib.mrt.build.BuildFunctions;
// See https://github.com/CDLUC3/mrt-jenkins/blob/main/src/org/cdlib/mrt/build/BuildFunctions.groovy
pipeline {
/*
* Params:
* tagname
* purge_local_m2
*/
environment {
//Branch/tag names to incorporate into the build. Create one var for each repo.
BRANCH_CORE = 'main'
//working vars
M2DIR = "${HOME}/.m2-box"
DEF_BRANCH = "main"
}
agent any
tools {
// Install the Maven version 3.8.4 and add it to the path.
maven 'maven384'
}
stages {
stage('Purge Local') {
steps {
script {
new BuildFunctions().init_build();
}
}
}
stage('Build Core') {
steps {
dir('mrt-core2') {
script {
new BuildFunctions().build_library(
'https://github.com/CDLUC3/mrt-core2.git',
env.BRANCH_CORE,
'-DskipTests'
)
}
}
}
}
stage('Build Box') {
steps {
dir('mrt-box') {
script {
new BuildFunctions().build_library(
'https://github.com/CDLUC3/mrt-box.git',
env.DEF_BRANCH,
''
)
}
}
}
}
stage('Archive Resources') { // for display purposes
steps {
script {
new BuildFunctions().save_jars(
'mrt-box/box-run/target/mrt-boxrun-1.0-jar-with-dependencies.jar',
'mrt-box'
)
}
}
}
}
}