Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
FROM tomcat:8.0.20-jre8
COPY target/*.war /usr/local/tomcat/webapps/td.war
COPY target/*.war /usr/local/tomcat/webapps/cohort7.war
45 changes: 45 additions & 0 deletions jenkinsfileNnenna
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
pipeline{
agent any
tools{
maven "maven3.8.6"
}
stages{
stage("1.CodeClone"){
steps{
git credentialsId: 'Github-Cred2', url: 'https://github.com/Nubanwani6/web-app.git'
}
}
stage("2.Build"){
steps{
sh "mvn clean package"
}
}
stage("3.Artifacts"){
steps{
sh "mvn deploy"
}
}
stage("4.DeploytoUAT"){
steps{
deploy adapters: [tomcat9(credentialsId: 'tomcat-cred', path: '', url: 'http://54.184.138.80:8080/')], contextPath: null, war: 'target/*.war'
}
}
stage("5.Approval"){
steps{
timeout(time:5, unit:'DAYS'){
input message: 'Approval for Production'
}
}
}
stage("6.DeploytoPROD"){
steps{
deploy adapters: [tomcat9(credentialsId: 'tomcat-cred', path: '', url: 'http://54.184.138.80:8080/')], contextPath: null, war: 'target/*.war'
}
}
stage("7.EmailNotification"){
steps{
emailext body: 'This is Build Success', subject: 'Build Success', to: 'info@acadalearning.com'
}
}
}
}
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<groupId>com.mt</groupId>
<artifactId>maven-web-application</artifactId>
<packaging>war</packaging>
<version>2.0.1-RELEASE</version>
<version>2.0.3-SNAPSHOT</version>

<name>maven-web-application</name>

Expand All @@ -21,7 +21,7 @@
<spring.version>5.1.2.RELEASE</spring.version>
<junit.version>4.11</junit.version>
<log4j.version>1.2.17</log4j.version>
<sonar.host.url>http://50.19.176.11:5000/</sonar.host.url>
<sonar.host.url>http://172.31.15.25:5000/</sonar.host.url>
<sonar.login>admin</sonar.login>
<sonar.password>admin123</sonar.password>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -97,13 +97,13 @@
<repository>
<id>nexus</id>
<name>ACADA Learning Releases Nexus Repository</name>
<url>http://172.31.94.25:8081/repository/UBA-release/</url>
<url>http://http://172.31.10.202:8081/repository/td-app-release/</url>
</repository>

<snapshotRepository>
<id>nexus</id>
<name>ACADA Learning Snapshot Nexus Repository </name>
<url>http://172.31.94.25:8081/repository/UBA-Snapshot/</url>
<url>http://172.31.10.202:8081/repository/td-app-snapshot/</url>
</snapshotRepository>

</distributionManagement>
Expand Down