forked from monodot/hello-java-spring-boot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
38 lines (34 loc) · 1.31 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
// Based on:
// https://raw.githubusercontent.com/redhat-cop/container-pipelines/master/basic-spring-boot/Jenkinsfile
library identifier: "[email protected]",
retriever: modernSCM(
[
$class: "GitSCMSource",
remote: "https://github.com/redhat-cop/pipeline-library.git"
]
)
// The name you want to give your Application
// Each resource related to your app will be given this name
appName = "hello-java-spring-boot"
pipeline {
// Use the 'maven' Jenkins agent image which is provided with OpenShift
// checkout and build Source code (SoringBoot in this example)
agent { label "maven" }
stages {
stage("Checkout") {
steps {
checkout scm
}
}
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 https://github.com/redhat-cop/pipeline-library.git)
// (Or we could invoke this step using 'oc start-build <build config>' commands!)
binaryBuild(buildConfigName: appName, buildFromPath: ".")
}
}
// We could extend the pipeline by tagging the image,
// or deploying it to a production environment, etc......
}
}