Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add jenkins file #21

Open
wants to merge 19 commits into
base: master
Choose a base branch
from
Open
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ release.properties
dependency-reduced-pom.xml
buildNumber.properties
.idea
*.iml
*.iml
27 changes: 27 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
pipeline{
agent any
stages{
stage("git checkout"){
steps{
git 'https://github.com/sahooashok709/time-tracker.git'
}
}
stage("build in maven"){
steps{
sh "mvn clean package"
}
}
stage("deploy in tomcat"){
steps{
sshagent(['tomcat']) {
sh """
scp -o StrictHostKeyChecking=no /var/lib/jenkins/workspace/new_pipeline/web/target/time-tracker-web-0.5.0-SNAPSHOT.war ec2-user@172.31.10.239:/opt/tomcat8/webapps
ssh ec2-user@172.31.10.239 /opt/tomcat8/bin/shutdown.sh
ssh ec2-user@172.31.10.239 /opt/tomcat8/bin/startup.sh
"""
}
}
}

}
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
"Source" form shall mean the prefered form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Java (Maven) application for tracking time on the job

Time tracker

Good Afn!!!
Good Afn!!
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<version>0.5.0-SNAPSHOT</version>
<name>Time Tracker (Parent)</name>
<description>
This is a simple Maven / Java web project.
This is a simple Maven / Java web project.
</description>
<inceptionYear>2017</inceptionYear>
<url>http://taylor.training/</url>
Expand Down
2 changes: 1 addition & 1 deletion web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<parent>
<groupId>training.taylor.time-tracker</groupId>
<artifactId>time-tracker-parent</artifactId>
<version>0.5.0-SNAPSHOT</version>
Expand Down