From 932cc373b5f10bbf9cac4f8f7332b11339917368 Mon Sep 17 00:00:00 2001 From: Oleksandr Butenko <58562385+sprientera992@users.noreply.github.com> Date: Tue, 13 Jul 2021 16:58:10 +0300 Subject: [PATCH] DEV-1 --- Jenkinsfile | 44 +++++++++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 4a0558351..523f35e6b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -3,28 +3,19 @@ pipeline { registry = "sprientera/pet" registryCredential = 'dockerhub_id' dockerImage = '' - RELEASE_NOTES = sh (script: """git log --format="medium" -1 ${GIT_COMMIT}""", returnStdout:true) +// RELEASE_NOTES = sh (script: """git log --format="medium" -1 ${GIT_COMMIT}""", returnStdout:true) // commit = sh (script: "git log -1 --pretty=%B", , returnStdout: true).trim() } agent any stages { - stage('get hash') { - steps { - sh 'echo ${GIT_COMMIT_MSG}' - script { - commit = sh (script: "git log -1 --pretty=%B", , returnStdout: true).trim() - sh 'echo ${commit}' - } - } - } - stage('Jira2') { - steps { - script { - sh 'echo ${commit}' - jiraAddComment idOrKey: "${commit}", comment: 'build successfull from commit', site: 'butenko992' - } - } - } +// stage('Jira2') { + // steps { + // script { + // sh 'echo ${commit}' + // jiraAddComment idOrKey: "${commit}", comment: 'build successfull from commit', site: 'butenko992' + // } + //} + //} stage('Build') { steps { echo 'Running build automation' @@ -75,6 +66,21 @@ pipeline { } } } + stage('get hash') { + steps { + sh 'echo ${GIT_COMMIT_MSG}' + script { + commit = sh (script: "git log -1 --pretty=%B", , returnStdout: true).trim() + sh 'echo ${commit}' + } + } + } + } + post { + success { + echo 'I succeeded!' + jiraAddComment idOrKey: "${commit}", comment: 'build successfull from commit', site: 'butenko992' + } + } } -} }