-
Notifications
You must be signed in to change notification settings - Fork 11
/
component-alignment-pipeline
59 lines (54 loc) · 1.74 KB
/
component-alignment-pipeline
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
pipeline {
agent any
options {
buildDiscarder(logRotator(numToKeepStr: '30', artifactNumToKeepStr: '30'))
}
environment {
HERA_HOSTNAME = 'olympus'
}
stages {
stage('Prep') {
steps {
//cleanWs()
script {
// warning, GIT_BRANCH var alreads points to pipeline's branch
if ( env.GIT_REPOSITORY_BRANCH == null || "".equals("${env.GIT_REPOSITORY_BRANCH}") ) {
env.GIT_REPOSITORY_BRANCH = "master"
}
echo "GIT_REPOSITORY_BRANCH:[${env.GIT_REPOSITORY_BRANCH}]"
}
dir('workdir') {
git url: "${env.GIT_REPOSITORY_URL}",
branch: "${env.GIT_REPOSITORY_BRANCH}"
}
dir('hera') {
git 'https://github.com/jboss-set/hera.git'
}
dir('harmonia') {
git branch: 'olympus', url: 'https://github.com/jboss-set/harmonia.git'
}
script {
env.BUILD_SCRIPT = "${env.WORKSPACE}/hera/build-wrapper.sh"
}
// Start container
sh label: '', script: "${env.WORKSPACE}/hera/hera.sh run"
}
}
stage ('Build') {
steps {
sh label: '', script: "${env.WORKSPACE}/hera/hera.sh job"
}
}
}
post {
always {
script {
try {
sh label: '', script: "${env.WORKSPACE}/hera/hera.sh stop"
} catch (err) {
echo "Error while deleting container: ${err}"
}
}
}
}
}