mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-23 16:25:49 +00:00
Update Jenkinsfile
This commit is contained in:
parent
40cca255cc
commit
e1e2ed9925
1 changed files with 37 additions and 20 deletions
57
Jenkinsfile
vendored
57
Jenkinsfile
vendored
|
@ -1,22 +1,39 @@
|
||||||
pipeline {
|
\pipeline {
|
||||||
agent {
|
agent { label 'kmaster' }
|
||||||
kubernetes {
|
stages {
|
||||||
label 'promo-app' // all your pods will be named with this prefix, followed by a unique id
|
stage('SCM') {
|
||||||
idleMinutes 5 // how long the pod will live after no jobs have run on it
|
steps {
|
||||||
yamlFile 'build-pod.yaml' // path to the pod definition relative to the root of our project
|
// Build the application
|
||||||
defaultContainer 'maven' // define a default container if more than a few stages use it, will default to jnlp container
|
sh 'cd /apps/build'
|
||||||
}
|
git 'https://github.com/ametgud4u/spring-petclinic.git'
|
||||||
}
|
}
|
||||||
stages {
|
}
|
||||||
stage('scm'){
|
stage('Build') {
|
||||||
steps {
|
steps {
|
||||||
git 'https://github.com/spring-projects/spring-petclinic.git'
|
// Build the application
|
||||||
}
|
sh '''
|
||||||
}
|
export JAVA_HOME=/opt/jdk-17
|
||||||
stage('Build'){
|
export PATH=$PATH:$JAVA_HOME/bin
|
||||||
steps {
|
java -version
|
||||||
sh 'mvn clean package -DskipTests=true'
|
cd /apps/build/
|
||||||
}
|
./mvnw package -DskipTests=true
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Deployment on UT') {
|
||||||
|
steps {
|
||||||
|
// Run the tests
|
||||||
|
sh '''
|
||||||
|
echo "deploing to UT"
|
||||||
|
echo " deploying to REG"
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Deployment on REG') {
|
||||||
|
steps {
|
||||||
|
// Deploy the application
|
||||||
|
sh 'echo copying to REG'
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue