Added JenkinsFile
This commit is contained in:
parent
545ded4e1d
commit
d73885d65c
1 changed files with 31 additions and 0 deletions
31
Jenkinsfile
vendored
Normal file
31
Jenkinsfile
vendored
Normal file
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue