Code Monkey home page Code Monkey logo

Comments (7)

bluesliverx avatar bluesliverx commented on July 2, 2024
  1. Yes, it triggers even with no changes to commits
  2. There is a cause added to the build (retrieved through the rawBuild in pipeline scripts I believe) with this class: https://github.com/jenkinsci/github-pr-comment-build-plugin/blob/master/src/main/java/com/adobe/jenkins/github_pr_comment_build/GitHubPullRequestCommentCause.java. You would have to check for that to know if a comment triggered it.
  3. The config looks ok. I would double check that the hooks are setup properly and send all events (not just push events) to the Jenkins server. I would also take a look at the Jenkins logs (from within the Manage Jenkins pages) and watch the events coming in to make sure they are being properly sent. I would guess that you either a) are only sending push events from github or b) have some other misconfiguration on the system. I believe at one point there were also two types of github server configuration depending on which plugins you have installed, you might try checking for another github server config section in the Manage -> Configure page.

from github-pr-comment-build-plugin.

saheerb avatar saheerb commented on July 2, 2024

A quick question really, will this plugin work just with scheduled build. (As I cannot configure the webhook)

from github-pr-comment-build-plugin.

bluesliverx avatar bluesliverx commented on July 2, 2024

No, to do it without webhooks/events it would have to track the current comments somewhere in a database/filesystem and then trigger the build if it changed. Webhooks are really the only way to get this to work right.

from github-pr-comment-build-plugin.

saheerb avatar saheerb commented on July 2, 2024

Thanks @bluesliverx

from github-pr-comment-build-plugin.

akanshaallyo avatar akanshaallyo commented on July 2, 2024

Use Case :-
I am trying to trigger my pipeline on an issue commit.

Github Webhook -
Screenshot 2020-09-25 at 1 43 24 PM

Jenkins Multibranch Pipeline -
Screenshot 2020-09-25 at 1 45 26 PM

Jenkins Shared Library-
triggers { issueCommentTrigger('deploy on dev') }

This prints Build was not started by a trigger -
if (triggerCause) { echo("Build was started by ${triggerCause.userLogin}, who wrote: " + "\"${triggerCause.comment}\", which matches the " + "\"${triggerCause.triggerPattern}\" trigger pattern.") } else { echo('Build was not started by a trigger') }

It is triggering on every Issue comment rather than searching for deploy on dev. Have tried multiple of things not sure what is wrong

from github-pr-comment-build-plugin.

bluesliverx avatar bluesliverx commented on July 2, 2024

@akanshaallyo This is a separate issue, but it looks like you already created a separate one.

from github-pr-comment-build-plugin.

akanshaallyo avatar akanshaallyo commented on July 2, 2024

@bluesliverx Yes, I did #24

from github-pr-comment-build-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.