Add new file
This commit is contained in:
40
Jenkinsfile-simple-pipeline/Jenkinsfile
vendored
Normal file
40
Jenkinsfile-simple-pipeline/Jenkinsfile
vendored
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
#!/usr/bin/env groovy
|
||||||
|
|
||||||
|
def gv
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
tools {
|
||||||
|
maven 'Maven'
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage("init") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
gv = load "script.groovy"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage("build jar") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
gv.buildJar()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage("build image") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
gv.buildImage()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage("deploy") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
gv.deployApp()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user