There are two things that might make your life easier:
1) Jenkinsfile, you can put this into your source control and then it will be executed as if it were in the web ui. You just change the option in the job setup to "Pipeline script from SCM" instead of "Pipeline script". Then when you push updates to the Jenkinsfile, it will use your changes.
2) The Replay. This allows you to rerun a pipeline job and make small modifications to the script that was used to test things out, then you can incorporate those changes into your Jenkinsfile.
Hope those things help
Alex