From c2133b61d4eb647a688121981bdf498d9ad0a8c2 Mon Sep 17 00:00:00 2001 From: Nyuyfoni13 <46843263+Nyuyfoni13@users.noreply.github.com> Date: Fri, 29 Mar 2019 22:46:33 -0500 Subject: [PATCH 01/17] create test.sh --- test.sh | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 test.sh diff --git a/test.sh b/test.sh new file mode 100644 index 00000000..972e5a43 --- /dev/null +++ b/test.sh @@ -0,0 +1,2 @@ +#!/bin/bash +echo "first line of code" From 79f416416a07978e3bd9f228e8fdd3eaa113ec79 Mon Sep 17 00:00:00 2001 From: Nyuyfoni13 <46843263+Nyuyfoni13@users.noreply.github.com> Date: Sat, 30 Mar 2019 00:29:57 -0500 Subject: [PATCH 02/17] updated test.sh for maven test --- test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test.sh b/test.sh index 972e5a43..f2e3c052 100644 --- a/test.sh +++ b/test.sh @@ -1,2 +1,3 @@ #!/bin/bash echo "first line of code" +echo "second line of code" From bd273e3d88d10a14f9acdadd4b76ddf3887bbd86 Mon Sep 17 00:00:00 2001 From: Nyuyfoni13 <46843263+Nyuyfoni13@users.noreply.github.com> Date: Sat, 30 Mar 2019 00:35:50 -0500 Subject: [PATCH 03/17] Update test.sh --- test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.sh b/test.sh index f2e3c052..721dfacd 100644 --- a/test.sh +++ b/test.sh @@ -1,3 +1,3 @@ #!/bin/bash echo "first line of code" -echo "second line of code" + From 9c1fa647197d07cb9623b24ebc1247e2a81ed4a0 Mon Sep 17 00:00:00 2001 From: Nyuyfoni13 <46843263+Nyuyfoni13@users.noreply.github.com> Date: Sat, 30 Mar 2019 00:37:51 -0500 Subject: [PATCH 04/17] Update test.sh --- test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.sh b/test.sh index 721dfacd..f2e3c052 100644 --- a/test.sh +++ b/test.sh @@ -1,3 +1,3 @@ #!/bin/bash echo "first line of code" - +echo "second line of code" From 5b667f684bed99c86cac5f5859e81884e324617f Mon Sep 17 00:00:00 2001 From: Nyuyfoni13 <46843263+Nyuyfoni13@users.noreply.github.com> Date: Sat, 30 Mar 2019 00:39:02 -0500 Subject: [PATCH 05/17] Update test.sh --- test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.sh b/test.sh index f2e3c052..721dfacd 100644 --- a/test.sh +++ b/test.sh @@ -1,3 +1,3 @@ #!/bin/bash echo "first line of code" -echo "second line of code" + From 9742e6720daa31e996e545e9010c220ef4a7305c Mon Sep 17 00:00:00 2001 From: Nyuyfoni13 <46843263+Nyuyfoni13@users.noreply.github.com> Date: Sat, 30 Mar 2019 00:39:52 -0500 Subject: [PATCH 06/17] Update test.sh --- test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.sh b/test.sh index 721dfacd..9c19481e 100644 --- a/test.sh +++ b/test.sh @@ -1,3 +1,3 @@ #!/bin/bash echo "first line of code" - +echo "second" From ea825fd8ea164649b31990362c0860a5b73a49bf Mon Sep 17 00:00:00 2001 From: Nyuyfoni13 <46843263+Nyuyfoni13@users.noreply.github.com> Date: Sat, 30 Mar 2019 00:42:05 -0500 Subject: [PATCH 07/17] Update test.sh --- test.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/test.sh b/test.sh index 9c19481e..972e5a43 100644 --- a/test.sh +++ b/test.sh @@ -1,3 +1,2 @@ #!/bin/bash echo "first line of code" -echo "second" From 73e798bf17b562ff090ec326c25def2c867aaebc Mon Sep 17 00:00:00 2001 From: Nyuyfoni13 <46843263+Nyuyfoni13@users.noreply.github.com> Date: Sat, 30 Mar 2019 00:46:40 -0500 Subject: [PATCH 08/17] Update test.sh --- test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test.sh b/test.sh index 972e5a43..9cfe2068 100644 --- a/test.sh +++ b/test.sh @@ -1,2 +1,3 @@ #!/bin/bash echo "first line of code" +echo "test good" From f294e7a6380bf2c255a0f68aff2269d2c27e1db3 Mon Sep 17 00:00:00 2001 From: Nyuyfoni13 <46843263+Nyuyfoni13@users.noreply.github.com> Date: Sat, 30 Mar 2019 00:57:45 -0500 Subject: [PATCH 09/17] Update test.sh --- test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test.sh b/test.sh index 9cfe2068..5fed238b 100644 --- a/test.sh +++ b/test.sh @@ -1,3 +1,4 @@ #!/bin/bash echo "first line of code" echo "test good" +echo "fine" From 15fc4d7abfbb0c8ca5ad418e1a152ec361bcd9bd Mon Sep 17 00:00:00 2001 From: Nyuyfoni13 <46843263+Nyuyfoni13@users.noreply.github.com> Date: Sat, 30 Mar 2019 01:02:25 -0500 Subject: [PATCH 10/17] Update test.sh --- test.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/test.sh b/test.sh index 5fed238b..9cfe2068 100644 --- a/test.sh +++ b/test.sh @@ -1,4 +1,3 @@ #!/bin/bash echo "first line of code" echo "test good" -echo "fine" From 304a7804c3aa6324e11da21f8c3ec1e181bde2aa Mon Sep 17 00:00:00 2001 From: Nyuyfoni13 <46843263+Nyuyfoni13@users.noreply.github.com> Date: Sat, 30 Mar 2019 01:07:39 -0500 Subject: [PATCH 11/17] Update test.sh --- test.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/test.sh b/test.sh index 9cfe2068..972e5a43 100644 --- a/test.sh +++ b/test.sh @@ -1,3 +1,2 @@ #!/bin/bash echo "first line of code" -echo "test good" From cc9f23852f69e2289ee2c2d99ec3ed12a428901c Mon Sep 17 00:00:00 2001 From: Nyuyfoni13 <46843263+Nyuyfoni13@users.noreply.github.com> Date: Sat, 30 Mar 2019 01:21:53 -0500 Subject: [PATCH 12/17] Update test.sh --- test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test.sh b/test.sh index 972e5a43..f2e3c052 100644 --- a/test.sh +++ b/test.sh @@ -1,2 +1,3 @@ #!/bin/bash echo "first line of code" +echo "second line of code" From 176fe4312047ec5b2efb935b0058030b1ec4b126 Mon Sep 17 00:00:00 2001 From: Nyuyfoni13 <46843263+Nyuyfoni13@users.noreply.github.com> Date: Sat, 30 Mar 2019 01:53:26 -0500 Subject: [PATCH 13/17] Update test.sh --- test.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test.sh b/test.sh index f2e3c052..c1b0521c 100644 --- a/test.sh +++ b/test.sh @@ -1,3 +1,4 @@ #!/bin/bash echo "first line of code" echo "second line of code" +echo " third line of code" From f8c8b51dc0597c90e6f49ace4d1b1f90425083e4 Mon Sep 17 00:00:00 2001 From: Nyuyfoni13 <46843263+Nyuyfoni13@users.noreply.github.com> Date: Sat, 30 Mar 2019 13:47:45 -0500 Subject: [PATCH 14/17] Create sample-maven.jenkinsfile --- sample-maven.jenkinsfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 sample-maven.jenkinsfile diff --git a/sample-maven.jenkinsfile b/sample-maven.jenkinsfile new file mode 100644 index 00000000..842d56f0 --- /dev/null +++ b/sample-maven.jenkinsfile @@ -0,0 +1,21 @@ +node('maven'){ + def mvnHome = tool name: 'maven354', type: 'maven' + stage('Checkout'){ + echo "Downloading the source code" + git credentialsId: 'githubaccount', url: 'https://github.com/lokeshkamalay/simple-java-maven-app.git' + } + stage('Execute Test Cases'){ + echo "Executing Test Cases" + sh "${mvnHome}/bin/mvn clean test surefire-report:report-only" + archiveArtifacts allowEmptyArchive: true, artifacts: 'target/**/*' + junit allowEmptyResults: true, testResults: 'target/surefire-reports/*.xml' + publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'target/site/', reportFiles: 'surefire-report.html', reportName: 'HTMLReport', reportTitles: '']) + } + stage('Build'){ + echo "Building the job now" + sh "${mvnHome}/bin/mvn package -DskipTests=true" + } + stage('Post Build Actions'){ + echo "Sending an email to user" + } +} From b5385079ab4f070582be2f48ae2f99376df8df91 Mon Sep 17 00:00:00 2001 From: Nyuyfoni13 <46843263+Nyuyfoni13@users.noreply.github.com> Date: Sat, 30 Mar 2019 22:58:40 -0500 Subject: [PATCH 15/17] Delete sample-maven.jenkinsfile --- sample-maven.jenkinsfile | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 sample-maven.jenkinsfile diff --git a/sample-maven.jenkinsfile b/sample-maven.jenkinsfile deleted file mode 100644 index 842d56f0..00000000 --- a/sample-maven.jenkinsfile +++ /dev/null @@ -1,21 +0,0 @@ -node('maven'){ - def mvnHome = tool name: 'maven354', type: 'maven' - stage('Checkout'){ - echo "Downloading the source code" - git credentialsId: 'githubaccount', url: 'https://github.com/lokeshkamalay/simple-java-maven-app.git' - } - stage('Execute Test Cases'){ - echo "Executing Test Cases" - sh "${mvnHome}/bin/mvn clean test surefire-report:report-only" - archiveArtifacts allowEmptyArchive: true, artifacts: 'target/**/*' - junit allowEmptyResults: true, testResults: 'target/surefire-reports/*.xml' - publishHTML([allowMissing: false, alwaysLinkToLastBuild: false, keepAll: false, reportDir: 'target/site/', reportFiles: 'surefire-report.html', reportName: 'HTMLReport', reportTitles: '']) - } - stage('Build'){ - echo "Building the job now" - sh "${mvnHome}/bin/mvn package -DskipTests=true" - } - stage('Post Build Actions'){ - echo "Sending an email to user" - } -} From 5c2248cfaad2cdc2d951acdf98991aa9864f0642 Mon Sep 17 00:00:00 2001 From: Nyuyfoni13 <46843263+Nyuyfoni13@users.noreply.github.com> Date: Sat, 30 Mar 2019 23:12:01 -0500 Subject: [PATCH 16/17] Create jenkinsfile --- jenkinsfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 jenkinsfile diff --git a/jenkinsfile b/jenkinsfile new file mode 100644 index 00000000..924ec9ff --- /dev/null +++ b/jenkinsfile @@ -0,0 +1,15 @@ +node('maven'){ + stage('checkout'){ + echo "cloning the repo" + git credentialsId: 'Agent1-ssh-key', url: 'https://github.com/Nyuyfoni13/sample-java-project.git' + + } + stage('runningscript'){ + echo " Running the script" + sh "sh test.sh" + } + stage('Final'){ + echo " This job is completed and successfully saved" + } +} +© 2019 GitHub, Inc. From dd273e1fb61f972b9fddf412708ab70a01ddb5ec Mon Sep 17 00:00:00 2001 From: Nyuyfoni13 <46843263+Nyuyfoni13@users.noreply.github.com> Date: Sat, 30 Mar 2019 23:35:45 -0500 Subject: [PATCH 17/17] Update jenkinsfile --- jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jenkinsfile b/jenkinsfile index 924ec9ff..93caa96e 100644 --- a/jenkinsfile +++ b/jenkinsfile @@ -12,4 +12,4 @@ node('maven'){ echo " This job is completed and successfully saved" } } -© 2019 GitHub, Inc. +