You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
677 B
33 lines
677 B
pipeline {
|
|
agent any
|
|
stages {
|
|
stage('Checkout') {
|
|
steps {
|
|
git 'http://git.abilityell.com/william/react-project.git'
|
|
}
|
|
}
|
|
stage('Build') {
|
|
steps {
|
|
sh 'mvn clean package'
|
|
}
|
|
}
|
|
stage('Test') {
|
|
steps {
|
|
sh 'mvn test'
|
|
}
|
|
}
|
|
stage('Deploy') {
|
|
steps {
|
|
sh 'kubectl apply -f deployment.yaml'
|
|
}
|
|
}
|
|
}
|
|
post {
|
|
success {
|
|
echo "Pipeline succeeded! ✅"
|
|
}
|
|
failure {
|
|
echo "Pipeline failed! ❌"
|
|
}
|
|
}
|
|
}
|