Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fails to create issue #17

Open
ramprasadgk opened this issue Jul 27, 2020 · 1 comment
Open

fails to create issue #17

ramprasadgk opened this issue Jul 27, 2020 · 1 comment

Comments

@ramprasadgk
Copy link

ramprasadgk commented Jul 27, 2020

I have this simple DSL pipeline

pipeline {
    agent any
    stages {
        stage('Example') {
            steps {
            script{
                echo 'Hello World'
                  properties([[$class: 'GithubProjectProperty',
                projectUrlStr: 'https://github.com/ramprasadgk/java-maven.git']])
            }
            }
        }
    }
    post { 
        always { 
            echo 'I will always say Hello again!'
           
            step([$class: 'GitHubIssueNotifier',
               issueAppend: true, issueTitle: 'test'])
        }
    }
}

pipeline runs without any issue however no issues are created
am i missing something?

@ajschmidt8
Copy link

The GitHubIssueNotifier will only create an issue if the build result is a failure. You can view the logic below. It looks like your build will pass since it's only doing an echo 'Hello World. If you changed your pipeline to something like sh 'exit 1', then it would probably create an issue.

https://github.com/jenkinsci/github-issues-plugin/blob/master/src/main/java/org/jenkinsci/plugins/githubissues/GitHubIssueNotifier.java#L146-L194

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants