HI ppl, I have the bellow Jenkinsfile and I want to either:
1) Include the node sectin inside the pipeline (but needs to run on the master while the other will run on the slave) 2) Either I need the jiraTicket variable to be pass to the Building stage (actually is is not cause it only last until the end of the node) Thanks for the help Jo properties([[$class: 'GitLabConnectionProperty', gitLabConnection: 'GitLab']]) node { stage('JIRA') { def issue = [fields: [ project: [key: 'JIRAKEY'], assignee: [name: 'devops'], summary: "Jenkins Build ${env.JOB_NAME} #${env.BUILD_ID} Ticket", description: "New JIRA Ticket created on ${env.BUILD_TIMESTAMP} from Jenkins. URL: ${env.JENKINS_URL}", priority: [name: 'Medium'], labels: ['Jenkins'], issuetype: [name: 'Jenkins']]] def newIssue = jiraNewIssue issue: issue, site: 'JIRASITE' def jiraTicket = newIssue.data.key echo "${jiraTicket}" } } pipeline { agent { label 'Slave_CentOS7' } stages { stage('Build') { steps { echo 'Building..' //jiraAddComment idOrKey: "${jiraTicket}", comment: 'test comment' sh 'ls -lrt' } } stage('Test') { steps { echo 'Testing..' sh 'ls -lrt' } } stage('Deploy') { steps { echo 'Deploying....' } } } post { always { echo 'Always' } success { updateGitlabCommitStatus(name: 'build', state: 'success') } failure { updateGitlabCommitStatus(name: 'build', state: 'failed') } } } -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/7d4a5d944f254f4d95ccaeb11a1dcaef%40BSKEXCH2013HYPV.mwrinfosecurity.com. For more options, visit https://groups.google.com/d/optout.