So the symbol on SCMTrigger was originally "scm", which turned out not to work in Pipeline due to overlapping with the auto-generated "scm" global variable. I changed the symbol to "pollScm" as of core Jenkins 2.22, but that means it won't work in Declarative on earlier core versions. In scripted Pipeline, you can use the old $class approach to defining an SCMTrigger (i.e., [$class: 'SCMTrigger', scmpoll_spec: '@daily', ignorePostCommitHooks: true]), but we don't currently allow the $class approach to be used for specifying triggers, parameters, job properties or wrappers in Declarative.
A. On Thu, Nov 17, 2016 at 7:12 AM, Tim Downey <timothy.dow...@gmail.com> wrote: > Hi Daniel. Thanks for the suggestion. I tried pollSCM and pollScm. Both > are unsupported. The 'cron' trigger is in the list. Highlighted below. > > java.lang.NoSuchMethodError: No such DSL method 'pollScm' found among steps > [VersionNumber, archive, bat, build, catchError, checkout, deleteDir, dir, > dockerFingerprintFrom, dockerFingerprintRun, dockerLabel, echo, > envVarsForTool, error, fileExists, getContext, git, input, isUnix, > libraryResource, load, mail, milestone, node, parallel, properties, pwd, > readFile, readTrusted, retry, script, sh, sleep, sshagent, stage, stash, > step, svn, timeout, tool, unarchive, unstash, waitUntil, withContext, > withDockerContainer, withDockerRegistry, withDockerServer, withEnv, > withMaven, wrap, writeFile, ws] or symbols [all, always, any, apiToken, > architecture, archiveArtifacts, artifactManager, batchFile, booleanParam, > buildButton, buildDiscarder, caseInsensitive, caseSensitive, choice, > choiceParam, clock, cloud, command, configFile, configFileProvider, cron, > crumb, defaultView, demand, disableConcurrentBuilds, docker, > downloadSettings, downstream, dumb, envVars, file, fileParam, filePath, > fingerprint, frameOptions, freeStyle, freeStyleJob, git, hyperlink, > hyperlinkToModels, installSource, jdk, jdkInstaller, jgit, jgitapache, jnlp, > jobDsl, jobName, junit, label, lastDuration, lastFailure, > lastGrantedAuthorities, lastStable, lastSuccess, legacy, list, local, > location, logRotator, loggedInUsersCanDoAnything, masterBuild, maven, > maven3Mojos, mavenErrors, mavenMojos, mavenWarnings, myView, nodeProperties, > nonStoredPasswordParam, none, overrideIndexTriggers, paneStatus, parameters, > password, pattern, pipeline-model, pipelineTriggers, plainText, plugin, > projectNamingStrategy, proxy, queueItemAuthenticator, quietPeriod, run, > runParam, schedule, scm, scmRetryCount, search, security, shell, slave, > stackTrace, standard, status, string, stringParam, swapSpace, text, > textParam, tmpSpace, toolLocation, unsecured, upstream, viewsTabBar, weather, > zfs, zip] or globals [currentBuild, docker, env, params, pipeline, scm] > > > On Thursday, November 17, 2016 at 9:47:07 AM UTC-5, Daniel Beck wrote: >> >> >> > On 17.11.2016, at 15:17, Tim Downey <timothy...@gmail.com> wrote: >> > >> > I went ahead and tried poll as a trigger, but as you can see, that is >> not supported. Supported methods within a triggers closure appear to be: >> > >> >> Should be 'pollSCM' (or 'pollScm'?). Note that the 'cron' trigger which >> you know works is also not listed. >> >> -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jenkinsci-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/jenkinsci-users/e04fbcc4-3c12-4ad3-823a-02c2e4e7a5f9%40googlegroups. > com > <https://groups.google.com/d/msgid/jenkinsci-users/e04fbcc4-3c12-4ad3-823a-02c2e4e7a5f9%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPbPdOY%3DVk9ffOH9vE2jDEPsC%3DLFj0EA4J01XsZ-Uqyb9vqs1w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.