-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathJenkinsfile
55 lines (53 loc) · 973 Bytes
/
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
pipeline{
agent { label 'nodejs8' }
stages{
stage ('checkout'){
steps{
checkout scm
}
}
stage ('move to frontend'){
steps{
sh 'cd frontend'
}
}
stage ('install modules'){
steps{
sh '''
npm install --verbose -d
npm install --save classlist.js
'''
}
}
stage ('test'){
steps{
sh '''
$(npm bin)/ng test --single-run --browsers Chrome_no_sandbox
'''
}
post {
always {
junit "test-results.xml"
}
}
}
stage ('code quality'){
steps{
sh '$(npm bin)/ng lint'
}
}
stage ('build') {
steps{
sh '$(npm bin)/ng build --prod --build-optimizer'
}
}
stage ('build image') {
steps{
sh '''
rm -rf node_modules
oc start-build angular-5-example --from-dir=. --follow
'''
}
}
}
}