It will require some research / analysis but the suite of xtrigger plugins (eg: fstrigger) should be refactored to support Jenkins Workflow.

          [JENKINS-27301] Pipeline support for XTrigger

          Andy Pemberton created issue -
          Jesse Glick made changes -
          Priority Original: Minor [ 4 ] New: Major [ 3 ]
          Summary Original: Workflow Support New: Workflow support for XTrigger
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 161506 ] New: JNJira + In-Review [ 180724 ]
          Andrew Bayer made changes -
          Labels Original: workflow New: pipeline workflow
          Andrew Bayer made changes -
          Labels Original: pipeline workflow New: pipeline
          Alex Johnson made changes -
          Epic Link New: JENKINS-44690 [ 182554 ]

          Alex Johnson added a comment - - edited

          Most of these plugins are fairly old and inactive, but adding trigger compatibility will involve minimal code changes compared to other plugins. 

          xTrigger-lib:

          • update to be compatible with pipeline APIs
          • Add unit tests to confirm changes are correct
          • Bonus: speed up tests
            • Note: AbstractTriggerTest uses Thread.sleep(60000), possibly more efficient impl

          FSTrigger (thanks svanoort):

          • Implement EnvVars lookup that works for pipeline too (probably use a job or Jenkins level API)
          • Check compatibility of xtrigger-lib and FSTriggerCause
          • Create bridge methods for old method signatures & convert plugin signatures to new one
          • Add test that can trigger with pipelines
          • Manual test that file changes will trigger a pipeline build

          URLtrigger:

          • refactor to use pipeline compatible APIs
          • Add unit tests that triggers pipeline build from url response change
          • Manually test that a different response from a url will trigger a build

          Build result trigger:

          • Fix tests. errors after clone (I see slf4j in the stack trace ugh)
          • refactor to use pipeline compatible APIs
            • More work than URL and FS trigger to refactor, lots of uses of AbstractProject 
          • Add unit tests that triggers pipeline build from result
          • Manually test that the build result of a job can trigger a pipeline job

          Bonus:

          • Clean up code and docs. Add READMEs
          • addTrigger pipeline step

          I don't think ScriptTrigger (security issue; no longer distributed) or IvyTrigger (only 250 downloads) are worth looking at.

          Alex Johnson added a comment - - edited Most of these plugins are fairly old and inactive, but adding trigger compatibility will involve minimal code changes compared to other plugins.  xTrigger-lib: update to be compatible with pipeline APIs Add unit tests to confirm changes are correct Bonus: speed up tests Note: AbstractTriggerTest uses Thread.sleep(60000), possibly more efficient impl FSTrigger (thanks svanoort ): Implement EnvVars lookup that works for pipeline too (probably use a job or Jenkins level API) Check compatibility of xtrigger-lib and FSTriggerCause Create bridge methods for old method signatures & convert plugin signatures to new one Add test that can trigger with pipelines Manual test that file changes will trigger a pipeline build URLtrigger: refactor to use pipeline compatible APIs Add unit tests that triggers pipeline build from url response change Manually test that a different response from a url will trigger a build Build result trigger: Fix tests. errors after clone (I see slf4j in the stack trace ugh) refactor to use pipeline compatible APIs More work than URL and FS trigger to refactor, lots of uses of AbstractProject  Add unit tests that triggers pipeline build from result Manually test that the build result of a job can trigger a pipeline job Bonus: Clean up code and docs. Add READMEs addTrigger pipeline step I don't think ScriptTrigger (security issue; no longer distributed) or IvyTrigger (only 250 downloads) are worth looking at.

          Ryan Campbell added a comment -

          From a user POV, I should be able to write a pipeline script like this:

          pipeline {
              agent any
              triggers {
                  fstrigger('/ant/glob/**')
              }
              stages {...}
          }
          

          Ryan Campbell added a comment - From a user POV, I should be able to write a pipeline script like this: pipeline { agent any triggers { fstrigger( '/ant/glob/**' ) } stages {...} }
          James Dumay made changes -
          Epic Link Original: JENKINS-44690 [ 182554 ] New: JENKINS-34657 [ 170293 ]
          Basil Crow made changes -
          Link New: This issue is duplicated by JENKINS-33691 [ JENKINS-33691 ]

            alexbrjo Alex Johnson
            apemberton Andy Pemberton
            Votes:
            13 Vote for this issue
            Watchers:
            22 Start watching this issue

              Created:
              Updated: