diff --git a/123Dockerfile b/123Dockerfile
new file mode 100644
index 0000000000..69084ef35d
--- /dev/null
+++ b/123Dockerfile
@@ -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
diff --git a/Dockerfile b/Dockerfile
index 69084ef35d..720df6b3d7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -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
diff --git a/Jenkins-ansible b/Jenkins-ansible
new file mode 100644
index 0000000000..1fd05fb71e
--- /dev/null
+++ b/Jenkins-ansible
@@ -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'
+ }
+
+ }
+ }
+}
diff --git a/Jenkins-appnew b/Jenkins-appnew
new file mode 100644
index 0000000000..3f2b3511ad
--- /dev/null
+++ b/Jenkins-appnew
@@ -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 ec2-user@172.31.1.118 docker rm -f mywebapp"
+ sh "ssh -o StrictHostKeyChecking=no ec2-user@172.31.1.118 docker run -d -p 8080:8080 --name mywebapp prashanthi2021/qa:${getLatestCommitId()}"
+ }
+ }
+ }
+ }
+}
+}
+}
+
+
diff --git a/Jenkins-decdemo b/Jenkins-decdemo
new file mode 100644
index 0000000000..032870a253
--- /dev/null
+++ b/Jenkins-decdemo
@@ -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"
+ }
+ }
+ }
+}
diff --git a/Jenkins-decnew b/Jenkins-decnew
new file mode 100644
index 0000000000..3cc19c9eb2
--- /dev/null
+++ b/Jenkins-decnew
@@ -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 ec2-user@172.31.1.22:/home/ec2-user/apache-tomcat-9.0.63/webapps/
+
+ ssh ec2-user@172.31.1.22 /home/ec2-user/apache-tomcat-9.0.63/bin/shutdown.sh
+
+ ssh ec2-user@172.31.1.22 /home/ec2-user/apache-tomcat-9.0.63/bin/startup.sh
+
+ """
+ }
+
+ }
+ }
+ }
+}
diff --git a/Jenkins-docker b/Jenkins-docker
new file mode 100644
index 0000000000..713b5562cd
--- /dev/null
+++ b/Jenkins-docker
@@ -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'
+ }
+ }
+
+
+ }
+}
diff --git a/Jenkins-kube b/Jenkins-kube
new file mode 100644
index 0000000000..44b8fcf474
--- /dev/null
+++ b/Jenkins-kube
@@ -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
+ )
+ }
+ }
+
+ }
+}
diff --git a/Jenkins-sonar-nexus-tomcat b/Jenkins-sonar-nexus-tomcat
new file mode 100644
index 0000000000..23150fe954
--- /dev/null
+++ b/Jenkins-sonar-nexus-tomcat
@@ -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 ec2-user@172.31.33.55:/home/ec2-user/apache-tomcat-9.0.63/webapps/
+
+ ssh ec2-user@172.31.33.55 /home/ec2-user/apache-tomcat-9.0.63/bin/shutdown.sh
+
+ ssh ec2-user@172.31.33.55 /home/ec2-user/apache-tomcat-9.0.63/bin/startup.sh
+
+ """
+ }
+
+ }
+ }
+ }
+}
diff --git a/Jenkins-terraform b/Jenkins-terraform
new file mode 100644
index 0000000000..75456cf2b8
--- /dev/null
+++ b/Jenkins-terraform
@@ -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}
+ """
+ }
+ }
+ }
+}
diff --git a/Jenkinsfile007 b/Jenkinsfile007
new file mode 100644
index 0000000000..c6f3cdbfc3
--- /dev/null
+++ b/Jenkinsfile007
@@ -0,0 +1,3 @@
+
+pipeline{
+
diff --git a/apple b/apple
new file mode 100644
index 0000000000..e69de29bb2
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
new file mode 100644
index 0000000000..0a2b52b7fc
--- /dev/null
+++ b/azure-pipelines.yml
@@ -0,0 +1,29 @@
+# Starter pipeline
+# Start with a minimal pipeline that you can customize to build and deploy your code.
+# Add steps that build, run tests, deploy, and more:
+# https://aka.ms/yaml
+
+trigger:
+- master
+
+pool:
+ vmImage: 'ubuntu-latest'
+
+steps:
+- script: echo Hello, world!
+ displayName: 'Run a one-line script'
+
+- script: |
+ echo Add other tasks to build, test, and deploy your project.
+ echo See https://aka.ms/yaml
+ displayName: 'Run a multi-line script'
+- task: Maven@3
+ inputs:
+ mavenPomFile: 'pom.xml'
+ publishJUnitResults: true
+ testResultsFiles: '**/surefire-reports/TEST-*.xml'
+ javaHomeOption: 'JDKVersion'
+ mavenVersionOption: 'Default'
+ mavenAuthenticateFeed: false
+ effectivePomSkip: false
+ sonarQubeRunAnalysis: false
\ No newline at end of file
diff --git a/bhavani b/bhavani
new file mode 100644
index 0000000000..de8a7e28ac
--- /dev/null
+++ b/bhavani
@@ -0,0 +1 @@
+she is new to cloud and automation
diff --git a/copy.yml b/copy.yml
new file mode 100644
index 0000000000..5c6a884277
--- /dev/null
+++ b/copy.yml
@@ -0,0 +1,7 @@
+---
+ - hosts: webservers
+ tasks:
+ - name: copy the file from local to remote
+ copy:
+ src: target/myweb-8.2.0.war
+ dest: /usr/local/apache-tomcat-9.0.62/webapps/
diff --git a/dev.in b/dev.in
new file mode 100644
index 0000000000..333b97c278
--- /dev/null
+++ b/dev.in
@@ -0,0 +1,2 @@
+[webservers]
+172.31.36.124 ansible_user=ec2-user
diff --git a/f2 b/f2
new file mode 100644
index 0000000000..aa51c0afd7
--- /dev/null
+++ b/f2
@@ -0,0 +1 @@
+bcuhbbcijbiocj
diff --git a/jeevan.pem b/jeevan.pem
new file mode 100644
index 0000000000..8c4e1a26e1
--- /dev/null
+++ b/jeevan.pem
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEogIBAAKCAQEAnbXXN6xIhr0XulcG241GcF0b67OoG9Rya0AcDXLlOO1+51cH
+P1Ip7BYJjSJblDmN3VRjNJ/jWXIYmgPM+2Q9TMq6zuYmH0YhGPBRLRA78vjt5W9b
+fzMu8s/yT7t1n9r6XJq6He8BMgV/PZ1A1Uc0zRGDdws9Yo86hqIPDqVlTALWpOei
+Hc+praWpe4++D+UwaalLxAi6Fi8GcaQMyjWeD0y+II3UScUiu4NntdpPY7edYPUY
+a1y1s6K7gMSkiaR7Lwy4X1ngfH2rYaGI+bU4E/MJ/S4q6Bd8uVumRfe5qUgmnKHq
+qcLoVRvdizopPbbzsCUOGjryksUakGVrGS9jAQIDAQABAoIBAGV0hW8bNcz3+Du3
+oIG88IN4Ym3OtWax1KmKJIHCWBO3NNw98Dub77wgsSRJ5gAExm6LywYflXIFJC5w
+I33VjlnIUUSoaf3Ub5ZLgu0qdGZqHSBr8sBxfNJXU9pXDeQ4SrcoEnMPPgWf46sP
+bpXFqQIDMj9yy5qL6WqS9nzFidTLOki1wpFPOAuA2k9mmMNjwtZChyymepGtwCEj
+o5VcPZTDQYhdF0/Zwrl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an b/madan
new file mode 100644
index 0000000000..211ade27b6
--- /dev/null
+++ b/madan
@@ -0,0 +1 @@
+he is new cloud and automation
diff --git a/main.tf b/main.tf
new file mode 100644
index 0000000000..421856d9d5
--- /dev/null
+++ b/main.tf
@@ -0,0 +1,13 @@
+# Configure the AWS Provider
+provider "aws" {
+ region = var.region
+ profile = var.profile
+}
+resource "aws_instance" "web7" {
+ ami = "${lookup(var.ami, var.region)}"
+ instance_type = "${lookup(var.instancetype, var.region)}"
+
+ tags = {
+ Name = "HelloWorld9"
+ }
+}
diff --git a/mani b/mani
new file mode 100644
index 0000000000..449c195936
--- /dev/null
+++ b/mani
@@ -0,0 +1 @@
+He is new to pull request
diff --git a/pom.xml b/pom.xml
index 8e7ea14187..7a2f144e47 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,9 @@
kammana
-
+ http://54.250.1.41:9000/
+
+
@@ -26,14 +28,22 @@
nexusRepo
- http://13.233.230.166:8081/repository/maven-snapshots/
+ http://18.183.142.110:8081/repository/sample-snapshots/
nexusRepo
- http://13.233.230.166:8081/repository/maven-releases/
+ http://18.183.142.110:8081/repository/sample-releases/
+
+
+
+ maven1
+ Maven.org
+ http://repo1.maven.org/maven2
+
+
diff --git a/sateesh b/sateesh
new file mode 100644
index 0000000000..3c3db36c75
--- /dev/null
+++ b/sateesh
@@ -0,0 +1,9 @@
+one
+two
+three
+four
+five
+six
+seven
+eight
+nine
diff --git a/springBoot.yml b/springBoot.yml
new file mode 100644
index 0000000000..8eec0608d5
--- /dev/null
+++ b/springBoot.yml
@@ -0,0 +1,32 @@
+# Replication Controller for springapp
+apiVersion: v1
+kind: ReplicationController
+metadata:
+ name: spring-controller
+spec:
+ replicas: 1
+ selector:
+ app: springboot
+ template:
+ metadata:
+ labels:
+ app: springboot
+ spec:
+ containers:
+ - image: deepikac2021/spring-boot-mongo
+ name: springboot
+ ports:
+ - containerPort: 8080
+---
+# Node Port Service For SpringApp
+apiVersion: v1
+kind: Service
+metadata:
+ name: springboot
+spec:
+ type: NodePort
+ ports:
+ - port: 8080
+ targetPort: 8080
+ selector:
+ app: springboot
diff --git a/src/main/java/in/javahome/myweb/controller/Calculator.java b/src/main/java/in/javahome/myweb/controller/Calculator.java
index 4c8671e881..905221bfa4 100644
--- a/src/main/java/in/javahome/myweb/controller/Calculator.java
+++ b/src/main/java/in/javahome/myweb/controller/Calculator.java
@@ -10,8 +10,6 @@ public class Calculator {
* @return int
*/
public int add(int i, int j){
- String name = null;
- name.toString();
return i+j;
}
public int multiply(int i, int j){
diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp
index 81677c09ce..455a35377f 100644
--- a/src/main/webapp/index.jsp
+++ b/src/main/webapp/index.jsp
@@ -1,5 +1,5 @@
- JavaHome App Version-16
+ GANA TECH APP VERSION-900
diff --git a/var.tf b/var.tf
new file mode 100644
index 0000000000..65482ca136
--- /dev/null
+++ b/var.tf
@@ -0,0 +1,20 @@
+variable "region" {
+ type = string
+}
+variable "profile" {
+ type = string
+}
+variable "ami" {
+ type = map
+ default = {
+ ap-northeast-1 = "ami-0218d08a1f9dac831"
+ us-east-2 = "ami-002068ed284fb165b"
+ }
+}
+variable "instancetype" {
+ type = map
+ default = {
+ ap-northeast-1 = "t2.micro"
+ us-east-2 = "t3.micro"
+ }
+}
diff --git a/vasu.xml b/vasu.xml
new file mode 100644
index 0000000000..d80e789f11
--- /dev/null
+++ b/vasu.xml
@@ -0,0 +1,39 @@
+
+ 4.0.0
+ in.javahome
+ myweb
+ war
+ 8.2.0
+ Java Home myweb
+ http://maven.apache.org
+
+
+ kammana
+ http://54.65.244.211:9000/
+
+
+
+
+
+
+ junit
+ junit
+ 3.8.1
+ test
+
+
+
+
+
+
+
+
+ maven1
+ Maven.org
+ http://repo1.maven.org/maven2
+
+
+
+
+
diff --git a/venu b/venu
new file mode 100644
index 0000000000..aa9d66f2a2
--- /dev/null
+++ b/venu
@@ -0,0 +1,2 @@
+He is also new to git and github
+jenkins and sonar