diff --git a/Fibonacci.sh b/Fibonacci.sh index 434ed6a..bc63c8b 100755 --- a/Fibonacci.sh +++ b/Fibonacci.sh @@ -19,7 +19,7 @@ else read Num fi -f1=0 +f1=100 f2=1 echo "The Fibonacci sequences for the number $Num is : " @@ -32,4 +32,4 @@ do f2=$fn done -echo +echo "Invoked and Executed by Mithilesh Singh" diff --git a/MavenProject/Jenkinsfile b/MavenProject/Jenkinsfile index 31f6039..0e1a66d 100644 --- a/MavenProject/Jenkinsfile +++ b/MavenProject/Jenkinsfile @@ -1,74 +1,79 @@ pipeline { - agent any - stages { - stage('Clone') { - steps { - echo "checking out the repo" - git 'https://github.com/vathsalahn/jenkins-demo.git' - - } - } - stage('build'){ - steps { - echo "building the project" - sh "cd MavenProject ; mvn clean install ; pwd" - } - } - - stage('Archieve Artifacts'){ - steps { - echo "archiving the artifacts" - archiveArtifacts 'MavenProject/multi3/target/*.war' - } - - } - stage('Deployment') { - // Deployment - steps { - script { - echo "deployment" - sh 'cp MavenProject/multi3/target/*.war /Applications/apache-tomcat-7.0.88/webapps/' - } - } - } - stage('publish html report') { - steps{ - echo "publishing the html report" - publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: '', reportFiles: 'index.html', reportName: 'HTML Report', reportTitles: '']) - } - } - stage('clean up') { - steps { - echo "cleaning up the workspace" - cleanWs() - } - } - stage("Metrics"){ - steps{ - parallel ( "JavaNcss Report": - { - node('window'){ - git 'https://github.com/vathsalahn/jenkins-demo.git' - sh "cd javancss-master ; mvn test javancss:report ; pwd" - } - }, - "FindBugs Report" : { - node('window'){ - sh "mkdir javancss1 ; cd javancss1 ;pwd" - git 'https://github.com/vathsalahn/jenkins-demo.git' - sh "cd javancss-master ; mvn findbugs:findbugs ; pwd" - deleteDir() - } + agent any + stages { + stage('Clone') { + steps { + echo "checking out the repo" + git 'https://github.com/mithileshkrsinghniitians/jenkins-demo.git' - } - ) - } - post{ - success { - emailext body: 'Successfully completed pipeline project with archiving the artifacts', subject: 'Pipeline was successfull', to: 'vathsala.hn22@gmail.com' - } - } -} - + } + } + stage('build'){ + steps { + echo "building the project" + sh "cd MavenProject ; mvn clean install ; pwd" + } } + + stage('Archieve Artifacts'){ + steps { + echo "archiving the artifacts" + archiveArtifacts 'MavenProject/multi3/target/*.war' + } + } + + /* + stage('Deployment') { + // Deployment + steps { + script { + echo "deployment" + sh 'cp MavenProject/multi3/target/*.war /Applications/apache-tomcat-9.0.27/webapps/' + } + } + } + */ + + stage('publish html report') { + steps{ + echo "publishing the html report" + publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: + false, reportDir: '', reportFiles: 'index.html', reportName: 'HTML Report', + reportTitles: '']) + } + } + stage('clean up') { + steps { + echo "cleaning up the workspace" + cleanWs() + } + } + stage("Metrics"){ + steps{ + parallel ( "JavaNcss Report": + { + node('window'){ + git 'https://github.com/mithileshkrsinghniitians/jenkins-demo.git' + sh "cd javancss-master ; mvn test javancss:report ; pwd" + } + }, + "FindBugs Report" : { + node('window'){ + sh "mkdir javancss1 ; cd javancss1 ;pwd" + git 'https://github.com/mithileshkrsinghniitians/jenkins-demo.git' + sh "cd javancss-master ; mvn findbugs:findbugs ; pwd" + deleteDir() + } + } + ) + } + post{ + success { + emailext body: 'Successfully completed pipeline project with archiving + the artifacts', subject: 'Pipeline was successfull', to: 'mithileshkrsinghniitians@hotmail.com' + } + } + } + + } } diff --git a/MavenProject/pom.xml b/MavenProject/pom.xml index a9f5271..f41f0e2 100644 --- a/MavenProject/pom.xml +++ b/MavenProject/pom.xml @@ -15,6 +15,10 @@ UTF-8 + + 1.6 + 1.6 + 3.6.0 @@ -34,6 +38,17 @@ maven-jar-plugin 2.4 + + + org.apache.maven.plugins + maven-compiler-plugin + 3.5.1 + + 1.8 + 1.8 + + + org.apache.maven.plugins maven-war-plugin @@ -50,6 +65,7 @@ org.apache.maven.plugins maven-jar-plugin + false diff --git a/README.md b/README.md index ba526f3..3559bb6 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # jenkins-demo -#This tests the changes in the file +#This tests the changes in the file done. diff --git a/javancss-master/pom.xml b/javancss-master/pom.xml index d6b0dbf..0a01433 100755 --- a/javancss-master/pom.xml +++ b/javancss-master/pom.xml @@ -1,3 +1,4 @@ + diff --git a/testing123.txt b/testing123.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/testing123.txt @@ -0,0 +1 @@ +