From 27ea993c8e742043614c56b64392c90e5069355a Mon Sep 17 00:00:00 2001 From: Ram Thalla Date: Sun, 26 Nov 2017 16:16:36 +0000 Subject: [PATCH 01/17] modified pom to include nexus settings --- .idea/.name | 1 + .idea/compiler.xml | 16 +++ .idea/misc.xml | 13 ++ .idea/modules.xml | 8 ++ .idea/vcs.xml | 6 + .idea/workspace.xml | 306 ++++++++++++++++++++++++++++++++++++++++ pom.xml | 64 +++++++-- sample-java-project.iml | 12 ++ 8 files changed, 416 insertions(+), 10 deletions(-) create mode 100644 .idea/.name create mode 100644 .idea/compiler.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml create mode 100644 sample-java-project.iml diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 00000000..df28b812 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +@artifactId@ \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 00000000..388c4956 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 00000000..3a6c3d23 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 00000000..a0f873f1 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 00000000..94a25f7f --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 00000000..060c8370 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,306 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + @@ -252,34 +209,33 @@ - - + - + - - - - - + + + + + - - - - - + + + + + - - + + - + - - + + @@ -290,6 +246,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -298,5 +278,13 @@ + + + + + + + + \ No newline at end of file diff --git a/Jenkinsfile b/Jenkinsfile index 451b4090..b5ed6938 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,13 +1,29 @@ +pipeline { + agent any -stage 'Init' -node { - checkout scm - sh 'echo $BRANCH_NAME' -} -if (env.BRANCH_NAME == 'master') { - stage 'Only on master' - println 'This happens only on master' -} else { - stage 'Other branches' - println "Current branch ${env.BRANCH_NAME}" -} + stages { + stage('Build') { + steps { + withMaven(maven : 'm2'){ + sh 'mvn clean compile' + } + } + } + stage('Tting stage'){ + steps { + withMaven(maven : 'm2'){ + sh 'mvn test' + } + + } + } + stage('Deploy') { + steps { + withMaven(maven : 'm2'){ + sh 'mvn deploy' + } + + } + } + } +} \ No newline at end of file diff --git a/sample-java-project.iml b/sample-java-project.iml index 4fd5057c..52ad2f50 100644 --- a/sample-java-project.iml +++ b/sample-java-project.iml @@ -1,5 +1,5 @@ - + From 915299ed71b6af052d517f66239940ddb3dbbc0f Mon Sep 17 00:00:00 2001 From: Ram Thalla Date: Sat, 30 Dec 2017 14:25:32 +0000 Subject: [PATCH 11/17] Update pom.xml --- pom.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index b387a66b..ff0bc91f 100644 --- a/pom.xml +++ b/pom.xml @@ -56,9 +56,13 @@ + + org.apache.maven.plugins + maven-surefire-plugin + 2.20.1 + - - + org.sonatype.plugins nexus-staging-maven-plugin 1.5.1 From a6f5c4d070a0ca8d6d74d0b070682f7778bd10d2 Mon Sep 17 00:00:00 2001 From: Ram Thalla Date: Sat, 30 Dec 2017 14:36:58 +0000 Subject: [PATCH 12/17] Create hello hr r --- hello hr r | 1 + 1 file changed, 1 insertion(+) create mode 100644 hello hr r diff --git a/hello hr r b/hello hr r new file mode 100644 index 00000000..6ff37537 --- /dev/null +++ b/hello hr r @@ -0,0 +1 @@ +dfds From 9e255a6469cb5cda979189510a0a24ad0b567100 Mon Sep 17 00:00:00 2001 From: Ram Thalla Date: Sat, 30 Dec 2017 21:45:47 +0000 Subject: [PATCH 13/17] Update Jenkinsfile --- Jenkinsfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index b5ed6938..d7d31c1b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,14 +4,14 @@ pipeline { stages { stage('Build') { steps { - withMaven(maven : 'm2'){ + withMaven(maven : 'maven_3_5_2'){ sh 'mvn clean compile' } } } stage('Tting stage'){ steps { - withMaven(maven : 'm2'){ + withMaven(maven : 'maven_3_5_2'){ sh 'mvn test' } @@ -19,11 +19,11 @@ pipeline { } stage('Deploy') { steps { - withMaven(maven : 'm2'){ + withMaven(maven : 'maven_3_5_2'){ sh 'mvn deploy' } } } } -} \ No newline at end of file +} From 53025d5342e79bb5e74558b78504a7b279ccdaa9 Mon Sep 17 00:00:00 2001 From: Ram Thalla Date: Sat, 30 Dec 2017 21:50:27 +0000 Subject: [PATCH 14/17] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index ff0bc91f..f9bd74a7 100644 --- a/pom.xml +++ b/pom.xml @@ -36,7 +36,7 @@ devops - http://http://localhost:8081/nexus/content/repositories/devops/ + http://localhost:8081/repository/devops/ From 452a47825299abef2b88baa542be922e69269967 Mon Sep 17 00:00:00 2001 From: Ram Thalla Date: Sat, 30 Dec 2017 21:53:24 +0000 Subject: [PATCH 15/17] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f9bd74a7..ea5c483e 100644 --- a/pom.xml +++ b/pom.xml @@ -77,7 +77,7 @@ nexus - http://localhost:8081/nexus/ + http://localhost:8081 true From 395a8e1e0a72b6cc4cb03646844a95d3fbbb4d25 Mon Sep 17 00:00:00 2001 From: Ram Thalla Date: Sat, 30 Dec 2017 22:14:28 +0000 Subject: [PATCH 16/17] Update pom.xml --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index ea5c483e..943f0aa3 100644 --- a/pom.xml +++ b/pom.xml @@ -1,11 +1,11 @@ 4.0.0 com.companyname.devops - devops + sample-java-project 1.3-SNAPSHOT jar - sample-project + sample-java-project @description@ @project.url@ From 9595e145a1e4186a87b6a0563cc9ba1025ac7dcf Mon Sep 17 00:00:00 2001 From: Ram Thalla Date: Sat, 30 Dec 2017 22:36:19 +0000 Subject: [PATCH 17/17] Update pom.xml --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 943f0aa3..cedfbd18 100644 --- a/pom.xml +++ b/pom.xml @@ -1,7 +1,7 @@ 4.0.0 com.companyname.devops - sample-java-project + devops 1.3-SNAPSHOT jar