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

Dev1 #39

Open
wants to merge 3,521 commits into
base: master
Choose a base branch
from
Open

Dev1 #39

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
3521 commits
Select commit Hold shift + click to select a range
8b10bc0
o1
srinivas1987devops Mar 22, 2022
75aa7af
Merge branch 'master' of https://github.com/srinivas1987devops/myweb
srinivas1987devops Mar 22, 2022
0a6136f
Update one
srinivas1987devops Mar 22, 2022
977d193
Update one
srinivas1987devops Mar 22, 2022
28bd465
Update one
srinivas1987devops Mar 22, 2022
d27072a
o2
srinivas1987devops Mar 22, 2022
b27f115
m1
srinivas1987devops Mar 22, 2022
9736f20
m2
srinivas1987devops Mar 22, 2022
24c9e1b
m3
srinivas1987devops Mar 22, 2022
5c524e9
Merge branch 'fet2' into dev2
srinivas1987devops Mar 22, 2022
d79472d
m4
srinivas1987devops Mar 22, 2022
bd12465
Merge branch 'dev2'
srinivas1987devops Mar 22, 2022
e161ca6
Update Jenkins-decnew
srinivas1987devops Mar 23, 2022
6102dc2
Update index.jsp
srinivas1987devops Mar 23, 2022
e70a5f2
c1
srinivas1987devops Mar 23, 2022
de931d8
Merge branch 'master' of https://github.com/srinivas1987devops/myweb
srinivas1987devops Mar 23, 2022
be16f8d
Create prequest
srinivas1987devops Mar 23, 2022
82f49f8
Merge pull request #239 from srinivas1987devops/fet2
srinivas1987devops Mar 23, 2022
ecef10e
Merge pull request #240 from srinivas1987devops/dev2
srinivas1987devops Mar 23, 2022
9450af1
Update pom.xml
srinivas1987devops Mar 25, 2022
afbd6c3
Update Jenkins-docker
srinivas1987devops Mar 25, 2022
6730e45
Update Jenkins-docker
srinivas1987devops Mar 25, 2022
b8e02e8
Update index.jsp
srinivas1987devops Mar 25, 2022
910d9ed
Update pom.xml
srinivas1987devops Mar 28, 2022
4876665
Delete cherry1
srinivas1987devops Mar 28, 2022
7d1468c
Update pom.xml
srinivas1987devops Mar 30, 2022
d53f1e7
Update pom.xml
srinivas1987devops Mar 30, 2022
cc95487
Update pom.xml
srinivas1987devops Mar 30, 2022
0a634b3
Update pom.xml
srinivas1987devops Mar 30, 2022
caa22d6
Update pom.xml
srinivas1987devops Mar 31, 2022
fe3bbf3
Update pom.xml
srinivas1987devops Mar 31, 2022
44bf460
Update index.jsp
srinivas1987devops Mar 31, 2022
7079197
Update index.jsp
srinivas1987devops Mar 31, 2022
1637e5b
Update pom.xml
srinivas1987devops Apr 1, 2022
2a82c27
Update pom.xml
srinivas1987devops Apr 1, 2022
09e8ace
Update Jenkins-sonar-nexus-tomcat
srinivas1987devops Apr 1, 2022
7cbb401
Update Jenkins-sonar-nexus-tomcat
srinivas1987devops Apr 1, 2022
7fe1171
Update index.jsp
srinivas1987devops Apr 1, 2022
f6a709e
Update pom.xml
srinivas1987devops Apr 1, 2022
ed16748
Update Jenkins-kube
srinivas1987devops Apr 1, 2022
ac46003
Update index.jsp
srinivas1987devops Apr 1, 2022
2c39e26
Update index.jsp
srinivas1987devops Apr 1, 2022
c6f536c
Update index.jsp
srinivas1987devops Apr 5, 2022
09535f2
Delete arun-git.txt
srinivas1987devops Apr 6, 2022
1895a19
Delete m1
srinivas1987devops Apr 6, 2022
a0cd9c8
Delete m2
srinivas1987devops Apr 6, 2022
3da0af7
Delete m3
srinivas1987devops Apr 6, 2022
a8e7646
Delete m4
srinivas1987devops Apr 6, 2022
46b16fa
Delete mohan
srinivas1987devops Apr 6, 2022
13c17b7
Delete sanju
srinivas1987devops Apr 6, 2022
c99993d
Delete one
srinivas1987devops Apr 6, 2022
a71289c
Delete prequest
srinivas1987devops Apr 6, 2022
0f3bcb1
Delete srini
srinivas1987devops Apr 6, 2022
ed6e42b
Delete vamsi
srinivas1987devops Apr 6, 2022
04086d7
Update Jenkins-decnew
srinivas1987devops Apr 6, 2022
c7ada37
Update index.jsp
srinivas1987devops Apr 6, 2022
1d393f5
Update pom.xml
srinivas1987devops Apr 8, 2022
685660a
Update dev.in
srinivas1987devops Apr 11, 2022
919d166
Update copy.yml
srinivas1987devops Apr 11, 2022
f11691f
Update pom.xml
srinivas1987devops Apr 11, 2022
bd44992
Update Jenkins-ansible
srinivas1987devops Apr 11, 2022
adfdbb0
Update index.jsp
srinivas1987devops Apr 11, 2022
50f8721
123
srinivas1987devops Apr 11, 2022
8cceec1
Update pom.xml
srinivas1987devops Apr 11, 2022
6a7a580
Update pom.xml
srinivas1987devops Apr 11, 2022
84b3b16
Update pom.xml
srinivas1987devops Apr 11, 2022
98a337f
r1
srinivas1987devops Apr 12, 2022
356e281
Create mahendar
srinivas1987devops Apr 12, 2022
39fdfda
m2
srinivas1987devops Apr 12, 2022
e96368d
Update pom.xml
srinivas1987devops Apr 12, 2022
eeca101
Update pom.xml
srinivas1987devops Apr 12, 2022
4b247b4
Update index.jsp
srinivas1987devops Apr 12, 2022
c2334c4
Update Jenkins-sonar-nexus-tomcat
srinivas1987devops Apr 12, 2022
8ce2fcc
Update Jenkins-sonar-nexus-tomcat
srinivas1987devops Apr 12, 2022
378b807
Update index.jsp
srinivas1987devops Apr 12, 2022
7b3acc9
Update index.jsp
srinivas1987devops Apr 12, 2022
518dec0
s1
srinivas1987devops Apr 13, 2022
bcedbea
Merge branch 'master' of https://github.com/srinivas1987devops/myweb
srinivas1987devops Apr 13, 2022
73bf57e
Update srini
srinivas1987devops Apr 13, 2022
b173a4f
Add files via upload
srinivas1987devops Apr 13, 2022
497bb06
Add files via upload
srinivas1987devops Apr 13, 2022
592fdc5
s3
srinivas1987devops Apr 13, 2022
71731ba
cr1
srinivas1987devops Apr 14, 2022
d75cc56
one
srinivas1987devops Apr 14, 2022
c955935
two
srinivas1987devops Apr 14, 2022
dff43c3
Merge branch 'fet300' into dev300
srinivas1987devops Apr 14, 2022
6e0ad08
three
srinivas1987devops Apr 14, 2022
294d11d
Merge branch 'dev300'
srinivas1987devops Apr 14, 2022
e2ef763
1
srinivas1987devops Apr 14, 2022
c79427b
2
srinivas1987devops Apr 14, 2022
22aee50
Merge branch 'fet300' into dev300
srinivas1987devops Apr 14, 2022
8362b6d
3
srinivas1987devops Apr 14, 2022
dc217bb
Merge branch 'dev300'
srinivas1987devops Apr 14, 2022
6fce6f7
c1
srinivas1987devops Apr 14, 2022
62202a5
Create jhony
srinivas1987devops Apr 14, 2022
269a574
Merge pull request #248 from srinivas1987devops/fet300
srinivas1987devops Apr 14, 2022
5a53b16
Merge pull request #249 from srinivas1987devops/dev300
srinivas1987devops Apr 14, 2022
30acc3f
Update pom.xml
srinivas1987devops Apr 18, 2022
858f0a1
Update Jenkins-docker
srinivas1987devops Apr 18, 2022
a62b0e2
m1
srinivas1987devops Apr 18, 2022
e862775
0
srinivas1987devops Apr 19, 2022
3376c96
Merge branch 'master' of https://github.com/srinivas1987devops/myweb
srinivas1987devops Apr 19, 2022
2f3be3a
Update rajesh
srinivas1987devops Apr 19, 2022
75a219f
Update rajesh
srinivas1987devops Apr 19, 2022
5cf2080
Update pom.xml
srinivas1987devops Apr 22, 2022
7ff0a41
Update pom.xml
srinivas1987devops Apr 22, 2022
13bb90c
Update Jenkins-ansible
srinivas1987devops Apr 22, 2022
2f10485
Update dev.in
srinivas1987devops Apr 22, 2022
c06a703
Update pom.xml
srinivas1987devops Apr 23, 2022
28268bb
Update Jenkins-kube
srinivas1987devops Apr 23, 2022
e25775e
Update index.jsp
srinivas1987devops Apr 26, 2022
a9b5136
Update index.jsp
srinivas1987devops Apr 26, 2022
cb47faf
Update index.jsp
srinivas1987devops Apr 29, 2022
c7569df
Update pom.xml
srinivas1987devops Apr 29, 2022
7baecd0
Update Jenkins-kube
srinivas1987devops Apr 29, 2022
e5d124c
Update Jenkins-decnew
srinivas1987devops Apr 30, 2022
b4dc1ad
Update index.jsp
srinivas1987devops Apr 30, 2022
66c7b21
Update pom.xml
srinivas1987devops Apr 30, 2022
2b4ff42
Update pom.xml
srinivas1987devops May 2, 2022
6c51461
Update pom.xml
srinivas1987devops May 2, 2022
3c823e6
Update pom.xml
srinivas1987devops May 2, 2022
e6562e5
Update pom.xml
srinivas1987devops May 2, 2022
cc5770b
Update pom.xml
srinivas1987devops May 3, 2022
2447b11
Update index.jsp
srinivas1987devops May 3, 2022
57faa63
Update Jenkins-sonar-nexus-tomcat
srinivas1987devops May 3, 2022
a29f3f5
Update Jenkins-sonar-nexus-tomcat
srinivas1987devops May 3, 2022
aead998
Update index.jsp
srinivas1987devops May 3, 2022
cc8a4f8
Update index.jsp
srinivas1987devops May 3, 2022
51a0b4b
Delete awsinfra.pdf
srinivas1987devops May 5, 2022
af32bb7
Delete srini
srinivas1987devops May 5, 2022
a7ec1ca
Delete sbicr1.0
srinivas1987devops May 5, 2022
c4a7797
Delete rajesh
srinivas1987devops May 5, 2022
9855cff
Delete s3
srinivas1987devops May 5, 2022
cd64336
Delete s2
srinivas1987devops May 5, 2022
c57e5fa
Delete s1
srinivas1987devops May 5, 2022
1db1583
Delete one
srinivas1987devops May 5, 2022
020ad38
Delete mr3
srinivas1987devops May 5, 2022
065c52f
Delete jhony
srinivas1987devops May 5, 2022
3c12674
Delete mr2
srinivas1987devops May 5, 2022
d8c6280
Delete mr1
srinivas1987devops May 5, 2022
9d8635d
Delete ch1
srinivas1987devops May 5, 2022
4299536
Delete mahendar
srinivas1987devops May 5, 2022
4c0e0de
Delete mani1
srinivas1987devops May 5, 2022
d4d4657
m1
srinivas1987devops May 5, 2022
210a96d
s1
srinivas1987devops May 6, 2022
598a585
Update srini123
srinivas1987devops May 6, 2022
1fce150
Create jamalpasha
srinivas1987devops May 6, 2022
9741480
Add files via upload
srinivas1987devops May 6, 2022
710c02d
Update mahesh
srinivas1987devops May 6, 2022
e45d06c
Update jamalpasha
srinivas1987devops May 6, 2022
804026c
m3
srinivas1987devops May 6, 2022
57c5e6b
merge1
srinivas1987devops May 10, 2022
ecd48a3
c1
srinivas1987devops May 10, 2022
455f652
c2
srinivas1987devops May 10, 2022
bb3cea8
Merge branch 'fet1' into dev1
srinivas1987devops May 10, 2022
2f44392
c3
srinivas1987devops May 10, 2022
9560b81
Merge branch 'dev1'
srinivas1987devops May 10, 2022
dbd02e3
cr1
srinivas1987devops May 10, 2022
a06ed6f
Create pr001
srinivas1987devops May 10, 2022
d3a8ef6
Merge pull request #256 from srinivas1987devops/fet1
srinivas1987devops May 10, 2022
6e3a226
Merge pull request #257 from srinivas1987devops/dev1
srinivas1987devops May 10, 2022
a3ce7a4
Update pom.xml
srinivas1987devops May 12, 2022
32f5435
Update dev.in
srinivas1987devops May 12, 2022
cba0f5d
Update Jenkins-ansible
srinivas1987devops May 12, 2022
1c4922c
Update index.jsp
srinivas1987devops May 12, 2022
d0d2287
Update index.jsp
srinivas1987devops May 17, 2022
cd32e61
Update index.jsp
srinivas1987devops May 17, 2022
b7dba4d
srini
srinivas1987devops May 17, 2022
47b805a
n1
srinivas1987devops May 18, 2022
f4e3977
123
srinivas1987devops May 18, 2022
023d522
Create pavan123
srinivas1987devops May 18, 2022
f7125c1
Add files via upload
srinivas1987devops May 18, 2022
b542035
Update index.jsp
srinivas1987devops May 19, 2022
3db6569
Update pom.xml
srinivas1987devops May 19, 2022
0fc045a
m1
srinivas1987devops May 19, 2022
6533847
Merge branch 'master' of https://github.com/srinivas1987devops/myweb
srinivas1987devops May 19, 2022
aefc3a0
c2
srinivas1987devops May 19, 2022
6e2ea72
Delete mohan1
srinivas1987devops May 19, 2022
ad000ee
Update mahesh2
srinivas1987devops May 19, 2022
0c490b8
Update mahesh2
srinivas1987devops May 19, 2022
5f6bc17
Create f2
srinivas1987devops May 19, 2022
b1c6005
Update f2
srinivas1987devops May 19, 2022
adbb2d5
f3
srinivas1987devops May 19, 2022
7418914
z1
srinivas1987devops May 19, 2022
5a46fdd
z2
srinivas1987devops May 19, 2022
7feafef
z2
srinivas1987devops May 19, 2022
cf36a0d
Merge branch 'fet2' into dev2
srinivas1987devops May 19, 2022
bd7cd59
z4
srinivas1987devops May 19, 2022
b589b32
Merge branch 'dev2'
srinivas1987devops May 19, 2022
4b30864
y
srinivas1987devops May 19, 2022
01454fc
Update Jenkins-docker
srinivas1987devops May 19, 2022
e64a829
Update Jenkins-decnew
srinivas1987devops May 20, 2022
a091ef2
Update index.jsp
srinivas1987devops May 20, 2022
917dad2
Create pr7
srinivas1987devops May 20, 2022
4b7d154
Merge pull request #261 from srinivas1987devops/fet2
srinivas1987devops May 20, 2022
d96ff74
Merge pull request #262 from srinivas1987devops/dev2
srinivas1987devops May 20, 2022
f21e332
Update pom.xml
srinivas1987devops May 23, 2022
03bab55
Update pom.xml
srinivas1987devops May 24, 2022
06e7bd0
Update pom.xml
srinivas1987devops May 24, 2022
4b573ae
Update pom.xml
srinivas1987devops May 24, 2022
61eb8f9
Update pom.xml
srinivas1987devops May 24, 2022
29daee9
Delete abc
srinivas1987devops May 24, 2022
5b7c810
Delete arun-git.txt
srinivas1987devops May 24, 2022
2048585
Delete c1
srinivas1987devops May 24, 2022
3a6eca1
Delete c2
srinivas1987devops May 24, 2022
8c267ba
Delete c3
srinivas1987devops May 24, 2022
fc11d25
Delete cherry1
srinivas1987devops May 24, 2022
1273612
Delete f2
srinivas1987devops May 24, 2022
af6f94f
Delete jamalpasha
srinivas1987devops May 24, 2022
daf7762
Delete kalyan
srinivas1987devops May 24, 2022
ff0ce82
Delete m1
srinivas1987devops May 24, 2022
04a2b9b
Delete madan-linux.txt
srinivas1987devops May 24, 2022
8c3637f
Delete mahesh
srinivas1987devops May 24, 2022
91455c8
Delete mahesh2
srinivas1987devops May 24, 2022
0bccb78
Delete new1
srinivas1987devops May 24, 2022
1161951
Delete pavan123
srinivas1987devops May 24, 2022
6a362f2
Delete pr001
srinivas1987devops May 24, 2022
4602145
Delete pr7
srinivas1987devops May 24, 2022
14c4b0e
Delete srini123
srinivas1987devops May 24, 2022
051b11f
Delete y2k
srinivas1987devops May 24, 2022
c5537ee
Delete z1
srinivas1987devops May 24, 2022
3cb6c9c
Delete z2
srinivas1987devops May 24, 2022
473f85c
Delete z3
srinivas1987devops May 24, 2022
a12cb77
Delete z4
srinivas1987devops May 24, 2022
2b4f8f6
Update pom.xml
srinivas1987devops May 26, 2022
f951cb4
Update index.jsp
srinivas1987devops May 26, 2022
a99d910
Update Jenkins-sonar-nexus-tomcat
srinivas1987devops May 26, 2022
cfa1200
Update Jenkins-sonar-nexus-tomcat
srinivas1987devops May 26, 2022
2fbc225
Update index.jsp
srinivas1987devops May 26, 2022
57d2fff
Update index.jsp
srinivas1987devops May 26, 2022
ed18b4c
Update pom.xml
srinivas1987devops May 27, 2022
9c44422
Update Jenkins-kube
srinivas1987devops May 27, 2022
5235736
b1
srinivas1987devops May 27, 2022
7112e48
Update index.jsp
srinivas1987devops May 30, 2022
007eb6b
Update index.jsp
srinivas1987devops May 30, 2022
ec06dee
s1
srinivas1987devops May 30, 2022
6a6276c
Create venu
srinivas1987devops May 30, 2022
ec8d1a8
123
srinivas1987devops May 30, 2022
a87bd32
Add files via upload
srinivas1987devops May 30, 2022
a1c3a4a
Update sateesh
srinivas1987devops May 30, 2022
5957d97
Update sateesh
srinivas1987devops May 30, 2022
9a10099
Update index.jsp
srinivas1987devops May 31, 2022
6d1b263
a1
srinivas1987devops Jun 1, 2022
9dcacdd
Merge branch 'master' of https://github.com/srinivas1987devops/myweb
srinivas1987devops Jun 1, 2022
d448e47
a2
srinivas1987devops Jun 1, 2022
7657fd7
Create mani
srinivas1987devops Jun 2, 2022
daa3fd0
Merge pull request #278 from srinivas1987devops/fet1
srinivas1987devops Jun 2, 2022
91729f4
Create madan
srinivas1987devops Jun 2, 2022
982db5a
Create f2
srinivas1987devops Jun 2, 2022
b132302
Merge pull request #280 from srinivas1987devops/fet1
srinivas1987devops Jun 2, 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
6 changes: 6 additions & 0 deletions 123Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM tomcat:8.0.20-jre8
# Dummy text to test
COPY target/myweb*.war /usr/local/tomcat/webapps/myweb.war

