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

Develop #63

Closed
wants to merge 150 commits into from
Closed
Show file tree
Hide file tree
Changes from 140 commits
Commits
Show all changes
150 commits
Select commit Hold shift + click to select a range
9508580
Update pom.xml
raknas999 Jun 12, 2019
5975547
readme changes
Jun 13, 2019
d32f6e2
readme changes
Jun 13, 2019
64e254d
Update pom.xml
raknas999 Jun 13, 2019
87faa7f
readme file modified
Aug 7, 2019
5b64813
read me
Aug 7, 2019
69bdcfe
Update pom.xml
raknas999 Aug 9, 2019
9aed1d0
reade me chagnes
Aug 10, 2019
72a5a51
Add files via upload
raknas999 Aug 10, 2019
59660e9
Update Jenkinsfile
raknas999 Aug 10, 2019
844f7cf
Update Jenkinsfile
raknas999 Aug 10, 2019
a6dc9ef
Update Jenkinsfile
raknas999 Aug 10, 2019
b56abcb
Update Jenkinsfile
raknas999 Aug 10, 2019
91bffa9
Update Jenkinsfile
raknas999 Aug 10, 2019
fbccd46
Update Jenkinsfile
raknas999 Aug 10, 2019
4ea7c9e
Update Jenkinsfile
raknas999 Aug 10, 2019
0e2e85c
Update Jenkinsfile
raknas999 Aug 10, 2019
3cde4e8
Update sonar-project.properties
raknas999 Aug 10, 2019
bcf29d1
Update Jenkinsfile
raknas999 Aug 10, 2019
7c46b5b
Update Jenkinsfile
raknas999 Aug 10, 2019
6e49e0b
Update Jenkinsfile
raknas999 Aug 10, 2019
2098412
Update Jenkinsfile
raknas999 Aug 10, 2019
df75f30
Update Jenkinsfile
raknas999 Aug 11, 2019
aa8ff85
Update Jenkinsfile
raknas999 Aug 11, 2019
5802561
Update Jenkinsfile
raknas999 Aug 11, 2019
f48272f
Update sonar-project.properties
raknas999 Aug 12, 2019
b079a57
Update Jenkinsfile
raknas999 Aug 16, 2019
3579c0e
greeting changed
Aug 21, 2019
70bca3f
greeting msg
Aug 21, 2019
c827522
Update README.md
raknas999 Aug 21, 2019
e868704
hello world msg
Aug 21, 2019
5812eb5
Merge branch 'master' of https://github.com/raknas999/hello-world-ser…
Aug 21, 2019
0ea191e
greeting msg
Aug 21, 2019
bd0e77e
greeting changed
Aug 23, 2019
8bf3383
greeting changed again
Aug 23, 2019
5d97fc8
greetingchanged
Aug 23, 2019
85e8b73
august 26th
raknas999 Aug 26, 2019
917dcd2
year added
Aug 26, 2019
1c09d3e
hello
raknas999 Aug 26, 2019
0317aa6
Update pom.xml
raknas999 Aug 29, 2019
28b5d5b
Update pom.xml
raknas999 Sep 4, 2019
980f138
Update sonar-project.properties
raknas999 Sep 4, 2019
9de8c18
Update pom.xml
raknas999 Sep 4, 2019
1f57e10
Update Jenkinsfile
raknas999 Sep 5, 2019
5de1afd
Update pom.xml
raknas999 Sep 18, 2019
72faed0
Update README.md
raknas999 Nov 28, 2019
97bc49b
Update index.jsp
raknas999 Dec 3, 2019
0249370
readme changes on master br
Dec 10, 2019
9852b0d
readme changes on master br
Dec 10, 2019
de4fe75
today date added in readme file
raknas999 Dec 13, 2019
db5576d
Update index.jsp
raknas999 Dec 18, 2019
1999a75
Update README.md
raknas999 Feb 1, 2020
896b7bf
webhook test
raknas999 Feb 1, 2020
e48679c
Update README.md
raknas999 Mar 2, 2020
6116c13
Update README.md
raknas999 Apr 9, 2020
ff2f00b
Update README.md
raknas999 Apr 9, 2020
158f2a3
Update README.md
raknas999 Apr 9, 2020
73836be
readme changes
Jul 5, 2020
b25633a
readme changes
Jul 5, 2020
ec87c46
Update sonar-project.properties
raknas999 Jul 18, 2020
c521595
readme on 02/08
Aug 2, 2020
d70a6cd
some changes
Aug 2, 2020
fd792b6
Update sonar-project.properties
raknas999 Aug 2, 2020
8fb6b48
Update sonar-project.properties
raknas999 Aug 2, 2020
d22316e
06/10/2020 added
raknas999 Oct 6, 2020
77f4419
07/10/2020 added
raknas999 Oct 6, 2020
205440b
Update README.md
raknas999 Oct 6, 2020
598f396
master.txt file created
Oct 6, 2020
ed5c43f
Merge pull request #2 from raknas999/sprint-12
raknas999 Oct 6, 2020
cd33a96
Readme updated
Dec 1, 2020
bf94b38
Merge pull request #3 from raknas999/feature-dec
raknas999 Dec 1, 2020
2cae823
feb 25th added in readme file
Feb 25, 2021
71a6a5f
25th feb is thursday
Feb 25, 2021
f58489e
02/26 added in readme file
raknas999 Feb 26, 2021
e3e42d7
02/26 is firday
Feb 26, 2021
c26d0e3
some data added to 02/26
Feb 26, 2021
e82b24e
-3/15 changes
Mar 15, 2021
47cedc7
Merge pull request #4 from raknas999/sprint-1
raknas999 Mar 15, 2021
6bc31ed
03/15-Monday
raknas999 Mar 15, 2021
8383b3c
03/16 changes
Mar 16, 2021
24e7006
Merge pull request #5 from raknas999/sprint-1
raknas999 Mar 16, 2021
fd6ecc9
Update sonar-project.properties
raknas999 Mar 17, 2021
84aa18f
Update Jenkinsfile
raknas999 Mar 17, 2021
f988ea8
Update README.md
raknas999 Mar 22, 2021
60c9675
04/09/2021 changes
raknas999 Apr 9, 2021
a90effb
04/09 is firday
raknas999 Apr 9, 2021
89d65ee
12/04 changes
raknas999 Apr 12, 2021
d2b1bfd
Create deploy.yml
raknas999 Apr 22, 2021
f559b1b
Update Jenkinsfile
raknas999 Apr 22, 2021
aa9c2d6
Update index.jsp
raknas999 Apr 22, 2021
c502560
readme update on June-09-2021
Jun 9, 2021
6ccece3
Merge pull request #24 from raknas999/feature-june
raknas999 Jun 9, 2021
c041ae6
09-06-2021 is wednesday
raknas999 Jun 9, 2021
cdfd864
first line
raknas999 Jun 9, 2021
76d7586
Update deploy.yml
raknas999 Jul 2, 2021
78c5dfd
Update README.md
raknas999 Jul 5, 2021
8dd0d4c
monday
raknas999 Jul 5, 2021
b12bda0
Update README.md
raknas999 Jul 5, 2021
b9527ec
06/07 changes
raknas999 Jul 6, 2021
ee0a351
06/97 tuesday
raknas999 Jul 6, 2021
7b8388b
Update README.md
raknas999 Jul 6, 2021
016e139
Update sonar-project.properties
raknas999 Jul 18, 2021
725ad23
Update deploy.yml
raknas999 Jul 21, 2021
70851b0
Update deploy.yml
raknas999 Jul 22, 2021
bd93cc8
Update index.jsp
raknas999 Jul 22, 2021
2a89555
Update deploy.yml
raknas999 Aug 18, 2021
1ddc9d7
index update
Aug 18, 2021
3c2ba60
Merge pull request #35 from raknas999/master-changes
raknas999 Aug 18, 2021
61ab0dc
Update deploy.yml
raknas999 Oct 21, 2021
3496095
10/21/2021 changes
Oct 21, 2021
c7d6f70
Merge pull request #36 from raknas999/feature-3
raknas999 Oct 21, 2021
6112e5a
Update index.jsp
raknas999 Oct 21, 2021
01333aa
Update deploy.yml
raknas999 Oct 21, 2021
9f62992
Update deploy.yml
raknas999 Nov 11, 2021
e13e3f2
Update deploy.yml
raknas999 Nov 12, 2021
4452c3e
Update index.jsp
raknas999 Nov 12, 2021
512af41
Update deploy.yml
raknas999 Nov 12, 2021
ca47208
Update deploy.yml
raknas999 Nov 16, 2021
bbee9b8
home page updated with Devops
Nov 16, 2021
a4e8ea6
Merge pull request #37 from raknas999/feature-nov-21
raknas999 Nov 16, 2021
da93f3f
Update deploy.yml
raknas999 Nov 16, 2021
b840a5e
Update deploy.yml
raknas999 Mar 21, 2022
272856d
Create tomcat-setup.yml
raknas999 Mar 21, 2022
58aaa22
Create tomcat-users.xml
raknas999 Mar 21, 2022
5fab6b5
Update index.jsp
raknas999 Mar 22, 2022
52712fe
Update deploy.yml
raknas999 Mar 22, 2022
089033c
Update deploy.yml
raknas999 Mar 22, 2022
04e7852
Update deploy.yml
raknas999 Mar 24, 2022
02ff44c
Update deploy.yml
raknas999 Jun 28, 2022
eb18ec1
Update tomcat-setup.yml
raknas999 Jun 28, 2022
34fe2a7
launch page update
Jun 28, 2022
a58fc71
Merge pull request #50 from raknas999/feature-6
raknas999 Jun 28, 2022
f11c67e
Update deploy.yml
raknas999 Jun 28, 2022
27f9f5e
Update deploy.yml
raknas999 Jun 30, 2022
be16a8a
index page update
Jun 30, 2022
8a053eb
Merge pull request #51 from raknas999/feature-7
raknas999 Jun 30, 2022
24e0e79
Update deploy.yml
raknas999 Jun 30, 2022
984ebc2
Date Added
hgdeshmukh Oct 9, 2022
0fd8a5c
11th oct 2022 changes
Oct 11, 2022
38acdd8
Merge branch 'master' into develop
hgdeshmukh Oct 11, 2022
f0c3978
Did some changes again in a same file
Oct 11, 2022
624ae49
Merge branch 'develop' into feature-oct-11
hgdeshmukh Oct 11, 2022
1abb7d2
Merge pull request #2 from hgdeshmukh/feature-oct-11
hgdeshmukh Oct 11, 2022
27ccb0c
todays date and day is added
hgdeshmukh Dec 12, 2022
0c451e6
word format date is added
hgdeshmukh Dec 12, 2022
1738a26
yesterday date and day is added
hgdeshmukh Dec 12, 2022
aed27b5
tomorrow's date and day is added
hgdeshmukh Dec 12, 2022
631c4bd
a great day ahead on 13/12
hgdeshmukh Dec 12, 2022
22d421a
Update pom.xml
hgdeshmukh Dec 29, 2022
2366c94
Update pom.xml
hgdeshmukh Dec 29, 2022
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
96 changes: 67 additions & 29 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,38 +1,76 @@
node {

def mvnHome

stage('Preparation') {
// for display purposes
pipeline {
agent any
tools {
maven 'Maven'

}
stages {

stage('Preparation') {
steps {
// for display purposes

// Get some code from a GitHub repository
// Get some code from a GitHub repository

git 'https://github.com/raknas999/hello-world-servlet.git'
git 'https://github.com/raknas999/hello-world-servlet.git'

// Get the Maven tool.
// Get the Maven tool.

// ** NOTE: This 'M3' Maven tool must be configured
// ** NOTE: This 'M3' Maven tool must be configured

// ** in the global configuration.

mvnHome = tool 'Maven'
}
}
}

stage('Build') {
// Run the maven build
stage('Build') {
steps {
// Run the maven build

if (isUnix()) {
sh "'${mvnHome}/bin/mvn' -Dmaven.test.failure.ignore clean package"
}
else {
bat(/"${mvnHome}\bin\mvn" -Dmaven.test.failure.ignore clean package/)

}
}
//if (isUnix()) {
sh 'mvn -Dmaven.test.failure.ignore=true install'
//}
//else {
// bat(/"${mvnHome}\bin\mvn" -Dmaven.test.failure.ignore clean package/)
}
//}
}

stage('Results') {
junit '**/target/surefire-reports/TEST-*.xml'
archive 'target/*.war'

}
}
stage('Results') {
steps {
junit '**/target/surefire-reports/TEST-*.xml'
archiveArtifacts 'target/*.war'
}
}
stage('Sonarqube') {
environment {
scannerHome = tool 'sonarqube'
}
steps {
withSonarQubeEnv('sonarqube') {
sh "${scannerHome}/bin/sonar-scanner"
}
// timeout(time: 10, unit: 'MINUTES') {
// waitForQualityGate abortPipeline: true
// }
}
}
stage('Artifact upload') {
steps {
nexusPublisher nexusInstanceId: '1234', nexusRepositoryId: 'releases', packages: [[$class: 'MavenPackage', mavenAssetList: [[classifier: '', extension: '', filePath: 'target/helloworld.war']], mavenCoordinate: [artifactId: 'hello-world-servlet-example', groupId: 'com.geekcap.vmturbo', packaging: 'war', version: '$BUILD_NUMBER']]]
}
}
stage('Deploy War') {
steps {
sh label: '', script: 'ansible-playbook deploy.yml'
}
}
}
post {
success {
mail to:"[email protected]", subject:"SUCCESS: ${currentBuild.fullDisplayName}", body: "Build success"
}
failure {
mail to:"[email protected]", subject:"FAILURE: ${currentBuild.fullDisplayName}", body: "Build failed"
}
}
}
33 changes: 33 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,38 @@ sample
10-06-2022--->it is firday
16-06-2022--> today is THURSDAY
21-06-2022
feature-oct-11
11-10-2022----> this is todays changes to the feature-oct-11 branc
11-10-2022 ---> Today is Tuesday (same changes made again)
HHHHHHHHHHelloWorld Servlet repo example with corresponding Dockerfile!fff
hdfdfdfdfdellioooo
DFFFDFDF
monday 26th august 2019
hello
devops 9am batch
ddsdsdsd
webhook test
10/12/2019
13/12/2019
03/02/2020
09/04/2020 ---> THURSDAY
05/07/2020
05/07/2020 ---> Sundayss
05/07/2020 ---> Sundayss
06/10/2020
07/10/2020
08/10/2020
01/12/2020
02/25/2021 --> Thursday
02/26/2021 --> Friday is last day for the week
03/15/2021 -->Monday
03/16/2021
03/22/2021
09/04/2021--->Friday
12/04/2021
09/06/2021-->Wednesday
05/07/2021 ---> Monday is today
06/07/2021 ---> Today is Tuesday
10/21/2021
9/10/2022
develop
31 changes: 31 additions & 0 deletions deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
- hosts: webservers
become: true
tasks:
- name: Stop Tomcat
service: name=tomcat state=stopped
- name: Check that war file exist
stat:
path: /usr/share/tomcat/webapps/hello-world-servlet-example.war
register: stat_result

