Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -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'
}
}

}
}
4 changes: 3 additions & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 3 additions & 0 deletions git1.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
hi this isgit practice script
`:wq!

Empty file added gitpractice/one.java
Empty file.
3 changes: 3 additions & 0 deletions license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
this is my license file
license number : y4300430

Empty file added maheshfile
Empty file.
Empty file added one.java
Empty file.
42 changes: 42 additions & 0 deletions spring-boot-samples/spring-boot-sample-atmosphere/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -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'
}
}

}
}
Empty file.
Empty file.
Empty file.
1 change: 1 addition & 0 deletions touch
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
My new file for git