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
32 changes: 28 additions & 4 deletions cohort9
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
pipeline{
agent any
tools{
maven "maven3.8.5"
maven "maven3.8.7"
}
stages{
stage("1.CodeClone"){
steps{
git credentialsId: 'Github-Cred', url: 'https://github.com/acadalearning/web-app.git'
git credentialsId: 'GitHub-Credentials', url: 'https://github.com/raphnw/web-app.git'
}
}
stage("2. build"){
Expand All @@ -30,7 +30,7 @@
stage("5. Deploy to UAT"){
steps{
sh "echo deploy to UAT Environment"
deploy adapters: [tomcat9(credentialsId: 'tomcat-cred2', path: '', url: 'http://172.31.12.185:7000/')], contextPath: null, war: 'target/*.war'
deploy adapters: [tomcat9(credentialsId: 'Tomcat-cred', path: '', url: 'http://34.204.76.132:8080/')], contextPath: null, war: 'target/*.war'
}
}
stage("6. Approval"){
Expand All @@ -44,8 +44,32 @@
stage("5. Deploy to Prod"){
steps{
sh "echo deploy to Prod Environment"
deploy adapters: [tomcat9(credentialsId: 'tomcat-cred2', path: '', url: 'http://172.31.12.185:7000/')], contextPath: null, war: 'target/*.war'
deploy adapters: [tomcat9(credentialsId: 'Tomcat-cred', path: '', url: 'http://34.204.76.132:8080/')], contextPath: null, war: 'target/*.war'
}
}
stage('8EmailNotification'){
steps{
sh "echo Email notification"
emailext attachLog: true, body: '''Hi,
Please find the Build summary.

$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS:

Check console output at $BUILD_URL to view the results.

Thanks
DevOps Team
''', subject: 'Build Success', to: 'raffytiti47@gmail.com'
}

}

stage('9 Slack Notification'){
steps{
sh "echo Slack notification"
slackSend channel: 'slacknotification', message: "Please find status of pipeline Status-${currentBuild.currentResult} ${env.JOB_NAME} ${env.BUILD_NUMBER} ${env.BUILD_URL}", teamDomain: 'the-dream-teamglobal'
}

}
}
}
10 changes: 5 additions & 5 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.7-SNAPSHOT</version>
<version>2.0.7-RELEASE</version>

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

Expand All @@ -21,9 +21,9 @@
<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://172.31.21.231:7000/</sonar.host.url>
<sonar.host.url>http://18.232.170.254:1000/</sonar.host.url>
<sonar.login>admin</sonar.login>
<sonar.password>admin</sonar.password>
<sonar.password>admin123</sonar.password>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

Expand Down Expand Up @@ -97,13 +97,13 @@
<repository>
<id>nexus</id>
<name>ACADA Learning Releases Nexus Repository</name>
<url>http://172.31.27.56:8081/repository/rbc-release/</url>
<url>http://172.31.16.154:3005/repository/project-A-release/</url>
</repository>

<snapshotRepository>
<id>nexus</id>
<name>ACADA Learning Snapshot Nexus Repository </name>
<url>http://172.31.27.56:8081/repository/rbc-snapshot/</url>
<url>http://172.31.16.154:3005/repository/project-A-snapshot/</url>
</snapshotRepository>

</distributionManagement>
Expand Down