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..10dd443bf3
--- /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/varikuppala5667/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.36.96: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..965ca503b6
--- /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/varikuppala5667/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.12.152:/home/ec2-user/apache-tomcat-9.0.76/webapps/
+
+ ssh ec2-user@172.31.12.152 /home/ec2-user/apache-tomcat-9.0.76/bin/shutdown.sh
+
+ ssh ec2-user@172.31.12.152 /home/ec2-user/apache-tomcat-9.0.76/bin/startup.sh
+
+ """
+ }
+
+ }
+ }
+ }
+}
diff --git a/Jenkins-docker b/Jenkins-docker
new file mode 100644
index 0000000000..08ffa1aa78
--- /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/varikuppala5667/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.11.221:8081',
+ nexusVersion: 'nexus3',
+ protocol: 'http',
+ repository: 'sample-releases',
+ version: '8.2.0'
+ }
+ }
+ stage('Build Docker Image'){
+ steps{
+ sh 'docker build -t meghanaops/spring-boot-mongo .'
+ sh 'docker build -t tomcat:${BUILD_NUMBER} .'
+ sh 'docker run -itd --name sunil36 -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 meghanaops -p ${DOCKER_HUB_CREDENTIALS}"
+ }
+ sh 'docker push meghanaops/spring-boot-mongo'
+ }
+ }
+
+
+ }
+}
diff --git a/Jenkins-kube b/Jenkins-kube
new file mode 100644
index 0000000000..2ab92481db
--- /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/varikuppala5667/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.7.169:8081',
+ nexusVersion: 'nexus3',
+ protocol: 'http',
+ repository: 'sample-releases',
+ version: '8.2.0'
+ }
+ }
+ stage('Build Docker Image'){
+ steps{
+ sh 'docker build -t meghanaops/spring-boot-mongo .'
+ }
+ }
+ stage('Push Docker Image'){
+ steps{
+ withCredentials([string(credentialsId: 'DOCKER_HUB_CREDENTIALS', variable: 'DOCKER_HUB_CREDENTIALS')]) {
+ sh "docker login -u meghanaops -p ${DOCKER_HUB_CREDENTIALS}"
+ }
+ sh 'docker push meghanaops/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..ea9402c1e9
--- /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.40.8: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.41.172:/home/ec2-user/apache-tomcat-9.0.64/webapps/
+
+ ssh ec2-user@172.31.41.172 /home/ec2-user/apache-tomcat-9.0.64/bin/shutdown.sh
+
+ ssh ec2-user@172.31.41.172 /home/ec2-user/apache-tomcat-9.0.64/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/ajay b/ajay
new file mode 100644
index 0000000000..3baccfb8f8
--- /dev/null
+++ b/ajay
@@ -0,0 +1 @@
+this is ajay
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/copy.yml b/copy.yml
new file mode 100644
index 0000000000..04e8a54feb
--- /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.78/webapps/
diff --git a/dev.in b/dev.in
new file mode 100644
index 0000000000..430440db7f
--- /dev/null
+++ b/dev.in
@@ -0,0 +1,3 @@
+[webservers]
+172.31.41.148 ansible_user=ec2-user
+
diff --git a/hema b/hema
new file mode 100644
index 0000000000..3e58913447
--- /dev/null
+++ b/hema
@@ -0,0 +1 @@
+this is hema
diff --git a/kuberneeteswork b/kuberneeteswork
new file mode 100644
index 0000000000..c62c831dbf
--- /dev/null
+++ b/kuberneeteswork
@@ -0,0 +1 @@
+This is containeriztion and archestration tool
diff --git a/kumar b/kumar
new file mode 100644
index 0000000000..b73e3e8074
--- /dev/null
+++ b/kumar
@@ -0,0 +1 @@
+This is sunil kumar
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/pom.xml b/pom.xml
index 8e7ea14187..473e5ed2a2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,9 @@
kammana
-
+ http://13.127.33.143:9000/
+
+
@@ -26,14 +28,22 @@
nexusRepo
- http://13.233.230.166:8081/repository/maven-snapshots/
+ http://43.204.109.241:8081/repository/sample-snapshots/
nexusRepo
- http://13.233.230.166:8081/repository/maven-releases/
+ http://43.204.109.241:8081/repository/sample-releases/
+
+
+
+ maven1
+ Maven.org
+ http://repo1.maven.org/maven2
+
+
diff --git a/springBoot.yml b/springBoot.yml
new file mode 100644
index 0000000000..849b54e448
--- /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: meghanaops/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..1d9fbd24f4 100644
--- a/src/main/webapp/index.jsp
+++ b/src/main/webapp/index.jsp
@@ -1,5 +1,5 @@
- JavaHome App Version-16
+ MAROLIX
diff --git a/sunil b/sunil
new file mode 100644
index 0000000000..a29d12140c
--- /dev/null
+++ b/sunil
@@ -0,0 +1,2 @@
+He is good person and
+intelligent person
diff --git a/sunil1 b/sunil1
new file mode 100644
index 0000000000..665108c632
--- /dev/null
+++ b/sunil1
@@ -0,0 +1 @@
+hi this is sunil
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
+
+
+
+
+