-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathJenkinsfile
37 lines (33 loc) · 1.19 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
// Based on:
// https://raw.githubusercontent.com/redhat-cop/container-pipelines/master/basic-spring-boot/Jenkinsfile
library identifier: "pipeline-library@v1.5",
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 = "hello-java"
pipeline {
// Use the 'maven' Jenkins agent image which is provided with OpenShift
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 the top for the URL)
// (Or you could invoke this step using 'oc' commands!)
binaryBuild(buildConfigName: appName, buildFromPath: ".")
}
}
// You could extend the pipeline by tagging the image,
// or deploying it to a production environment, etc......
}
}