This is an automated email from the ASF dual-hosted git repository.

mck pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cassandra-builds.git


The following commit(s) were added to refs/heads/master by this push:
     new e094338  Send devbranch notifications to the #cassandra-builds-patches 
slack channel
e094338 is described below

commit e09433881ed8f9f5c0f940b7795de61b679c82a6
Author: Mick Semb Wever <m...@apache.org>
AuthorDate: Fri Jul 3 11:03:55 2020 +0200

    Send devbranch notifications to the #cassandra-builds-patches slack channel
---
 jenkins-dsl/cassandra_job_dsl_seed.groovy |  1 -
 jenkins-dsl/cassandra_pipeline.groovy     | 20 +++++---------------
 2 files changed, 5 insertions(+), 16 deletions(-)

diff --git a/jenkins-dsl/cassandra_job_dsl_seed.groovy 
b/jenkins-dsl/cassandra_job_dsl_seed.groovy
index 9c99d2d..9536e77 100644
--- a/jenkins-dsl/cassandra_job_dsl_seed.groovy
+++ b/jenkins-dsl/cassandra_job_dsl_seed.groovy
@@ -790,7 +790,6 @@ pipelineJob('Cassandra-devbranch') {
         cps {
             // Cassandra-devbranch still needs custom Jenkinsfile because of 
the parameters passed into the build jobs.
             script(readFileFromWorkspace('Cassandra-Job-DSL', 
'jenkins-dsl/cassandra_pipeline.groovy'))
-            sandbox()
         }
     }
 }
\ No newline at end of file
diff --git a/jenkins-dsl/cassandra_pipeline.groovy 
b/jenkins-dsl/cassandra_pipeline.groovy
index e902eaa..903c0c9 100644
--- a/jenkins-dsl/cassandra_pipeline.groovy
+++ b/jenkins-dsl/cassandra_pipeline.groovy
@@ -239,10 +239,12 @@ pipeline {
             sh "./cassandra-builds/build-scripts/cassandra-test-report.sh"
             junit '**/build/test/**/TEST*.xml,**/cqlshlib.xml,**/nosetests.xml'
             script {
-              // though this is not used in the devbranch pipeline, it exists 
here for testing the in-tree Jenkinsfile
-              changes = formatChanges(currentBuild.changeSets)
-              echo "changes: ${changes}"
+              // env.GIT_COMMIT or changeLogSets is not defined by 
parameterised manual builds
+              commit_head_sha = sh(returnStdout: true, script:"(git -C 
cassandra log -1 --no-merges --pretty=format:'%h')").trim()
+              commit_head_msg = sh(returnStdout: true, script:"(git -C 
cassandra log -1 --no-merges --pretty=format:'%an %ad %s')").trim()
+              echo "sha: ${commit_head_sha}; msg: ${commit_head_msg}"
             }
+            slackSend channel: '#cassandra-builds-patches', message: ":apache: 
<${env.BUILD_URL}|${currentBuild.fullDisplayName}> completed: 
${currentBuild.result}. 
<https://github.com/${REPO}/cassandra/commit/${commit_head_sha}|${REPO} 
${commit_head_sha}>\n${commit_head_msg}"
         }
         post {
             always {
@@ -261,15 +263,3 @@ def copyTestResults(target) {
             selector: [$class: 'StatusBuildSelector', stable: false],
             target: target]);
 }
-
-def formatChanges(changeLogSets) {
-    def result = ''
-    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]
-            result = result + "${entry.commitId} by ${entry.author} on ${new 
Date(entry.timestamp)}: ${entry.msg}\n"
-        }
-    }
-    return result
-}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to