From d73885d65ceebdbd5c9d1e208b68a411c74bdef0 Mon Sep 17 00:00:00 2001 From: devops Date: Sat, 13 Dec 2025 16:32:47 +0000 Subject: [PATCH] Added JenkinsFile --- Jenkinsfile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..3346c9f --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,31 @@ +pipeline { + agent any + + tools { + // Install the Maven version configured as "M3" and add it to the path. + maven "M398" + } + + stages { + stage('Echo Version') { + steps { + // Get some code from a GitHub repository + sh 'echo Print Maven Version' + sh "mvn -version " + } + } + stage('Build') { + steps { + // Get some code from a GitHub repository (not needed if the file is part of repo ) + // git branch: 'main', changelog: false, credentialsId: 'forgejo-https', poll: false, url: 'https://forgejo.tben.online/sandbox/jenkins-hello-world.git' + // Run Maven package + sh "mvn clean package -DskipTests=true" + } + } + stage('Unit Test') { + steps { + sh "mvn test" + } + } + } +}