From 45ef9905ed03cc1a6fa6a436841acd693f370701 Mon Sep 17 00:00:00 2001 From: chilu49 Date: Thu, 7 Jun 2018 08:58:39 -0600 Subject: [PATCH 01/31] created jenkinsfile --- Jenkinsfile | 66 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..d67a8cf --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,66 @@ +node { + notify1('Started testing-whaleapp build') + try { + stage('Checkout') { + git branch: '**', url: 'https://github.com/chilu49/hellowhale.git' + } + stage('Build Image And Push') { + def app = docker.build ("testing-whaleapp:${env.BUILD_ID}") + } + + stage ('Deploy-dev') { + //build job: 'account-service-pipeline', wait: false + sh ''' docker run -d -it --name testing-whaleapp testing-whaleapp:${BUILD_NUMBER}''' + + } + notify2('Successfully Deployed testing-whaleapp') + } catch (err) { + notify1("Error {err}") + currentBuild.result = 'FAILURE' + } +} +@NonCPS +def getChangeString() { + MAX_MSG_LEN = 10000 + def changeString = "" + + echo "Gathering SCM changes" + def changeLogSets = currentBuild.changeSets + for (int i = 0; i < changeLogSets.size(); i++) { + def entries = changeLogSets[i].items + for (int j = 0; j < entries.length; j++) { + def entry = entries[j] + truncated_msg = entry.msg.take(MAX_MSG_LEN) + changeString += " - ${truncated_msg} [${entry.author}]\n" + } + } + + if (!changeString) { + changeString = " - No new changes" + } + return changeString + } + + def notify1(status){ + emailext( + to: "ravinder.chiluveru@cabelas.com ,Chad.Gaul@cabelas.com, Christopher.Swob@cabelas.com", + subject: "${status}:' [${env.BUILD_NUMBER}]'", + body: """

${status}: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':

+

Check console output at ${env.JOB_NAME} [${env.BUILD_NUMBER}]

""" + ) + } + def notify2(status){ + emailext( + to: "ravinder.chiluveru@cabelas.com ,Chad.Gaul@cabelas.com, Christopher.Swob@cabelas.com", + subject: "${status}: Job ${env.JOB_NAME} [${env.BUILD_NUMBER}]", + body: "Changes:\n " + getChangeString() + "\n\n
Check console output at: $BUILD_URL/console" + "\n" + ) + } + def notify3(status){ + emailext( + to: "ravinder.chiluveru@cabelas.com ,Chad.Gaul@cabelas.com, Christopher.Swob@cabelas.com", + subject: "${status}:' [${env.BUILD_NUMBER}]'", + body: "Changes:\n " + getChangeString() + "\n\n
Check console output at: $BUILD_URL/console" + "\n" + + ) + } From 103956180f77b40e96de74f5c9714e82a60de5ae Mon Sep 17 00:00:00 2001 From: chilu49 Date: Thu, 7 Jun 2018 09:00:45 -0600 Subject: [PATCH 02/31] removed chris and chad email --- Jenkinsfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d67a8cf..d2de1b4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -43,7 +43,7 @@ def getChangeString() { def notify1(status){ emailext( - to: "ravinder.chiluveru@cabelas.com ,Chad.Gaul@cabelas.com, Christopher.Swob@cabelas.com", + to: "ravinder.chiluveru@cabelas.com", subject: "${status}:' [${env.BUILD_NUMBER}]'", body: """

${status}: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]':

Check console output at ${env.JOB_NAME} [${env.BUILD_NUMBER}]

""" @@ -51,14 +51,14 @@ def getChangeString() { } def notify2(status){ emailext( - to: "ravinder.chiluveru@cabelas.com ,Chad.Gaul@cabelas.com, Christopher.Swob@cabelas.com", + to: "ravinder.chiluveru@cabelas.com", subject: "${status}: Job ${env.JOB_NAME} [${env.BUILD_NUMBER}]", body: "Changes:\n " + getChangeString() + "\n\n
Check console output at: $BUILD_URL/console" + "\n" ) } def notify3(status){ emailext( - to: "ravinder.chiluveru@cabelas.com ,Chad.Gaul@cabelas.com, Christopher.Swob@cabelas.com", + to: "ravinder.chiluveru@cabelas.com", subject: "${status}:' [${env.BUILD_NUMBER}]'", body: "Changes:\n " + getChangeString() + "\n\n
Check console output at: $BUILD_URL/console" + "\n" From 9b8b208b46b215bb043daa993b39e633c46e7ca3 Mon Sep 17 00:00:00 2001 From: chilu49 Date: Thu, 7 Jun 2018 09:13:48 -0600 Subject: [PATCH 03/31] modified jenkinsfile --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d2de1b4..60605e0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -2,12 +2,13 @@ node { notify1('Started testing-whaleapp build') try { stage('Checkout') { - git branch: '**', url: 'https://github.com/chilu49/hellowhale.git' + checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/chilu49/hellowhale.git']]]) } stage('Build Image And Push') { + dir('/opt/jenkins/workspace/testing-asdfkljasdf/hellowhale/'){ def app = docker.build ("testing-whaleapp:${env.BUILD_ID}") } - + } stage ('Deploy-dev') { //build job: 'account-service-pipeline', wait: false sh ''' docker run -d -it --name testing-whaleapp testing-whaleapp:${BUILD_NUMBER}''' From 771c094a0fcdc446edb5a5e2ef47f0e6a0ea5ff0 Mon Sep 17 00:00:00 2001 From: chilu49 Date: Thu, 7 Jun 2018 09:43:21 -0600 Subject: [PATCH 04/31] updated jenkinsfile with correct directory --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 60605e0..80a0bef 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -5,7 +5,7 @@ node { checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[url: 'https://github.com/chilu49/hellowhale.git']]]) } stage('Build Image And Push') { - dir('/opt/jenkins/workspace/testing-asdfkljasdf/hellowhale/'){ + dir('/opt/jenkins/workspace/testing-asdfkljasdf/'){ def app = docker.build ("testing-whaleapp:${env.BUILD_ID}") } } From b89a0b16ac6e6b95386dc372626f9833eb9d2a59 Mon Sep 17 00:00:00 2001 From: chilu49 Date: Tue, 12 Jun 2018 09:29:49 -0600 Subject: [PATCH 05/31] Increased Commit Messages Lines --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 80a0bef..1bd0419 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -22,7 +22,7 @@ node { } @NonCPS def getChangeString() { - MAX_MSG_LEN = 10000 + MAX_MSG_LEN = 100000000 def changeString = "" echo "Gathering SCM changes" From ab1776bbccbd05c2433c774e0c1dc84e583b0c33 Mon Sep 17 00:00:00 2001 From: chilu49 Date: Tue, 12 Jun 2018 09:39:50 -0600 Subject: [PATCH 06/31] Modified Jenkinsfile included couple of docker commands to stop and remove existing before docker imaging before deploying new docker image which was build as part of this new build. Testing Testing Testing --- Jenkinsfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 1bd0419..a1720b9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,6 +11,8 @@ node { } stage ('Deploy-dev') { //build job: 'account-service-pipeline', wait: false + sh ''' docker stop testing-whaleapp''' + sh ''' docker rm testing-whaleapp ''' sh ''' docker run -d -it --name testing-whaleapp testing-whaleapp:${BUILD_NUMBER}''' } From 2a654ff90b68565022eebea13650d6683f10f547 Mon Sep 17 00:00:00 2001 From: chilu49 Date: Tue, 12 Jun 2018 10:02:03 -0600 Subject: [PATCH 07/31] updated jenkinsfile to echo what changeLogSets has --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index a1720b9..d9f1d58 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -29,6 +29,7 @@ def getChangeString() { echo "Gathering SCM changes" def changeLogSets = currentBuild.changeSets + echo "${changeLogSets}" for (int i = 0; i < changeLogSets.size(); i++) { def entries = changeLogSets[i].items for (int j = 0; j < entries.length; j++) { From 53b2279e3dcea5b15aa93eea077f7e37660dd8af Mon Sep 17 00:00:00 2001 From: chilu49 Date: Tue, 12 Jun 2018 13:34:45 -0600 Subject: [PATCH 08/31] Changed Jenkins file to include more info about git commit --- Jenkinsfile | 45 +++++++++++++++++++++++++++++++++------------ 1 file changed, 33 insertions(+), 12 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index d9f1d58..2fa4020 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -22,28 +22,49 @@ node { currentBuild.result = 'FAILURE' } } +#@NonCPS +#def getChangeString() { +# MAX_MSG_LEN = 100000000 +# def changeString = "" + +# echo "Gathering SCM changes" +# def changeLogSets = currentBuild.changeSets +# echo "${changeLogSets}" +# for (int i = 0; i < changeLogSets.size(); i++) { +# def entries = changeLogSets[i].items +# for (int j = 0; j < entries.length; j++) { +# def entry = entries[j] +# truncated_msg = entry.msg.take(MAX_MSG_LEN) +# changeString += " - ${truncated_msg} [${entry.author}]\n" +# } +# } + +# if (!changeString) { +# changeString = " - No new changes" +# } +# return changeString +# } @NonCPS def getChangeString() { - MAX_MSG_LEN = 100000000 - def changeString = "" - - echo "Gathering SCM changes" + String msg = "" + String repoUrl = '${env.BUILD_URL}' + def lastId = null + def prevId = prevBuildLastCommitId() def changeLogSets = currentBuild.changeSets - echo "${changeLogSets}" + for (int i = 0; i < changeLogSets.size(); i++) { def entries = changeLogSets[i].items for (int j = 0; j < entries.length; j++) { def entry = entries[j] - truncated_msg = entry.msg.take(MAX_MSG_LEN) - changeString += " - ${truncated_msg} [${entry.author}]\n" + lastId = entry.commitId + changeString = changeString + "${commitInfo(entry)}" } } - - if (!changeString) { - changeString = " - No new changes" - } - return changeString + if (prevId != null && lastId != null) { + changeString = changeString + "\n${repoUrl}/branches/compare/${lastId}..${prevId}#diff\n" } + return msg +} def notify1(status){ emailext( From 481a465a2f2692f7214467aa3f1eb55afb1d4e90 Mon Sep 17 00:00:00 2001 From: chilu49 Date: Tue, 12 Jun 2018 13:36:00 -0600 Subject: [PATCH 09/31] updated jenkins file --- Jenkinsfile | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2fa4020..4f05644 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -22,28 +22,7 @@ node { currentBuild.result = 'FAILURE' } } -#@NonCPS -#def getChangeString() { -# MAX_MSG_LEN = 100000000 -# def changeString = "" -# echo "Gathering SCM changes" -# def changeLogSets = currentBuild.changeSets -# echo "${changeLogSets}" -# for (int i = 0; i < changeLogSets.size(); i++) { -# def entries = changeLogSets[i].items -# for (int j = 0; j < entries.length; j++) { -# def entry = entries[j] -# truncated_msg = entry.msg.take(MAX_MSG_LEN) -# changeString += " - ${truncated_msg} [${entry.author}]\n" -# } -# } - -# if (!changeString) { -# changeString = " - No new changes" -# } -# return changeString -# } @NonCPS def getChangeString() { String msg = "" From 59b21e0ed434cfac432db29ed918148fb4b55c34 Mon Sep 17 00:00:00 2001 From: chilu49 Date: Tue, 12 Jun 2018 16:23:15 -0600 Subject: [PATCH 10/31] updated jenkinsfile with previous build logic --- Jenkinsfile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4f05644..30f25c0 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -22,7 +22,17 @@ node { currentBuild.result = 'FAILURE' } } - +@NonCPS +def prevBuildLastCommitId() { + def prev = currentBuild.previousBuild + def items = null + def result = null + if (prev != null && prev.changeSets != null && prev.changeSets.size() && prev.changeSets[prev.changeSets.size() - 1].items.length) { + items = prev.changeSets[prev.changeSets.size() - 1].items + result = items[items.length - 1].commitId + } + return result +} @NonCPS def getChangeString() { String msg = "" From c47ed178ddab708a4544ddcbc18671aac93d4b76 Mon Sep 17 00:00:00 2001 From: chilu49 Date: Tue, 12 Jun 2018 16:27:38 -0600 Subject: [PATCH 11/31] Updateded Jenkinsfile with previous build information --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 30f25c0..09b8c8a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,7 +24,7 @@ node { } @NonCPS def prevBuildLastCommitId() { - def prev = currentBuild.previousBuild + def prev = currentBuild.rawBuild.getPreviousBuild() def items = null def result = null if (prev != null && prev.changeSets != null && prev.changeSets.size() && prev.changeSets[prev.changeSets.size() - 1].items.length) { From 77fe946d70cd53bee2ec183959ac42e865debc8e Mon Sep 17 00:00:00 2001 From: chilu49 Date: Tue, 12 Jun 2018 16:30:25 -0600 Subject: [PATCH 12/31] Update Jenkinsfile --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 09b8c8a..468be9f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -24,7 +24,7 @@ node { } @NonCPS def prevBuildLastCommitId() { - def prev = currentBuild.rawBuild.getPreviousBuild() + def prev = currentBuild.getPreviousBuild() def items = null def result = null if (prev != null && prev.changeSets != null && prev.changeSets.size() && prev.changeSets[prev.changeSets.size() - 1].items.length) { From 3720bc6fac37f4cedf2feceafe11efd488cce9b4 Mon Sep 17 00:00:00 2001 From: chilu49 Date: Tue, 12 Jun 2018 16:39:29 -0600 Subject: [PATCH 13/31] updated jenkins file --- Jenkinsfile | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 468be9f..2c6eb5a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,6 +9,8 @@ node { def app = docker.build ("testing-whaleapp:${env.BUILD_ID}") } } + def changeLog = getChangeLog(passedBuilds) + echo "changeLog ${changeLog}" stage ('Deploy-dev') { //build job: 'account-service-pipeline', wait: false sh ''' docker stop testing-whaleapp''' @@ -22,23 +24,13 @@ node { currentBuild.result = 'FAILURE' } } -@NonCPS -def prevBuildLastCommitId() { - def prev = currentBuild.getPreviousBuild() - def items = null - def result = null - if (prev != null && prev.changeSets != null && prev.changeSets.size() && prev.changeSets[prev.changeSets.size() - 1].items.length) { - items = prev.changeSets[prev.changeSets.size() - 1].items - result = items[items.length - 1].commitId - } - return result -} + @NonCPS def getChangeString() { String msg = "" String repoUrl = '${env.BUILD_URL}' def lastId = null - def prevId = prevBuildLastCommitId() + def prevId = 143 def changeLogSets = currentBuild.changeSets for (int i = 0; i < changeLogSets.size(); i++) { From f42e98658390078e33343a0d0ef2ddc1fd461649 Mon Sep 17 00:00:00 2001 From: chilu49 Date: Wed, 13 Jun 2018 09:15:58 -0600 Subject: [PATCH 14/31] update jenkins file testingkalsklasjdlkfj --- Jenkinsfile | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 2c6eb5a..522419e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,8 +10,7 @@ node { } } def changeLog = getChangeLog(passedBuilds) - echo "changeLog ${changeLog}" - stage ('Deploy-dev') { + stage ('Deploy-dev') { //build job: 'account-service-pipeline', wait: false sh ''' docker stop testing-whaleapp''' sh ''' docker rm testing-whaleapp ''' @@ -27,25 +26,25 @@ node { @NonCPS def getChangeString() { - String msg = "" - String repoUrl = '${env.BUILD_URL}' - def lastId = null - def prevId = 143 - def changeLogSets = currentBuild.changeSets + MAX_MSG_LEN = 10000 + def changeString = "" + echo "Gathering SCM changes" + def changeLogSets = currentBuild.rawBuild.changeSets for (int i = 0; i < changeLogSets.size(); i++) { def entries = changeLogSets[i].items for (int j = 0; j < entries.length; j++) { def entry = entries[j] - lastId = entry.commitId - changeString = changeString + "${commitInfo(entry)}" + truncated_msg = entry.msg.take(MAX_MSG_LEN) + changeString += " - ${truncated_msg} [${entry.author}]\n" } } - if (prevId != null && lastId != null) { - changeString = changeString + "\n${repoUrl}/branches/compare/${lastId}..${prevId}#diff\n" + + if (!changeString) { + changeString = " - No new changes" + } + return changeString } - return msg -} def notify1(status){ emailext( From 861ebe1ab446de28e8d5e086a6a1bfe3b5002432 Mon Sep 17 00:00:00 2001 From: chilu49 Date: Wed, 13 Jun 2018 09:19:16 -0600 Subject: [PATCH 15/31] updated jenkinsfile aksdjlkf aslkdjflkasd alksdjflka lkjakjasdlkfj k;aljsdlkjf --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 522419e..d6c1999 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -9,7 +9,7 @@ node { def app = docker.build ("testing-whaleapp:${env.BUILD_ID}") } } - def changeLog = getChangeLog(passedBuilds) + stage ('Deploy-dev') { //build job: 'account-service-pipeline', wait: false sh ''' docker stop testing-whaleapp''' From 3f3424eaf7e2efb719fef38dc147343cea3d7f90 Mon Sep 17 00:00:00 2001 From: chilu49 Date: Wed, 13 Jun 2018 09:37:12 -0600 Subject: [PATCH 16/31] updated jenkinsfile asdffffffffffffffffffffffffffff asdfffffffffff --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index d6c1999..091e2ed 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -30,7 +30,7 @@ def getChangeString() { def changeString = "" echo "Gathering SCM changes" - def changeLogSets = currentBuild.rawBuild.changeSets + def changeLogSets = currentBuild.changeSets for (int i = 0; i < changeLogSets.size(); i++) { def entries = changeLogSets[i].items for (int j = 0; j < entries.length; j++) { From c4efef2548d5ca2858d9d2b0fbf73386a7cc4eae Mon Sep 17 00:00:00 2001 From: chilu49 Date: Wed, 13 Jun 2018 10:01:28 -0600 Subject: [PATCH 17/31] Testing --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 091e2ed..f9633ab 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,7 +26,7 @@ node { @NonCPS def getChangeString() { - MAX_MSG_LEN = 10000 + MAX_MSG_LEN = 10000000 def changeString = "" echo "Gathering SCM changes" From 8a08a01fe28cb54475e32f0589689422fd274955 Mon Sep 17 00:00:00 2001 From: chilu49 Date: Wed, 13 Jun 2018 10:03:49 -0600 Subject: [PATCH 18/31] testingtestingtestingtest testingtestingtestingtest testingtestingtestingtest testingtestingtestingtest testingtestingtestingtest testingextendeddescription testingextendeddescription --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index f9633ab..783a50f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -68,4 +68,4 @@ def getChangeString() { body: "Changes:\n " + getChangeString() + "\n\n
Check console output at: $BUILD_URL/console" + "\n" ) - } + } From b42e602921cbccbf603adeab0465ea9d459c8838 Mon Sep 17 00:00:00 2001 From: chilu49 Date: Wed, 13 Jun 2018 10:33:18 -0600 Subject: [PATCH 19/31] updated jenkinfilekjlllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllll --- Jenkinsfile | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 783a50f..0a51a1e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,13 +32,19 @@ def getChangeString() { echo "Gathering SCM changes" def changeLogSets = currentBuild.changeSets for (int i = 0; i < changeLogSets.size(); i++) { - def entries = changeLogSets[i].items - for (int j = 0; j < entries.length; j++) { - def entry = entries[j] - truncated_msg = entry.msg.take(MAX_MSG_LEN) - changeString += " - ${truncated_msg} [${entry.author}]\n" - } - } + def entries = changeLogSets[i].items + for (int j = 0; j < entries.length; j++) { + def entry = entries[j] + truncated_msg = entry.msg.take(MAX_MSG_LEN) + changeString += " - ${truncated_msg} [${entry.author}]\n" + echo "${entry.commitId} by ${entry.author} on ${new Date(entry.timestamp)}: ${entry.msg}" + def files = new ArrayList(entry.affectedFiles) + for (int k = 0; k < files.size(); k++) { + def file = files[k] + echo " ${file.editType.name} ${file.path}" + } + } + } if (!changeString) { changeString = " - No new changes" From b367bd0d8043b61d5384f006edefe14e158fbf3e Mon Sep 17 00:00:00 2001 From: chilu49 Date: Thu, 14 Jun 2018 11:37:55 -0600 Subject: [PATCH 20/31] update jenkins file .skadjflkkkkkkkk lkjasdkflasd lkajsdlkfj --- Jenkinsfile | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 0a51a1e..f65e26b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -35,16 +35,10 @@ def getChangeString() { def entries = changeLogSets[i].items for (int j = 0; j < entries.length; j++) { def entry = entries[j] - truncated_msg = entry.msg.take(MAX_MSG_LEN) - changeString += " - ${truncated_msg} [${entry.author}]\n" - echo "${entry.commitId} by ${entry.author} on ${new Date(entry.timestamp)}: ${entry.msg}" - def files = new ArrayList(entry.affectedFiles) - for (int k = 0; k < files.size(); k++) { - def file = files[k] - echo " ${file.editType.name} ${file.path}" - } - } - } + lastId = entry.commitId + msg = msg + "${commitInfo(entry)}" + } + } if (!changeString) { changeString = " - No new changes" From 9724407dd42a5f100ff8f300aa7bda6ca76db218 Mon Sep 17 00:00:00 2001 From: chilu49 Date: Thu, 14 Jun 2018 11:39:24 -0600 Subject: [PATCH 21/31] asdf asdfffffffff sadfsdddddddddddddddddddddddd dsafffffffffffff --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index f65e26b..3354759 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -36,7 +36,7 @@ def getChangeString() { for (int j = 0; j < entries.length; j++) { def entry = entries[j] lastId = entry.commitId - msg = msg + "${commitInfo(entry)}" + changeString = changeString + "${commitInfo(entry)}" } } From bb438033d81e239dd8ddeb050fe00fe748939c84 Mon Sep 17 00:00:00 2001 From: chilu49 Date: Thu, 14 Jun 2018 11:45:10 -0600 Subject: [PATCH 22/31] asdfffffffffffffffffffffffffffffffffffff ffffffffffffffffffffffffffffffffff --- Jenkinsfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3354759..a115bb4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -31,12 +31,13 @@ def getChangeString() { echo "Gathering SCM changes" def changeLogSets = currentBuild.changeSets + echo "${changeLogSets}" for (int i = 0; i < changeLogSets.size(); i++) { def entries = changeLogSets[i].items for (int j = 0; j < entries.length; j++) { def entry = entries[j] - lastId = entry.commitId - changeString = changeString + "${commitInfo(entry)}" + truncated_msg = entry.msg.take(MAX_MSG_LEN) + changeString += " - ${truncated_msg} [${entry.author}]\n" } } From 8abfe88a1ac7bcf38260f8430205e649bcc7cafa Mon Sep 17 00:00:00 2001 From: chilu49 Date: Thu, 14 Jun 2018 11:47:08 -0600 Subject: [PATCH 23/31] asdfffffff dsafasdfdfsadfasdfsfasdf --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index a115bb4..940e1a2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -31,7 +31,7 @@ def getChangeString() { echo "Gathering SCM changes" def changeLogSets = currentBuild.changeSets - echo "${changeLogSets}" +// echo "${changeLogSets}" for (int i = 0; i < changeLogSets.size(); i++) { def entries = changeLogSets[i].items for (int j = 0; j < entries.length; j++) { From 57ed8398bce5017d6f1bf3adee50b7300c0925c4 Mon Sep 17 00:00:00 2001 From: chilu49 Date: Thu, 14 Jun 2018 11:49:53 -0600 Subject: [PATCH 24/31] asdfffffffffffffffffffffffffffffffa asdfasdfasdfasdf asdfasdfasdfasdf --- Jenkinsfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 940e1a2..9611e67 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -31,7 +31,8 @@ def getChangeString() { echo "Gathering SCM changes" def changeLogSets = currentBuild.changeSets -// echo "${changeLogSets}" + echo "${changeLogSets}" + echo "${changeLogSets.size()}" for (int i = 0; i < changeLogSets.size(); i++) { def entries = changeLogSets[i].items for (int j = 0; j < entries.length; j++) { From 76ac0a981fb8248e908becbf753383404b241d11 Mon Sep 17 00:00:00 2001 From: chilu49 Date: Thu, 14 Jun 2018 13:16:04 -0600 Subject: [PATCH 25/31] adsfhj asdjhfjk asdjhfajksd ;asjdfkjhasdjkf aslkdjhfajksdf hlkjhaskljdfha akjshdfkjahsdf jhaskdjhf asd'asdhfjkahsdfjhadfh Testing Testing Testing --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 9611e67..30e06e9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -32,7 +32,7 @@ def getChangeString() { echo "Gathering SCM changes" def changeLogSets = currentBuild.changeSets echo "${changeLogSets}" - echo "${changeLogSets.size()}" + echo "${changeLogSets.size()}" for (int i = 0; i < changeLogSets.size(); i++) { def entries = changeLogSets[i].items for (int j = 0; j < entries.length; j++) { From 9f8dcfda6a8662108d87285e0d0c3b3c35895e7e Mon Sep 17 00:00:00 2001 From: chilu49 Date: Thu, 14 Jun 2018 13:24:48 -0600 Subject: [PATCH 26/31] 12345678901234567890123456789012345678901234567890 1234567890 --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 30e06e9..5341866 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,7 +26,7 @@ node { @NonCPS def getChangeString() { - MAX_MSG_LEN = 10000000 + MAX_MSG_LEN = 1000000000000 def changeString = "" echo "Gathering SCM changes" From de3cf0165a171fe93a1a2b0614b3fd6645dc6a60 Mon Sep 17 00:00:00 2001 From: chilu49 Date: Thu, 14 Jun 2018 13:27:06 -0600 Subject: [PATCH 27/31] 2345678901234567890123456789012345678901234567890 1234567890 --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5341866..576c5cf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -26,7 +26,7 @@ node { @NonCPS def getChangeString() { - MAX_MSG_LEN = 1000000000000 + MAX_MSG_LEN = 1000 def changeString = "" echo "Gathering SCM changes" From 4f95966a3b7dc2c3d446bdd11a981aabfbcc5012 Mon Sep 17 00:00:00 2001 From: chilu49 Date: Thu, 14 Jun 2018 13:30:14 -0600 Subject: [PATCH 28/31] 2345678901234567890123456789012345678901234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 1234567890 --- Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 576c5cf..5465eb9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -28,7 +28,6 @@ node { def getChangeString() { MAX_MSG_LEN = 1000 def changeString = "" - echo "Gathering SCM changes" def changeLogSets = currentBuild.changeSets echo "${changeLogSets}" From be1d558880c65651bd68353a91c21978807d78dd Mon Sep 17 00:00:00 2001 From: chilu49 Date: Thu, 14 Jun 2018 13:43:02 -0600 Subject: [PATCH 29/31] 2345678901234567890123456789012345678901234567890 123456789012345678901234567890 --- Jenkinsfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5465eb9..8c8dd78 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -67,6 +67,5 @@ def getChangeString() { to: "ravinder.chiluveru@cabelas.com", subject: "${status}:' [${env.BUILD_NUMBER}]'", body: "Changes:\n " + getChangeString() + "\n\n
Check console output at: $BUILD_URL/console" + "\n" - ) } From c961a30f567c3fbed98f4e6fc394c8715056e3af Mon Sep 17 00:00:00 2001 From: chilu49 Date: Thu, 14 Jun 2018 14:44:17 -0600 Subject: [PATCH 30/31] 11111111111111111111111111111111111111 11111111111111111111 11111111111111111111 --- Jenkinsfile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 8c8dd78..fd91ffe 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -23,6 +23,25 @@ node { currentBuild.result = 'FAILURE' } } +@NonCPS +def getChangeLog(passedBuilds) { + def changeString = "" + for (int x = 0; x < passedBuilds.size(); x++) { + def currentBuild = passedBuilds[x]; + def changeLogSets = currentBuild.changeSets + for (int i = 0; i < changeLogSets.size(); i++) { + def entries = changeLogSets[i].items + for (int j = 0; j < entries.length; j++) { + def entry = entries[j] + changeString += "* ${entry.msg} by ${entry.author} \n" + } + } + } +if (!changeString) { +changeString = " - No new changes" + } + return log; +} @NonCPS def getChangeString() { From 9267ef3438f965f906553a0deb1db28d7febb2d9 Mon Sep 17 00:00:00 2001 From: chilu49 Date: Thu, 26 Jul 2018 14:04:27 -0600 Subject: [PATCH 31/31] updated jenkinsfile alskdjflkjas kajsdlkfjas aslkdjflkj --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index fd91ffe..44b8a1f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -88,3 +88,4 @@ def getChangeString() { body: "Changes:\n " + getChangeString() + "\n\n
Check console output at: $BUILD_URL/console" + "\n" ) } +