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
41
Jenkinsfile
vendored
41
Jenkinsfile
vendored
|
@ -1,21 +1,38 @@
|
|||
pipeline {
|
||||
agent {
|
||||
kubernetes {
|
||||
label 'promo-app' // all your pods will be named with this prefix, followed by a unique id
|
||||
idleMinutes 5 // how long the pod will live after no jobs have run on it
|
||||
yamlFile 'build-pod.yaml' // path to the pod definition relative to the root of our project
|
||||
defaultContainer 'maven' // define a default container if more than a few stages use it, will default to jnlp container
|
||||
}
|
||||
}
|
||||
\pipeline {
|
||||
agent { label 'kmaster' }
|
||||
stages {
|
||||
stage('scm'){
|
||||
stage('SCM') {
|
||||
steps {
|
||||
git 'https://github.com/spring-projects/spring-petclinic.git'
|
||||
// Build the application
|
||||
sh 'cd /apps/build'
|
||||
git 'https://github.com/ametgud4u/spring-petclinic.git'
|
||||
}
|
||||
}
|
||||
stage('Build') {
|
||||
steps {
|
||||
sh 'mvn clean package -DskipTests=true'
|
||||
// Build the application
|
||||
sh '''
|
||||
export JAVA_HOME=/opt/jdk-17
|
||||
export PATH=$PATH:$JAVA_HOME/bin
|
||||
java -version
|
||||
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