forked from apache/incubator-kie-kogito-pipelines
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile.tools.create-issue
37 lines (32 loc) · 1.02 KB
/
Jenkinsfile.tools.create-issue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import org.jenkinsci.plugins.workflow.libs.Library
@Library('jenkins-pipeline-shared-libraries')_
pipeline {
agent {
label 'kie-rhel7 && !master'
}
options {
timeout(time: 60, unit: 'MINUTES')
}
// environment {
// Some generated env is also defined into .jenkins/dsl/jobs.groovy file
// }
stages {
stage('Checkout repo') {
steps {
script {
deleteDir()
checkout(githubscm.resolveRepository(params.REPOSITORY, params.AUTHOR, params.BRANCH, false))
}
}
}
stage('Create issue') {
steps {
script {
withCredentials([usernamePassword(credentialsId: 'kie-ci', usernameVariable: 'GITHUB_USER', passwordVariable: 'GITHUB_TOKEN')]) {
sh "${GITHUB_CLI_PATH} issue create --title '${params.ISSUE_TITLE}' --body '${params.ISSUE_BODY}'"
}
}
}
}
}
}