diff --git a/jenkinsfile b/jenkinsfile new file mode 100644 index 0000000..c65f868 --- /dev/null +++ b/jenkinsfile @@ -0,0 +1,25 @@ +pipeline { + + agent any + tools { + maven "Maven" + } + + stages { + stage('Compile-Build-Test ') { + steps { + sh 'mvn clean package' + } + + } + stage('Deploy to Development'){ + steps{ + // deploy adapters: [tomcat8(credentialsId: 'tomcat', path: '', url: 'http://18.224.251.223:8000/')], contextPath: null, onFailure: false, war: '**/*.war' + // deploy adapters: [tomcat8(credentialsId: 'tomcat_cred', path: '', url: 'http://18.191.201.243:8080')], contextPath: 'basic', onFailure: false, war: '**/*.jar' + //sh 'curl http://18.191.201.243:8080//manager/text/undeploy?path=/BMI -u tomcat:secret' + sh 'curl -v -u tomcat:secret -T target/org.jacoco.examples.maven.java-1.0-SNAPSHOT.jar http://18.191.201.243:8080//manager/text/deploy?path=/examplejava' + + } + } + } + }