Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
8f1cf1c
Update pom.xml
Ducheruk Apr 29, 2025
eee9c11
Update pom.xml
Ducheruk Apr 29, 2025
8782d2b
Update pom.xml
Ducheruk Apr 29, 2025
6a17d7f
Update home.jsp
Ducheruk Apr 29, 2025
22e7855
Update home.jsp
Ducheruk Apr 29, 2025
9b865c3
Update home.jsp
Ducheruk Apr 29, 2025
a8c00c9
Update home.jsp
Ducheruk Apr 29, 2025
edf103c
Update pom.xml
Ducheruk May 7, 2025
1596275
Update pom.xml
Ducheruk May 7, 2025
d4fb46b
Update pom.xml
Ducheruk May 7, 2025
6039307
Update pom.xml
Ducheruk May 8, 2025
6b6bb9d
Update pom.xml
Ducheruk May 9, 2025
106445d
Update pom.xml
Ducheruk May 9, 2025
4b40ccb
Update pom.xml
Ducheruk May 9, 2025
499c2cb
Updated pom.xml
Ducheruk May 18, 2025
97f26e5
Update pom.xml
Ducheruk May 18, 2025
8e854ca
Update pom.xml
Ducheruk May 18, 2025
1181283
Update pom.xml
Ducheruk May 18, 2025
960fbba
Update pom.xml
Ducheruk May 18, 2025
532ea66
Update pom.xml
Ducheruk May 19, 2025
6d9e90d
Update pom.xml
Ducheruk May 19, 2025
cbe600a
Update pom.xml
Ducheruk May 19, 2025
5296641
Update home.jsp
Ducheruk May 19, 2025
0c46f38
Update home.jsp
Ducheruk May 19, 2025
4be98aa
Update pom.xml
Ducheruk May 19, 2025
901b124
Update pom.xml
Ducheruk May 28, 2025
2abe4cd
Update pom.xml
Ducheruk May 28, 2025
aa6220b
Update home.jsp
Ducheruk May 28, 2025
28e1f34
modified home.jsp
May 28, 2025
3d4fbb6
just modified home.jsp
May 28, 2025
503b13d
just modified home.jsp
May 28, 2025
5ea94a9
just committing
May 28, 2025
ece8da1
Update pom.xml
Ducheruk May 29, 2025
8485ea4
Update pom.xml
Ducheruk May 29, 2025
1ffab4b
Update pom.xml
Ducheruk May 29, 2025
01fee6e
Update pom.xml
Ducheruk May 29, 2025
f87b9fb
Update pom.xml
Ducheruk May 31, 2025
1ed50b4
Create Jenkinsfile
Ducheruk Jun 1, 2025
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
54 changes: 54 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
pipeline {
agent any
environment {
MAVEN_HOME = tool name: 'maven-3.9.9', type: 'maven'
WAR = 'target/maven-web-application.war'
TOMCAT_URL = "http://54.82.124.135:8080/manager/text/deploy?path=/appName&update=true"
TOMCAT_USER = 'admin'
TOMCAT_PASSWORD = 'admin'
TOMCAT_PATH = '/opt/apache-tomcat-9.0.100/webapps'
TMP_PATH = '/tmp/maven-web-application.war'
MYCHANNEL = "durga-prac"
}
stages {
stage('checkout') {
steps {
git branch: 'UAT', credentialsId: 'git_cred', url: 'https://github.com/Ducheruk/maven-web-app-project-kk-funda.git'
}
}
stage('build') {
steps {
sh "${env.MAVEN_HOME}/bin/mvn clean install"
}
}
stage('sonar') {
steps {
sh "${env.MAVEN_HOME}/bin/mvn sonar:sonar"
}
}
stage('nexus') {
steps {
sh "${env.MAVEN_HOME}/bin/mvn clean deploy"
}
}
stage('copy WAR to tomcat') {
steps {
echo "(copy war file: ${env.WAR} to tomcat server)"
sshagent(['ssh_pem_keys']) {
sh "scp -o StrictHostKeyChecking=no ${env.WAR} ubuntu@54.82.124.135:${env.TMP_PATH}"
sh "ssh -o StrictHostKeyChecking=no ubuntu@54.82.124.135 'sudo cp ${env.TMP_PATH} ${env.TOMCAT_PATH}'"
}
}
}
stage('slack notification') {
steps {
slackSend(channel: env.MYCHANNEL, color: 'good', message: "super success for ${env.JOB_NAME} #${env.BUILD_NUMBER}")
}
}
}
post {
failure {
slackSend(channel: env.MYCHANNEL, color: 'danger', message: "bad failure for ${env.JOB_NAME} #${env.BUILD_NUMBER}")
}
}
}
33 changes: 16 additions & 17 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
<spring.version>5.3.34</spring.version>
<junit.version>4.11</junit.version>
<log4j.version>1.2.17</log4j.version>
<sonar.host.url>http://54.221.74.74:9000/</sonar.host.url>
<sonar.host.url>http://34.199.175.153:9000</sonar.host.url>
<sonar.login>admin</sonar.login>
<sonar.password>passw0rd</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 @@ -83,28 +83,22 @@
</dependency>

<!-- provided dependencies -->

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>

</dependencies>

<distributionManagement>

<repository>
<id>nexus</id>
<name>KK FUNDA Releases Nexus Repository</name>
<url>http://172.31.40.189:8081/repository/flipkart-release/</url>
<name>webapprel</name>
<url>http://35.170.170.231:8081/repository/webapprel/</url>
</repository>

<snapshotRepository>
<id>nexus</id>
<name>KK FUNDA Snapshot Nexus Repository </name>
<url>http://172.31.40.189:8081/repository/flipkart-snapshot/</url>
<name>webappsnap</name>
<url>http://35.170.170.231:8081/repository/webappsnap/</url>

</snapshotRepository>

</distributionManagement>
Expand Down Expand Up @@ -134,6 +128,12 @@
</webApp>
</configuration>
</plugin>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>4.0.0.4121</version>
</plugin>


<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand All @@ -147,8 +147,7 @@
</configuration>
</plugin>

</plugins>
</build>

</plugins>
</build>

</project>
</project>
2 changes: 1 addition & 1 deletion src/main/webapp/jsps/home.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</head>
</head>
<body>
<h1 align="center">Welcome to KK AWS</h1>
<h1 align="center">Welcome to KK AWS DEVOPS earliest at 7.30PM to 9.30PM</h1>
<h1 align="center"> KK FUNDA</h1>
<hr>
<br>
Expand Down