From 3da8a5ff634367b1b172c406a1f3cdf82de019c2 Mon Sep 17 00:00:00 2001 From: Robert Schumann Date: Fri, 10 Dec 2021 22:08:06 +0100 Subject: [PATCH] echo repo url --- Jenkinsfile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7c6b08a..1ac4af9 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -11,12 +11,12 @@ properties([ node { try { - setBuildStatus('build started', 'PENDING') + setBuildStatus('In progress...', 'PENDING') pipeline() - setBuildStatus('build succeeded', 'SUCCESS') + setBuildStatus('Success', 'SUCCESS') } catch(e) { - setBuildStatus('build failed', 'FAILURE') + setBuildStatus(e.take(140), 'FAILURE') throw e } finally { @@ -24,6 +24,8 @@ node { } } + +// --- helper functions --- def pipeline() { stage('checkout') { checkout scm @@ -58,6 +60,7 @@ def cleanup() { void setBuildStatus(message, state) { def repoUrl = sh(script: 'git config --get remote.origin.url', returnStdout: true).trim() + echo repoUrl step([ $class: "GitHubCommitStatusSetter", reposSource: [$class: "ManuallyEnteredRepositorySource", url: repoUrl],