- name: Delete the war file, if it exist already
file:
path: /usr/share/tomcat/webapps/hello-world-servlet-example.war
state: absent
when: stat_result.stat.exists == True
- name: Check that GAMEOFLIFE dir exist
stat:
path: /usr/share/tomcat/webapps/hello-world-servlet-example
register: stat_result
- name: Delete the GAMEOFLIFE dir, if it exist already
file:
path: /usr/share/tomcat/webapps/hello-world-servlet-example
state: absent
when: stat_result.stat.exists == True
- name: Deploy War File
get_url:
url: http://3.136.84.66:8081/nexus/service/local/artifact/maven/redirect?r=releases&g=com.geekcap.vmturbo&a=hello-world-servlet-example&p=war&v=3
dest: /usr/share/tomcat/webapps/hello-world-servlet-example.war
- name: Start Tomcat
service: name=tomcat state=started
1 change: 1 addition & 0 deletions master.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
first line
16 changes: 16 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -148,4 +148,20 @@
</plugin>
</plugins>
</build>
<distributionManagement>

<repository>
<id>releases</id>
<name>Releases</name>
<url>http://18.189.17.172:8081/nexus/content/repositories/releases</url>
</repository>

<snapshotRepository>
<id>snapshots</id>
<name>Snapshots</name>
<url>http://18.189.17.172:8081/nexus/content/repositories/snapshots</url>
</snapshotRepository>