# Git webhook trigger demo
# TO test github push trigger
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@ FROM tomcat:8.0.20-jre8
# Dummy text to test
COPY target/myweb*.war /usr/local/tomcat/webapps/myweb.war

# Git webhook trigger demo
# TO test github push trigger
48 changes: 48 additions & 0 deletions Jenkins-ansible
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
pipeline{
agent any
tools {
maven 'Maven-3.6.1'
}

environment{
PATH = "/opt/maven3/bin:$PATH"
}
stages{
stage("Git Checkout"){
steps{
git credentialsId: 'javahome2', url: 'https://github.com/srinivas1987devops/myweb.git'
}
}
stage("Maven Build"){
steps{
sh "mvn clean sonar:sonar package"

}
}
stage('Upload War To Nexus'){
steps{
nexusArtifactUploader artifacts: [
[
artifactId: 'myweb',
classifier: '',
file: "target/myweb-8.2.0.war",
type: 'war'
]
],
credentialsId: 'nexus3',
groupId: 'in.javahome',
nexusUrl: '172.31.32.8:8081',
nexusVersion: 'nexus3',
protocol: 'http',
repository: 'sample-releases',
version: '8.2.0'
}
}
stage("Execute Ansible"){
steps{
ansiblePlaybook credentialsId: 'private-key', disableHostKeyChecking: true, installation: 'ansible2', inventory: 'dev.in', playbook: 'copy.yml'
}

}
}
}
46 changes: 46 additions & 0 deletions Jenkins-appnew
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
pipeline{
agent any
stages{
stage("Git Checkout"){
steps{
git credentialsId: 'javahome2', url: 'https://github.com/srinivas1987devops/myweb.git'
}

stages{
stage('Maven Build'){
steps{
echo "${getLatestCommitId()}"
sh "mvn clean package"
}
}

stage('Docker Build Image'){
steps{
sh "docker build . -t prashanthi2021/qa:${getLatestCommitId()}"
}
}

stage('push to docker hub'){
steps{
withCredentials([string(credentialsId: 'docker-hub', variable: 'dockerPwd')]) {
sh "docker login -u prashanthi2021 -p ${dockerPwd}"
sh "docker push prashanthi2021/qa:${getLatestCommitId()}"
}

}
}

stage('dev-deploy'){
steps{
sshagent(['docker-dev']) {
sh "ssh -o StrictHostKeyChecking=no [email protected] docker rm -f mywebapp"
sh "ssh -o StrictHostKeyChecking=no [email protected] docker run -d -p 8080:8080 --name mywebapp prashanthi2021/qa:${getLatestCommitId()}"
}
}
}
}
}
}
}


