Newer
Older
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
pipeline {
agent {
node {
label 'goofy'
}
}
options {
timeout(time: 1, unit: 'HOURS')
disableConcurrentBuilds()
}
stages {
stage('client build') {
steps {
sh 'npm --version'
dir('goofy-client') {
sh 'npm install'
sh 'npm run build'
sh 'npm run test'
}
}
}
stage('server build') {
steps {
container("maven"){
sh 'mvn --version'
sh 'mvn clean install'
}
}
}
stage('openshift deploy') {
steps {
script {
def pom = readMavenPom file: 'pom.xml'
def version = pom.version
openshift.withCluster() {
openshift.withProject() {
dir('goofy-server') {
openshift.startBuild("goofy-builder", "--from-dir=.", "--follow")
}
openshift.tag("goofy-builder:latest", "goofy-builder:${env.BRANCH_NAME}-${version}")
openshift.tag("goofy-builder:${env.BRANCH_NAME}-${version}", "sh-kiel-dev/goofy:${env.BRANCH_NAME}-${version}")
}
}
}
}
}
}
}