diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 000000000000..b9580a4a406e --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,47 @@ +pipeline { + agent { node { label 'master' } } + + environment { + PATH = "${tool 'maven'}/bin:${PATH}" + } + + 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{ + + 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' + } + } + + } +} 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/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/license.txt b/license.txt new file mode 100644 index 000000000000..1c1e39e459a1 --- /dev/null +++ b/license.txt @@ -0,0 +1,3 @@ +this is my license file +license number : y4300430 + 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 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..ef5eeb7a46b6 --- /dev/null +++ b/spring-boot-samples/spring-boot-sample-atmosphere/Jenkinsfile @@ -0,0 +1,42 @@ +pipeline { + agent { node { label 'master' } } + + 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' + } + } + + } +} diff --git a/spring-boot-samples/spring-boot-sample-atmosphere/gitpractice.xml b/spring-boot-samples/spring-boot-sample-atmosphere/gitpractice.xml new file mode 100644 index 000000000000..e69de29bb2d1 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/touch b/touch new file mode 100644 index 000000000000..d4d33dd3fa08 --- /dev/null +++ b/touch @@ -0,0 +1 @@ +My new file for git