17 changes: 17 additions & 0 deletions Jenkins-decdemo
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
pipeline{
agent any
stages{
stage("GIT checkout"){
steps{
git credentialsId: 'javahome', url: 'https://github.com/srinivas1987devops/myweb.git'

}
}
stage("Maven Build"){
steps{
sh "mvn clean package"
sh "mv target/*.war target/myweb.war"
}
}
}
}
35 changes: 35 additions & 0 deletions Jenkins-decnew
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
pipeline{
agent any

environment{
PATH = "/opt/maven3/bin:$PATH"
}
stages{
stage("Git Checkout"){
steps{
git credentialsId: 'javahome2', url: 'https://github.com/srinivas1987devops/myweb.git'
}
}
stage("Maven Build"){
steps{
sh "mvn clean package"
sh "mv target/*.war target/myweb.war"
}
}
stage("deploy-dev"){
steps{
sshagent(['tomcat-new']) {
sh """
scp -o StrictHostKeyChecking=no target/myweb.war [email protected]:/home/ec2-user/apache-tomcat-9.0.63/webapps/

ssh [email protected] /home/ec2-user/apache-tomcat-9.0.63/bin/shutdown.sh

ssh [email protected] /home/ec2-user/apache-tomcat-9.0.63/bin/startup.sh

"""
}

}
}
}
}
59 changes: 59 additions & 0 deletions Jenkins-docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
pipeline{
agent any
tools {
maven 'Maven-3.6.1'
}

environment{
PATH = "/opt/maven3/bin:$PATH"
}
stages{
stage("Git Checkout"){
steps{
git credentialsId: 'javahome2', url: 'https://github.com/srinivas1987devops/myweb.git'
}
}
stage("Maven Build"){
steps{
sh "mvn clean sonar:sonar package"

}
}
stage('Upload War To Nexus'){
steps{
nexusArtifactUploader artifacts: [
[
artifactId: 'myweb',
classifier: '',
file: "target/myweb-8.2.0.war",
type: 'war'
]
],
credentialsId: 'nexus3',
groupId: 'in.javahome',
nexusUrl: '172.31.6.128:8081',
nexusVersion: 'nexus3',
protocol: 'http',
repository: 'sample-releases',
version: '8.2.0'
}
}
stage('Build Docker Image'){
steps{
sh 'docker build -t deepikac2021/spring-boot-mongo .'
sh 'docker build -t tomcat:${BUILD_NUMBER} .'
sh 'docker run -itd --name srini36 -p 2900:8080 tomcat:${BUILD_NUMBER}'
}
}
stage('Push Docker Image'){
steps{
withCredentials([string(credentialsId: 'DOCKER_HUB_CREDENTIALS', variable: 'DOCKER_HUB_CREDENTIALS')]) {
sh "docker login -u deepikac2021 -p ${DOCKER_HUB_CREDENTIALS}"
}
sh 'docker push deepikac2021/spring-boot-mongo'
}
}


}
}
65 changes: 65 additions & 0 deletions Jenkins-kube
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
pipeline{
agent any
tools {
maven 'Maven-3.6.1'
}

environment{
PATH = "/opt/maven3/bin:$PATH"
}
stages{
stage("Git Checkout"){
steps{
git credentialsId: 'javahome2', url: 'https://github.com/srinivas1987devops/myweb.git'
}
}
stage("Maven Build"){
steps{
sh "mvn clean sonar:sonar package"

}
}
stage('Upload War To Nexus'){
steps{
nexusArtifactUploader artifacts: [
[
artifactId: 'myweb',
classifier: '',
file: "target/myweb-8.2.0.war",
type: 'war'
]
],
credentialsId: 'nexus3',
groupId: 'in.javahome',
nexusUrl: '172.31.47.43:8081',
nexusVersion: 'nexus3',
protocol: 'http',
repository: 'sample-releases',
version: '8.2.0'
}
}
stage('Build Docker Image'){
steps{
sh 'docker build -t deepikac2021/spring-boot-mongo .'
}
}
stage('Push Docker Image'){
steps{
withCredentials([string(credentialsId: 'DOCKER_HUB_CREDENTIALS', variable: 'DOCKER_HUB_CREDENTIALS')]) {
sh "docker login -u deepikac2021 -p ${DOCKER_HUB_CREDENTIALS}"
}
sh 'docker push deepikac2021/spring-boot-mongo'
}
}
stage("Deploy To Kuberates Cluster"){
steps{
kubernetesDeploy(
configs: 'springBoot.yml',
kubeconfigId: 'KUBERNETES_CLUSTER_CONFIG',
enableConfigSubstitution: true
)
}
}

}
}
57 changes: 57 additions & 0 deletions Jenkins-sonar-nexus-tomcat
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
pipeline{
agent any
tools {
maven 'Maven-3.6.1'
}

environment{
PATH = "/opt/maven3/bin:$PATH"
}
stages{
stage("Git Checkout"){
steps{
git credentialsId: 'javahome2', url: 'https://github.com/srinivas1987devops/myweb.git'
}
}
stage("Maven Build"){
steps{
sh "mvn clean sonar:sonar package"

}
}
stage('Upload War To Nexus'){
steps{
nexusArtifactUploader artifacts: [
[
artifactId: 'myweb',
classifier: '',
file: "target/myweb-8.2.0.war",
type: 'war'
]
],
credentialsId: 'nexus3',
groupId: 'in.javahome',
nexusUrl: '172.31.45.55:8081',
nexusVersion: 'nexus3',
protocol: 'http',
repository: 'sample-releases',
version: '8.2.0'
}
}
stage("deploy-dev"){
steps{
sshagent(['tomcat-new']) {
sh """
scp -o StrictHostKeyChecking=no target/myweb-8.2.0.war [email protected]:/home/ec2-user/apache-tomcat-9.0.63/webapps/

ssh [email protected] /home/ec2-user/apache-tomcat-9.0.63/bin/shutdown.sh

ssh [email protected] /home/ec2-user/apache-tomcat-9.0.63/bin/startup.sh

"""
}

}
}
}
}
41 changes: 41 additions & 0 deletions Jenkins-terraform
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
pipeline {

parameters {
string(name: 'environment', defaultValue: 'prod', description: 'Workspace/Environment file to use for deployment')
string(name: 'region', defaultValue: 'ap-northeast-1', description: 'Workspace/region file to use for deployment')


}
agent any
stages {
stage('Download terraform code from Gihub') {
steps {
git credentialsId: 'javahome2', url: 'https://github.com/srinivas1987devops/myweb.git'
}
}
stage('Terraform Ininitialization') {
steps {
sh """
cd /var/lib/jenkins/workspace/terraform
terraform init -reconfigure
"""
}
}
stage('Terraform Plan') {
steps {
sh """
cd /var/lib/jenkins/workspace/terraform
terraform plan -out=plan.${BUILD_NUMBER} -var profile=${params.environment} -var region=${params.region}
"""
}
}
stage('Terraform Apply') {
steps {
sh """
cd /var/lib/jenkins/workspace/terraform
terraform apply plan.${BUILD_NUMBER}
"""
}
}
}
}
3 changes: 3 additions & 0 deletions Jenkinsfile007
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

pipeline{

Empty file added apple
Empty file.
1 change: 1 addition & 0 deletions bhavani
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
she is new to cloud and automation
Loading