Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-35314

p4 Plugin does not trigger Pipeline builds

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • p4-plugin
    • Jenkins 1.651.2
      p4 Plugin 1.4.0
      Pipeline 2.1
      Pipeline SCM 2.0

    Description

      I didn't want this to get lost since JENKINS-29979 was closed out.

      The P4 Trigger isn't firing a Pipeline job off when a POST request comes in per the /p4/ help page in Jenkins, or if you do a manual trigger. I do see the request come in, after which P4 probes the Pipeline projects, but then nothing happens:

      Jun 02, 2016 11:36:16 AM INFO org.jenkinsci.plugins.p4.trigger.P4Hook doChange
      Received trigger event: {change:123456,p4port: "p4host.example.org:1666"}
      Jun 02, 2016 11:36:16 AM INFO org.jenkinsci.plugins.p4.trigger.P4Hook probeJobs
      P4: probing: pipeline-project-01
      Jun 02, 2016 11:36:16 AM INFO org.jenkinsci.plugins.p4.trigger.P4Hook probeJobs
      P4: probing: pipeline-project-02
      Jun 02, 2016 11:36:16 AM INFO org.jenkinsci.plugins.p4.trigger.P4Hook probeJobs
      P4: probing: pipeline-project-03
      

      For now, we are doing a poll every couple of hours, but it would be great to use the Trigger mechanism in the future.

      Attachments

        Activity

          p4paul Paul Allen added a comment -

          Updated documentation on trigger authorisation.

          p4paul Paul Allen added a comment - Updated documentation on trigger authorisation.
          pyrocks Mor L added a comment -

          Hi,

          After not being able to successfully poll perforce directly from a pipeline job (http://stackoverflow.com/questions/41260552/jenkins-pipeline-poll-perforce), I tried setting up the automatic trigger according to the "Triggering" section in https://github.com/jenkinsci/p4-plugin/blob/master/SETUP.md
          I have a similar issue which was reported above - I can see the trigger being received in the System log - but poking the job does nothing:

          Dec 21, 2016 10:59:21 AM INFO org.jenkinsci.plugins.p4.trigger.P4Hook doChange
          Received trigger event: {change:1239,p4port:"perfcm:1668"}
          Dec 21, 2016 10:59:21 AM INFO org.jenkinsci.plugins.p4.trigger.P4Hook probeJobs
          P4: probing: pipeline_perforce_polling
          Dec 21, 2016 10:59:21 AM INFO org.jenkinsci.plugins.p4.trigger.P4Trigger poke
          P4: poking: pipeline_perforce_polling
          

          nothing in the log beyond this point.

          p.s I'm running on Jenkins 2.7.4 - is it resolved in 2.8?

          Thanks,
          Mor

          pyrocks Mor L added a comment - Hi, After not being able to successfully poll perforce directly from a pipeline job ( http://stackoverflow.com/questions/41260552/jenkins-pipeline-poll-perforce ), I tried setting up the automatic trigger according to the "Triggering" section in https://github.com/jenkinsci/p4-plugin/blob/master/SETUP.md I have a similar issue which was reported above - I can see the trigger being received in the System log - but poking the job does nothing: Dec 21, 2016 10:59:21 AM INFO org.jenkinsci.plugins.p4.trigger.P4Hook doChange Received trigger event: {change:1239,p4port: "perfcm:1668" } Dec 21, 2016 10:59:21 AM INFO org.jenkinsci.plugins.p4.trigger.P4Hook probeJobs P4: probing: pipeline_perforce_polling Dec 21, 2016 10:59:21 AM INFO org.jenkinsci.plugins.p4.trigger.P4Trigger poke P4: poking: pipeline_perforce_polling nothing in the log beyond this point. p.s I'm running on Jenkins 2.7.4 - is it resolved in 2.8? Thanks, Mor
          heiko_nardmann Heiko Nardmann added a comment - - edited

          Which credentials does your anonymous user have? It it able to list+read the jobs?

          heiko_nardmann Heiko Nardmann added a comment - - edited Which credentials does your anonymous user have? It it able to list+read the jobs?
          pyrocks Mor L added a comment -

          Hi, thanks for the response.
          I do not use the anonymous user but a crumb as shown in the documentation.
          The user I use to get the crumb has the build permission, and since the jenkins log shows the request is received and the relevant job found I thought the role of the user ends there.
          I will play around with the permissions tomorrow and update.

          pyrocks Mor L added a comment - Hi, thanks for the response. I do not use the anonymous user but a crumb as shown in the documentation. The user I use to get the crumb has the build permission, and since the jenkins log shows the request is received and the relevant job found I thought the role of the user ends there. I will play around with the permissions tomorrow and update.
          pyrocks Mor L added a comment -

          Actually, the same happens when I trigger the job manually using the $jenkinsurl/p4 while connected as an admin user.

          pyrocks Mor L added a comment - Actually, the same happens when I trigger the job manually using the $jenkinsurl/p4 while connected as an admin user.

          People

            p4paul Paul Allen
            kmott Kyle Mott
            Votes:
            2 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: