| import org.jenkinsci.plugins.workflow.libs.Library |
| |
| @Library('jenkins-pipeline-shared-libraries')_ |
| |
| pipeline { |
| agent { |
| docker { |
| image env.AGENT_DOCKER_BUILDER_IMAGE |
| args env.AGENT_DOCKER_BUILDER_ARGS |
| label util.avoidFaultyNodes() |
| } |
| } |
| options { |
| timeout(time: 60, unit: 'MINUTES') |
| } |
| |
| 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}'" |
| } |
| } |
| } |
| } |
| } |
| } |