title: Jenkinsfile Trigger a job from quay.io trigger plugin
body: <p>I am attempting to move from a Freestyle Project to a multibranch pipeline build.  I would like my Jenkinsfile to trigger when a new container has been pushed to my Quay.io repository.  In the Freestyle Project I'm able to accomplish this with the Quay.io Trigger Plugin. 
  Moving to the Multibranch build pipeline I've found this <a href="https://www.toger.us/blog/2017/06/17/jenkins-and-github-hooks/" rel="nofollow noreferrer">post</a>, that describes how to trigger on a dockerhub trigger.  I've also used the Jenkins Pipeline Syntax "wizard" to generate the code to add to my Jenkinsfile:</p>
  
  <pre><code>properties([[$class: 'ScannerJobProperty', doNotScan: false], [$class: 'RebuildSettings', autoRebuild: false, rebuildDisabled: false], [$class: 'ThrottleJobProperty', categories: [], limitOneJobWithMatchingParams: false, maxConcurrentPerNode: 0, maxConcurrentTotal: 0, paramsToUseForLimit: '', throttleEnabled: false, throttleOption: 'project'], pipelineTriggers([[$class: 'QuayIoTrigger', repositories: ['hostedsparkbots/janitorbot-timer', 'hostedsparkbots/janitorbot', 'hostedsparkbots/sparky']]])])
  </code></pre>
  
  <p>In the above case when I do a scan of my github repository I get a <strong>wall</strong> of backtraces from the jenkins console:</p>
  
  <pre><code>java.lang.IllegalArgumentException: java.lang.ClassCastException@712ddbf9
      at sun.reflect.GeneratedMethodAccessor4447.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.jenkinsci.plugins.structs.describable.Setter$1.set(Setter.java:33)
      at org.jenkinsci.plugins.structs.describable.DescribableModel.injectSetters(DescribableModel.java:338)
      at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:261)
  Caused: java.lang.IllegalArgumentException: Could not instantiate {repositories=[hostedsparkbots/janitorbot-timer, hostedsparkbots/janitorbot, hostedsparkbots/sparky]} for QuayIoTrigger(repositories?: String[])
      at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:264)
      at org.jenkinsci.plugins.structs.describable.DescribableModel.coerce(DescribableModel.java:380)
      at org.jenkinsci.plugins.structs.describable.DescribableModel.coerceList(DescribableModel.java:461)
      at org.jenkinsci.plugins.structs.describable.DescribableModel.coerce(DescribableModel.java:365)
      at org.jenkinsci.plugins.structs.describable.DescribableModel.buildArguments(DescribableModel.java:318)
      at org.jenkinsci.plugins.structs.describable.DescribableModel.instantiate(DescribableModel.java:259)
  Caused: java.lang.IllegalArgumentException: Could not instantiate {triggers=[{$class=QuayIoTrigger, repositories=
  </code></pre>
  
  <p>Does anybody actually have this working in a Jenkinsfile?</p>