From 5262c4cf29b6f4c4f1384139c62eeb945ae37764 Mon Sep 17 00:00:00 2001 From: suchitagithub <85994284+suchitagithub@users.noreply.github.com> Date: Sat, 26 Nov 2022 17:35:56 +0530 Subject: [PATCH 1/2] Add files via upload --- Jenkinsfile.txt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Jenkinsfile.txt diff --git a/Jenkinsfile.txt b/Jenkinsfile.txt new file mode 100644 index 0000000..a09cc54 --- /dev/null +++ b/Jenkinsfile.txt @@ -0,0 +1,25 @@ +pipeline{ + + agent any + + stages{ + stage ('Build'){ + + setps{ + sh 'mvn clean package' + } + post{ + success{ + echo "Archving the artifacts" + archiveArctifacts arctifacts: '/**/target/*.war' + } + } + } + stage ('Deploy to tomcat server'){ + setps{ + deploy adapters: [tomcat9(credentialsId: 'c6b8807d-0356-49cd-8c92-e96e3e014ac3', path: '', url: 'http://localhost:9090')], contextPath: null, war: '**/*.war' + } + + } + } +} \ No newline at end of file From ecc15ec872676dcef5c652f1d18bd34e8b7681a8 Mon Sep 17 00:00:00 2001 From: suchitagithub <85994284+suchitagithub@users.noreply.github.com> Date: Sat, 26 Nov 2022 17:40:12 +0530 Subject: [PATCH 2/2] Add files via upload --- Jenkinsfile.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile.txt b/Jenkinsfile.txt index a09cc54..4707daf 100644 --- a/Jenkinsfile.txt +++ b/Jenkinsfile.txt @@ -1,6 +1,9 @@ pipeline{ - agent any + agent any + tools{ + maven 'local_maven' + } stages{ stage ('Build'){