</distributionManagement>

</project>
7 changes: 7 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
sonar.projectKey=HelloWorldServlet-Pipeline
sonar.projectName=HelloWorldServlet-Pipeline
sonar.projectVersion=1.0
sonar.sources=/var/lib/jenkins/workspace/HelloWorldServlet-Pipeline
sonar.java.binaries=/var/lib/jenkins/workspace/HelloWorldServlet-Pipeline/target/classes/
sonar.jacoco.reportPaths=/var/lib/jenkins/workspace/HelloWorldServlet-Pipeline/target/jacoco.exec
sonar.sourceEncoding=UTF-8
2 changes: 1 addition & 1 deletion src/main/java/com/geekcap/vmturbo/HelloWorldServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ public class HelloWorldServlet extends HttpServlet
{
public void service( HttpServletRequest req, HttpServletResponse res ) throws IOException {
PrintWriter out = res.getWriter();
out.println( "Hello, Mr. Good mORNING" );
out.println( "Hello, Mr Sankar. Good MORNING" );
out.close();
}
}
2 changes: 2 additions & 0 deletions src/main/webapp/index.jsp
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<html>
<body>
<h2>Hello Welcome to SANKAR'S world!</h2>
=======
<h2>Welcome to JENKIN's World!</h2>
</body>
</html>
2 changes: 2 additions & 0 deletions tomcat-setup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
- name: Copy fil
copy:
src: /var/lib/jenkins/workspace/HelloWorldServlet-Pipeline/tomcat-users.xml
=======
src: /var/lib/jenkins/hello-world-servlet/tomcat-users.xml
dest: /usr/share/tomcat/conf/tomcat-users.xml
- name: enable service tomcat
systemd:
Expand Down