diff --git a/Jenkinsfile b/Jenkinsfile index c43ad3c..924ac77 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,25 +1,21 @@ pipeline { - agent any - environment { - // Use PATH+EXTRA to append to PATH properly - PATH = "/usr/bin:/bin:/opt/homebrew/bin" - } - stages { + agent {label'windows-agent-pavani'} + stages { - stage('pull') { + stage('pull scm new test') { steps { - git branch: 'main', url: 'https://github.com/PraveenKuber/Amazon-Jenkins.git' + git branch: 'main', url: 'https://github.com/Kidduu2123/Amazon-Jenkins.git' } } stage('compile') { steps { - sh 'mvn compile' + bat 'mvn compile' } } stage('build') { steps { - sh 'mvn clean install' + bat 'mvn clean install' } } diff --git a/Jenkinsfile123 b/Jenkinsfile123 new file mode 100644 index 0000000..da235ec --- /dev/null +++ b/Jenkinsfile123 @@ -0,0 +1,42 @@ +pipeline { + agent any + environment { + // Use PATH+EXTRA to append to PATH properly + PATH = "/usr/bin:/bin:/opt/homebrew/bin" + } + stages { + + stage('pull scm new test') { + steps { + git branch: 'main', url: 'https://github.com/PraveenKuber/Amazon-Jenkins.git' + } + } + stage('compile') { + steps { + sh 'mvn compile' + } + } + + stage('build') { + steps { + sh 'mvn clean install' + } + } + + + } + + post{ + + success{ + echo 'Build success' + } + + failure{ + echo 'Failure in the build' + } + + } + + +}