From af4016d46a750ce4280f62ceee69dbd2aaed3ae4 Mon Sep 17 00:00:00 2001 From: aqilahmaizura <130340067+qilaaaaa@users.noreply.github.com> Date: Fri, 21 Jun 2024 17:59:36 +0800 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index e7afdc0..cb1e32d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,17 +1,22 @@ -@Library('My-Jenkins-SharedLibrary')_ - -pipeline{ +pipeline { agent any - environment{ - demoVar='TestVariable123' + + tools { + maven 'local-maven' // Adjust with your Maven tool name if needed } - stages{ - stage ('testStage'){ - steps{ - script{ - deployDemo.test() - } + + stages { + stage('Build') { + steps { + // Your build steps here + } + } + stage('Deploy to Tomcat Server') { + steps { + deploy adapters: [tomcat7(credentialsId: '4f2c3e54-2692-404f-bdce-98d700b0189e', url: 'http://172.20.10.2:8181')], contextPath: '/', war: '**/*.war' } } } + + // Post-build actions, notifications, etc. }