Hey,
I keep seeing reference to a properties function like this:
properties([
pipelineTriggers([
[$class: "GitHubPushTrigger"]
])
])
The description and functionality appears to do what the UI option "GitHub hook trigger for GITScm polling" does.
Unfortunately this doesn't seem to exist in the current declarative pipeline at a top level config.
properties([[$class: 'GithubProjectProperty', displayName: '', projectUrlStr: 'https://github.com/foo/bar/'], pipelineTriggers([githubPush()])])
However the documentation and that syntax generator appear to generate a step that doesn't exist - Jenkins throws an error:
WorkflowScript: 30: Invalid step "properties" used - not allowed in this context - The properties step cannot be used in Declarative Pipelines
I feel like I'm going around in circles here :( Help!
Thanks.