Update jenkinsfile-fullbuild
This commit is contained in:
1 parent
3d80e984ee
commit
fa9e052887
1 file changed
+26
-5
+26
-5
@@ -1,10 +1,31 @@
|
||||
@Library('sphinx-lib') _
|
||||
@Library('sphinx-lib@main') _
|
||||
|
||||
pipeline {
|
||||
agent { kubernetes { yaml libraryResource('templates/pod.yaml') } }
|
||||
agent {
|
||||
kubernetes {
|
||||
yaml libraryResource('pod-template.yaml')
|
||||
}
|
||||
}
|
||||
stages {
|
||||
stage('Analyse') { steps { sonarScan('lab-demo') } }
|
||||
stage('Publish') { steps { publishArtifact(file: 'app.tar.gz', path: 'demo/1.0.0') } }
|
||||
stage('Deploy') { steps { deployToK3s(name: 'lab-demo', image: 'nginx') } }
|
||||
stage('Build') {
|
||||
steps {
|
||||
mavenBuild(goals: 'clean package -DskipTests')
|
||||
}
|
||||
}
|
||||
stage('Analyse') {
|
||||
steps {
|
||||
sonarScan('lab-demo')
|
||||
}
|
||||
}
|
||||
stage('Publish') {
|
||||
steps {
|
||||
publishArtifact(file: 'app.tar.gz', path: 'demo/1.0.0')
|
||||
}
|
||||
}
|
||||
stage('Deploy') {
|
||||
steps {
|
||||
deployToK3s(name: 'demo', image: 'nginx:latest', replicas: 2)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user