From 8113c72a5a566583e5f2bb9b11291c75ca644400 Mon Sep 17 00:00:00 2001 From: Oleksandr Butenko <58562385+sprientera992@users.noreply.github.com> Date: Tue, 13 Jul 2021 14:10:08 +0300 Subject: [PATCH] Update Jenkinsfile --- Jenkinsfile | 34 +++++++--------------------------- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 36d545148..eb0dc53de 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -4,24 +4,20 @@ pipeline { registryCredential = 'dockerhub_id' dockerImage = '' RELEASE_NOTES = sh (script: """git log --format="medium" -1 ${GIT_COMMIT}""", returnStdout:true) + TaskID = '' } agent any stages { stage('Jira2') { steps { - jiraAddComment idOrKey: 'DEV-1', comment: 'hello', site: 'butenko992' - - script { - env.revision = sh(script: "git log --pretty=format:\"%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset\" \$prevcommit...\$GIT_COMMIT", , returnStdout: true).trim() - version = sh(script: "echo \$PARSED_TAG | awk -F\"_\" '{print \$1}'", , returnStdout: true).trim() - } + jiraAddComment idOrKey: '${TaskID}', comment: 'build successfull', site: 'butenko992' } } - stage('get hash') { - steps { - sh 'echo ${RELEASE_NOTES}' - sh 'echo ${GIT_COMMIT}' - } +\\ stage('get hash') { +\\ steps { + \\ sh 'echo ${RELEASE_NOTES}' + \\ sh 'echo ${GIT_COMMIT}' + \\ } } stage('Build') { steps { @@ -74,21 +70,5 @@ pipeline { } } } - stage('JIRA') { - steps { - script { - def testIssue = [fields: [ // id or key must present for project. - project: [id: 'DEV'], - summary: 'New JIRA Created from Jenkins.', - description: 'New JIRA Created from Jenkins.', - customfield_1000: 'customValue', - // id or name must present for issuetype. - issuetype: [id: '3']]] - response = jiraEditIssue idOrKey: 'DEV-1', issue: testIssue - echo response.successful.toString() - echo response.data.toString() - } - } -} } }