From d0f772dc92a0f4153d81efd2694fd7047ecf9593 Mon Sep 17 00:00:00 2001 From: devops1970 <114632290+devops1970@users.noreply.github.com> Date: Sun, 26 Feb 2023 17:56:53 +0530 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4102231..82beb15 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,23 +1,13 @@ pipeline { - agent any - stages { - stage('Build') { - steps { - sh "rm -rf springExample" - sh "git clone https://github.com/awsdevops009/springExample.git" - sh "mvn clean " - } - } - stage('Test') { - steps { - sh "mvn test -f springExample" - echo "Welcome to Test" - } - } - stage('Deploy') { - steps { - sh "mvn package -f springExample" - echo "It is going to package the project today" - } - } - } } + agent {lebel 'jenkins-slave-1'} + stages { + stage('Build') { + steps { + sh "rm -rf springExample" + sh "git clone https://github.com/awsdevops009/springExample.git" + sh "mvn clean -f springExample" + echo ' job finished' + } + } + } +}