How can I export an existing job into an Jenkinsfile?
<p>I would like to use Pipeline to keep track of my Jenkin Jobs within my SCM. (Source control manager).</p>

<p>Is there a way I can take my existing jobs and export them to a valid <a href="https://jenkins.io/doc/book/pipeline/jenkinsfile/" rel="noreferrer">Jenkinsfile</a> which can be read by Pipeline?</p>

<p>The main plugins I'm using which I would need to be exported are Github Pull Request Builder, Test result reporters, code coverage reporters, as well as slack notification post-build tasks.</p>

<p>My main question is how to export my Jenkins settings into a Jenkinsfile as mentioned in the above link so that I don't have to write them all by hand.</p>