From d8dfdecf80d73242e115e34ff868be4f0bf8cc1f Mon Sep 17 00:00:00 2001 From: root Date: Wed, 2 Aug 2017 16:59:18 +0000 Subject: [PATCH 01/18] added files --- license.txt | 1 + maheshfile | 0 one.java | 0 3 files changed, 1 insertion(+) create mode 100644 license.txt create mode 100644 maheshfile create mode 100644 one.java diff --git a/license.txt b/license.txt new file mode 100644 index 000000000000..ccb8e8b00a2d --- /dev/null +++ b/license.txt @@ -0,0 +1 @@ +This is my license doc diff --git a/maheshfile b/maheshfile new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/one.java b/one.java new file mode 100644 index 000000000000..e69de29bb2d1 From 68cbddc7c2ce6e1f385cffe54344acea58abe95f Mon Sep 17 00:00:00 2001 From: root Date: Thu, 3 Aug 2017 15:45:23 +0000 Subject: [PATCH 02/18] touch file added --- touch | 1 + 1 file changed, 1 insertion(+) create mode 100644 touch diff --git a/touch b/touch new file mode 100644 index 000000000000..d4d33dd3fa08 --- /dev/null +++ b/touch @@ -0,0 +1 @@ +My new file for git From 87dbc990acb97c653475f90c15e2cbb97e44eaf5 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 3 Aug 2017 15:45:31 +0000 Subject: [PATCH 03/18] added LICNESE FILE --- LICENSE.txt | 4 +++- license.txt | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index d64569567334..c5e06c160d5d 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -5,7 +5,9 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - 1. Definitions. +q.defination + + "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. diff --git a/license.txt b/license.txt index ccb8e8b00a2d..1c1e39e459a1 100644 --- a/license.txt +++ b/license.txt @@ -1 +1,3 @@ -This is my license doc +this is my license file +license number : y4300430 + From 49968dcd2c41d8c1ed5f1124e26054626749e4a1 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 3 Aug 2017 15:49:39 +0000 Subject: [PATCH 04/18] license1.txt --- license1.txt | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 license1.txt diff --git a/license1.txt b/license1.txt new file mode 100644 index 000000000000..5d3d9154a768 --- /dev/null +++ b/license1.txt @@ -0,0 +1,3 @@ +my US license.txt file +y430043 + From 72ba81ce2ea5bc3e00d2e5db988248f474cc99b1 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 10 Aug 2017 17:44:44 +0000 Subject: [PATCH 05/18] added folder and two files --- git1.java | 3 +++ gitpractice/one.java | 0 license1.txt | 3 --- 3 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 git1.java create mode 100644 gitpractice/one.java delete mode 100644 license1.txt diff --git a/git1.java b/git1.java new file mode 100644 index 000000000000..96de5fb5ad15 --- /dev/null +++ b/git1.java @@ -0,0 +1,3 @@ +hi this isgit practice script +`:wq! + diff --git a/gitpractice/one.java b/gitpractice/one.java new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/license1.txt b/license1.txt deleted file mode 100644 index 5d3d9154a768..000000000000 --- a/license1.txt +++ /dev/null @@ -1,3 +0,0 @@ -my US license.txt file -y430043 - From 7dfb794b13792980d9a9381aafeca2ed6ced7d64 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 16 Aug 2017 11:13:06 +0000 Subject: [PATCH 06/18] added java file and txt file --- spring-boot-samples/spring-boot-sample-atmosphere/license.txt | 3 +++ spring-boot-samples/spring-boot-sample-atmosphere/one.java | 0 2 files changed, 3 insertions(+) create mode 100644 spring-boot-samples/spring-boot-sample-atmosphere/license.txt create mode 100644 spring-boot-samples/spring-boot-sample-atmosphere/one.java diff --git a/spring-boot-samples/spring-boot-sample-atmosphere/license.txt b/spring-boot-samples/spring-boot-sample-atmosphere/license.txt new file mode 100644 index 000000000000..c3eee4b6d22b --- /dev/null +++ b/spring-boot-samples/spring-boot-sample-atmosphere/license.txt @@ -0,0 +1,3 @@ +this is my license file +and i am doing my practice over here + diff --git a/spring-boot-samples/spring-boot-sample-atmosphere/one.java b/spring-boot-samples/spring-boot-sample-atmosphere/one.java new file mode 100644 index 000000000000..e69de29bb2d1 From e1d067f8e91dfe6614130104a8374c2234d2ec03 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 16 Aug 2017 12:43:35 +0000 Subject: [PATCH 07/18] added new license file --- .../spring-boot-sample-atmosphere/newlicense.txt | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 spring-boot-samples/spring-boot-sample-atmosphere/newlicense.txt diff --git a/spring-boot-samples/spring-boot-sample-atmosphere/newlicense.txt b/spring-boot-samples/spring-boot-sample-atmosphere/newlicense.txt new file mode 100644 index 000000000000..143067ac7f71 --- /dev/null +++ b/spring-boot-samples/spring-boot-sample-atmosphere/newlicense.txt @@ -0,0 +1,7 @@ + this is new license file and +checking out branches by creating branches and checkout +;wq! + + +1:wq! + From 60db17cdec20795a9a6e83e4bc245057aced2f10 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 21 Aug 2017 11:13:42 +0000 Subject: [PATCH 08/18] added files for practice --- .../{one.java => gitpractice.xml} | 0 .../spring-boot-sample-atmosphere/license.txt | 3 --- .../spring-boot-sample-atmosphere/mahesh.txt | 0 .../spring-boot-sample-atmosphere/mahesh_license.txt | 0 .../spring-boot-sample-atmosphere/newlicense.txt | 7 ------- 5 files changed, 10 deletions(-) rename spring-boot-samples/spring-boot-sample-atmosphere/{one.java => gitpractice.xml} (100%) delete mode 100644 spring-boot-samples/spring-boot-sample-atmosphere/license.txt create mode 100644 spring-boot-samples/spring-boot-sample-atmosphere/mahesh.txt create mode 100644 spring-boot-samples/spring-boot-sample-atmosphere/mahesh_license.txt delete mode 100644 spring-boot-samples/spring-boot-sample-atmosphere/newlicense.txt diff --git a/spring-boot-samples/spring-boot-sample-atmosphere/one.java b/spring-boot-samples/spring-boot-sample-atmosphere/gitpractice.xml similarity index 100% rename from spring-boot-samples/spring-boot-sample-atmosphere/one.java rename to spring-boot-samples/spring-boot-sample-atmosphere/gitpractice.xml diff --git a/spring-boot-samples/spring-boot-sample-atmosphere/license.txt b/spring-boot-samples/spring-boot-sample-atmosphere/license.txt deleted file mode 100644 index c3eee4b6d22b..000000000000 --- a/spring-boot-samples/spring-boot-sample-atmosphere/license.txt +++ /dev/null @@ -1,3 +0,0 @@ -this is my license file -and i am doing my practice over here - diff --git a/spring-boot-samples/spring-boot-sample-atmosphere/mahesh.txt b/spring-boot-samples/spring-boot-sample-atmosphere/mahesh.txt new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/spring-boot-samples/spring-boot-sample-atmosphere/mahesh_license.txt b/spring-boot-samples/spring-boot-sample-atmosphere/mahesh_license.txt new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/spring-boot-samples/spring-boot-sample-atmosphere/newlicense.txt b/spring-boot-samples/spring-boot-sample-atmosphere/newlicense.txt deleted file mode 100644 index 143067ac7f71..000000000000 --- a/spring-boot-samples/spring-boot-sample-atmosphere/newlicense.txt +++ /dev/null @@ -1,7 +0,0 @@ - this is new license file and -checking out branches by creating branches and checkout -;wq! - - -1:wq! - From d03a38faf2d26a7d310b7036ae63a93f4012be41 Mon Sep 17 00:00:00 2001 From: Anil Date: Thu, 21 Sep 2017 10:43:35 +0530 Subject: [PATCH 09/18] Created Jenkinsfile --- Jenkinsfile | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000000..eba82ce32b9e --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,46 @@ +pipeline { + +agent { node { label 'master' } } + + stages { + stage('Checkout') { + checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'aecbcb10-5ce2-412c-aef2-7e296a052fbf', url: 'https://github.com/akmaharshi/jenkins2-course-spring-boot.git/']]]) + } + + stage('Build') { + //withMaven(jdk: 'java', maven: 'maven') { + //maven 'maven' + //jdk 'java' + env.PATH = "${tool 'maven'}/bin:${env.PATH}" + sh 'mvn install -f spring-boot-samples/spring-boot-sample-atmosphere/pom.xml' + //} + } + + stage('Archive') { + archive 'spring-boot-samples/spring-boot-sample-atmosphere/target/*.jar' + } + + stage('Test Results') { + junit allowEmptyResults: true, testResults: 'spring-boot-samples/spring-boot-sample-atmosphere/target/surefire-reports/*.xml' + } + + stage('nexus upload') { + // sh 'mvn clean deploy -Dmaven.test.skip=true -f spring-boot-samples/spring-boot-sample-atmosphere/pom.xml' + nexusArtifactUploader { + nexusVersion('nexus2') + protocol('http') + nexusUrl('13.126.209.230:8081/nexus') + groupId('sp.sd') + version('1.4.0') + repository('NexusArtifactUploader') + credentialsId('442d2cff-ac4d-4143-9f2d-5e89f974f77a') + artifact { + artifactId('spring-boot-sample-atmosphere') + type('jar') + classifier('debug') + file('spring-boot-samples/spring-boot-sample-atmosphere/target/spring-boot-sample-atmosphere-1.4.0.BUILD-SNAPSHOT.jar') + } + } + } + +} From 374a8cc72be9758f763faec83234eeb3ff7fb674 Mon Sep 17 00:00:00 2001 From: Anil Date: Fri, 22 Sep 2017 08:34:18 +0530 Subject: [PATCH 10/18] create jenkins file --- .../spring-boot-sample-atmosphere/Jenkinsfile | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 spring-boot-samples/spring-boot-sample-atmosphere/Jenkinsfile diff --git a/spring-boot-samples/spring-boot-sample-atmosphere/Jenkinsfile b/spring-boot-samples/spring-boot-sample-atmosphere/Jenkinsfile new file mode 100644 index 000000000000..2dbf648a85f0 --- /dev/null +++ b/spring-boot-samples/spring-boot-sample-atmosphere/Jenkinsfile @@ -0,0 +1,33 @@ +pipeline { + agent { node { label 'master' } } + + stages { + stage('Checkout') { + checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'aecbcb10-5ce2-412c-aef2-7e296a052fbf', url: 'https://github.com/akmaharshi/jenkins2-course-spring-boot.git/']]]) + } + + stage('Build') { + //withMaven(jdk: 'java', maven: 'maven') { + //maven 'maven' + //jdk 'java' + env.PATH = "${tool 'maven'}/bin:${env.PATH}" + sh 'mvn package -Dmaven.test.skip=true -f spring-boot-samples/spring-boot-sample-atmosphere/pom.xml' + //} + } + + stage('Archive') { + archive 'spring-boot-samples/spring-boot-sample-atmosphere/target/*.jar' + } + + stage('Test Results') { + junit allowEmptyResults: true, testResults: 'spring-boot-samples/spring-boot-sample-atmosphere/target/surefire-reports/*.xml' + } + + stage('nexus upload') { + //sh 'mvn clean deploy -Dmaven.test.skip=true' + + // sh 'mvn clean deploy -Dmaven.test.skip=true -f spring-boot-samples/spring-boot-sample-atmosphere/pom.xml' + nexusArtifactUploader artifacts: [[artifactId: 'spring-boot-sample-atmosphere', classifier: 'debug', file: 'spring-boot-samples/spring-boot-sample-atmosphere/target/spring-boot-sample-atmosphere-1.4.0.BUILD-SNAPSHOT.jar', type: 'jar']], credentialsId: '6a9dbfd7-20c4-487d-b2bc-611ba2f7d77f', groupId: 'grooup.id', nexusUrl: '13.126.209.230:8080/nexus', nexusVersion: 'nexus2', protocol: 'http', repository: 'releases', version: '1.4.0' + } + } +} From f03aa4e70a91fffec16b9fa113f64075ec2cd979 Mon Sep 17 00:00:00 2001 From: Anil Date: Fri, 22 Sep 2017 09:16:17 +0530 Subject: [PATCH 11/18] update jenkins --- .../spring-boot-sample-atmosphere/Jenkinsfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/spring-boot-samples/spring-boot-sample-atmosphere/Jenkinsfile b/spring-boot-samples/spring-boot-sample-atmosphere/Jenkinsfile index 2dbf648a85f0..d0c4ddc1fb98 100644 --- a/spring-boot-samples/spring-boot-sample-atmosphere/Jenkinsfile +++ b/spring-boot-samples/spring-boot-sample-atmosphere/Jenkinsfile @@ -3,8 +3,11 @@ pipeline { stages { stage('Checkout') { - checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'aecbcb10-5ce2-412c-aef2-7e296a052fbf', url: 'https://github.com/akmaharshi/jenkins2-course-spring-boot.git/']]]) + cleanWs() + checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '38bcc0a7-70b9-4fc5-952c-06597c8b66d0', url: 'https://github.com/akmaharshi/jenkins2-course-spring-boot.git/']]]) } + + jenkins2-course-spring-boot/spring-boot-samples/spring-boot-sample-atmosphere/Jenkinsfile stage('Build') { //withMaven(jdk: 'java', maven: 'maven') { @@ -27,7 +30,8 @@ pipeline { //sh 'mvn clean deploy -Dmaven.test.skip=true' // sh 'mvn clean deploy -Dmaven.test.skip=true -f spring-boot-samples/spring-boot-sample-atmosphere/pom.xml' - nexusArtifactUploader artifacts: [[artifactId: 'spring-boot-sample-atmosphere', classifier: 'debug', file: 'spring-boot-samples/spring-boot-sample-atmosphere/target/spring-boot-sample-atmosphere-1.4.0.BUILD-SNAPSHOT.jar', type: 'jar']], credentialsId: '6a9dbfd7-20c4-487d-b2bc-611ba2f7d77f', groupId: 'grooup.id', nexusUrl: '13.126.209.230:8080/nexus', nexusVersion: 'nexus2', protocol: 'http', repository: 'releases', version: '1.4.0' + nexusArtifactUploader artifacts: [[artifactId: 'spring-boot-sample-atmosphere', classifier: '', file: 'spring-boot-samples/spring-boot-sample-atmosphere/target/spring-boot-sample-atmosphere-1.4.0.BUILD-SNAPSHOT.jar', type: 'jar']], credentialsId: 'cf5bbd82-2468-46d3-a99e-13df16ada832', groupId: 'grooup.id', nexusUrl: '13.126.209.230:8081/nexus', nexusVersion: 'nexus2', protocol: 'http', repository: 'releases', version: '1.4.0' + } } } From 3b2209ad7257a62640b1c85aa245e9a4c9ba4db5 Mon Sep 17 00:00:00 2001 From: Anil Date: Fri, 22 Sep 2017 09:17:30 +0530 Subject: [PATCH 12/18] jenkins file update --- spring-boot-samples/spring-boot-sample-atmosphere/Jenkinsfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spring-boot-samples/spring-boot-sample-atmosphere/Jenkinsfile b/spring-boot-samples/spring-boot-sample-atmosphere/Jenkinsfile index d0c4ddc1fb98..a85116637cf0 100644 --- a/spring-boot-samples/spring-boot-sample-atmosphere/Jenkinsfile +++ b/spring-boot-samples/spring-boot-sample-atmosphere/Jenkinsfile @@ -7,8 +7,7 @@ pipeline { checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '38bcc0a7-70b9-4fc5-952c-06597c8b66d0', url: 'https://github.com/akmaharshi/jenkins2-course-spring-boot.git/']]]) } - jenkins2-course-spring-boot/spring-boot-samples/spring-boot-sample-atmosphere/Jenkinsfile - + stage('Build') { //withMaven(jdk: 'java', maven: 'maven') { //maven 'maven' From a93144f90de185e7f409d4493816157d3c2adf92 Mon Sep 17 00:00:00 2001 From: Anil Date: Fri, 22 Sep 2017 09:21:25 +0530 Subject: [PATCH 13/18] jenkinsfile --- Jenkinsfile | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index eba82ce32b9e..10d5cab5c4a0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,15 +4,16 @@ agent { node { label 'master' } } stages { stage('Checkout') { - checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: 'aecbcb10-5ce2-412c-aef2-7e296a052fbf', url: 'https://github.com/akmaharshi/jenkins2-course-spring-boot.git/']]]) + cleanWs() + checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '38bcc0a7-70b9-4fc5-952c-06597c8b66d0', url: 'https://github.com/akmaharshi/jenkins2-course-spring-boot.git/']]]) } - + stage('Build') { //withMaven(jdk: 'java', maven: 'maven') { //maven 'maven' //jdk 'java' env.PATH = "${tool 'maven'}/bin:${env.PATH}" - sh 'mvn install -f spring-boot-samples/spring-boot-sample-atmosphere/pom.xml' + sh 'mvn package -Dmaven.test.skip=true -f spring-boot-samples/spring-boot-sample-atmosphere/pom.xml' //} } @@ -25,21 +26,11 @@ agent { node { label 'master' } } } stage('nexus upload') { + //sh 'mvn clean deploy -Dmaven.test.skip=true' + // sh 'mvn clean deploy -Dmaven.test.skip=true -f spring-boot-samples/spring-boot-sample-atmosphere/pom.xml' - nexusArtifactUploader { - nexusVersion('nexus2') - protocol('http') - nexusUrl('13.126.209.230:8081/nexus') - groupId('sp.sd') - version('1.4.0') - repository('NexusArtifactUploader') - credentialsId('442d2cff-ac4d-4143-9f2d-5e89f974f77a') - artifact { - artifactId('spring-boot-sample-atmosphere') - type('jar') - classifier('debug') - file('spring-boot-samples/spring-boot-sample-atmosphere/target/spring-boot-sample-atmosphere-1.4.0.BUILD-SNAPSHOT.jar') - } + nexusArtifactUploader artifacts: [[artifactId: 'spring-boot-sample-atmosphere', classifier: '', file: 'spring-boot-samples/spring-boot-sample-atmosphere/target/spring-boot-sample-atmosphere-1.4.0.BUILD-SNAPSHOT.jar', type: 'jar']], credentialsId: 'cf5bbd82-2468-46d3-a99e-13df16ada832', groupId: 'grooup.id', nexusUrl: '13.126.209.230:8081/nexus', nexusVersion: 'nexus2', protocol: 'http', repository: 'releases', version: '1.4.0' + } } From cb8f261aa1be2c061162410dce67bbc453f38f41 Mon Sep 17 00:00:00 2001 From: Anil Date: Fri, 22 Sep 2017 09:27:03 +0530 Subject: [PATCH 14/18] added steps --- .../spring-boot-sample-atmosphere/Jenkinsfile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/spring-boot-samples/spring-boot-sample-atmosphere/Jenkinsfile b/spring-boot-samples/spring-boot-sample-atmosphere/Jenkinsfile index a85116637cf0..ef5eeb7a46b6 100644 --- a/spring-boot-samples/spring-boot-sample-atmosphere/Jenkinsfile +++ b/spring-boot-samples/spring-boot-sample-atmosphere/Jenkinsfile @@ -3,8 +3,10 @@ pipeline { stages { stage('Checkout') { + steps{ cleanWs() checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '38bcc0a7-70b9-4fc5-952c-06597c8b66d0', url: 'https://github.com/akmaharshi/jenkins2-course-spring-boot.git/']]]) + } } @@ -12,25 +14,29 @@ pipeline { //withMaven(jdk: 'java', maven: 'maven') { //maven 'maven' //jdk 'java' + steps{ env.PATH = "${tool 'maven'}/bin:${env.PATH}" sh 'mvn package -Dmaven.test.skip=true -f spring-boot-samples/spring-boot-sample-atmosphere/pom.xml' - //} + } } stage('Archive') { + steps{ archive 'spring-boot-samples/spring-boot-sample-atmosphere/target/*.jar' - } + } } stage('Test Results') { + steps{ junit allowEmptyResults: true, testResults: 'spring-boot-samples/spring-boot-sample-atmosphere/target/surefire-reports/*.xml' - } + } } stage('nexus upload') { //sh 'mvn clean deploy -Dmaven.test.skip=true' - + steps{ // sh 'mvn clean deploy -Dmaven.test.skip=true -f spring-boot-samples/spring-boot-sample-atmosphere/pom.xml' nexusArtifactUploader artifacts: [[artifactId: 'spring-boot-sample-atmosphere', classifier: '', file: 'spring-boot-samples/spring-boot-sample-atmosphere/target/spring-boot-sample-atmosphere-1.4.0.BUILD-SNAPSHOT.jar', type: 'jar']], credentialsId: 'cf5bbd82-2468-46d3-a99e-13df16ada832', groupId: 'grooup.id', nexusUrl: '13.126.209.230:8081/nexus', nexusVersion: 'nexus2', protocol: 'http', repository: 'releases', version: '1.4.0' - + } } + } } From b497ebdb4c1537995b95530c78c5bed64d06bf07 Mon Sep 17 00:00:00 2001 From: Anil Date: Fri, 22 Sep 2017 09:28:42 +0530 Subject: [PATCH 15/18] steps added --- Jenkinsfile | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 10d5cab5c4a0..ef5eeb7a46b6 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,37 +1,42 @@ pipeline { - -agent { node { label 'master' } } + agent { node { label 'master' } } - stages { + stages { stage('Checkout') { + steps{ cleanWs() checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '38bcc0a7-70b9-4fc5-952c-06597c8b66d0', url: 'https://github.com/akmaharshi/jenkins2-course-spring-boot.git/']]]) + } } - + + stage('Build') { //withMaven(jdk: 'java', maven: 'maven') { //maven 'maven' //jdk 'java' + steps{ env.PATH = "${tool 'maven'}/bin:${env.PATH}" sh 'mvn package -Dmaven.test.skip=true -f spring-boot-samples/spring-boot-sample-atmosphere/pom.xml' - //} + } } stage('Archive') { + steps{ archive 'spring-boot-samples/spring-boot-sample-atmosphere/target/*.jar' - } + } } stage('Test Results') { + steps{ junit allowEmptyResults: true, testResults: 'spring-boot-samples/spring-boot-sample-atmosphere/target/surefire-reports/*.xml' - } + } } stage('nexus upload') { //sh 'mvn clean deploy -Dmaven.test.skip=true' - + steps{ // sh 'mvn clean deploy -Dmaven.test.skip=true -f spring-boot-samples/spring-boot-sample-atmosphere/pom.xml' nexusArtifactUploader artifacts: [[artifactId: 'spring-boot-sample-atmosphere', classifier: '', file: 'spring-boot-samples/spring-boot-sample-atmosphere/target/spring-boot-sample-atmosphere-1.4.0.BUILD-SNAPSHOT.jar', type: 'jar']], credentialsId: 'cf5bbd82-2468-46d3-a99e-13df16ada832', groupId: 'grooup.id', nexusUrl: '13.126.209.230:8081/nexus', nexusVersion: 'nexus2', protocol: 'http', repository: 'releases', version: '1.4.0' - - } } - + } + + } } From 8ffbf6c0669973900bcfdcb39ec8aefa6e8a5f85 Mon Sep 17 00:00:00 2001 From: Anil Date: Fri, 22 Sep 2017 09:35:43 +0530 Subject: [PATCH 16/18] env.Path --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index ef5eeb7a46b6..f5a6620daae0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,8 +14,9 @@ pipeline { //withMaven(jdk: 'java', maven: 'maven') { //maven 'maven' //jdk 'java' + env.PATH = "${tool 'maven'}/bin:${env.PATH}" steps{ - env.PATH = "${tool 'maven'}/bin:${env.PATH}" + sh 'mvn package -Dmaven.test.skip=true -f spring-boot-samples/spring-boot-sample-atmosphere/pom.xml' } } From 31e63a58f62bf5434c7bb19721078a6cc8711253 Mon Sep 17 00:00:00 2001 From: Anil Date: Fri, 22 Sep 2017 11:05:33 +0530 Subject: [PATCH 17/18] added environment stanza --- Jenkinsfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index f5a6620daae0..79c9c469ff6b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,5 +1,9 @@ pipeline { agent { node { label 'master' } } + + environment { + env.PATH = "${tool 'maven'}/bin:${env.PATH}" + } stages { stage('Checkout') { @@ -14,7 +18,7 @@ pipeline { //withMaven(jdk: 'java', maven: 'maven') { //maven 'maven' //jdk 'java' - env.PATH = "${tool 'maven'}/bin:${env.PATH}" + steps{ sh 'mvn package -Dmaven.test.skip=true -f spring-boot-samples/spring-boot-sample-atmosphere/pom.xml' From 45d1d16b17f5dffbefada10bf70e3b0bd2ddd83b Mon Sep 17 00:00:00 2001 From: Anil Date: Fri, 22 Sep 2017 11:06:48 +0530 Subject: [PATCH 18/18] added PATH in environment --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 79c9c469ff6b..b9580a4a406e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,7 +2,7 @@ pipeline { agent { node { label 'master' } } environment { - env.PATH = "${tool 'maven'}/bin:${env.PATH}" + PATH = "${tool 'maven'}/bin:${PATH}" } stages {