-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathJenkinsfile
43 lines (41 loc) · 1.02 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
library identifier: "[email protected]",
retriever: modernSCM(
[
$class: "GitSCMSource",
remote: "https://github.com/redhat-cop/pipeline-library.git"
]
)
// The name you want to give your Spring Boot application
// Each resource related to your app will be given this name
appName = "testblog"
pipeline {
agent {
node {
label 'nodejs'
}
}
options {
timeout(time: 20, unit: 'MINUTES')
}
stages {
stage("Checkout") {
steps {
checkout scm
}
}
stage('Build') {
steps {
sh 'npm install'
sh 'CI=false npm run build'
}
}
stage("Docker Build") {
steps {
// This uploads your application's source code and performs a binary build in OpenShift
// This is a step defined in the shared library (see the top for the URL)
// (Or you could invoke this step using 'oc' commands!)
binaryBuild(buildConfigName: appName, buildFromPath: ".")
}
}
}
}