I have a maven, java project and I am using git. I want to use jenkins to build + test + deploy (.war file) on a tomcat server (on the same device)
My current question is starting the build with pushing changes to the git repository wizard. However, he worked with the jenkins freestyle project. There, I could configure my git repository, so it detected any changes and started the build.
But as far as I can do my research using the "pipeline", it is best to start the process using the assembly + test + deploy. So I created a pipeline and wrote a jenkins file.
pipeline {
agent any
stages {
stage('Compile Stage') {
steps {
withMaven(maven: 'maven_3_5_1'){
bat 'mvn clean compile'
}
}
}
stage('Testing Stage') {
steps {
withMaven(maven: 'maven_3_5_1'){
bat 'mvn test'
}
}
}
stage('Deployment Stage (WAR)') {
steps {
withMaven(maven: 'maven_3_5_1'){
bat 'mvn deploy'
}
}
}
}
}
, git. jenkins git, .
, jenkins , git ( freestyle)?
.