https://wiki.jenkins-ci.org/display/JENKINS/Post-initialization+script may be an alternative to copying files around. It'll require some knowledge of Jenkins internals though.
I don't know how far along https://github.com/jenkinsci/system-config-dsl-plugin is, but it may be an alternative to the above in the near(ish) future. > On 24.06.2016, at 12:28, Wesley Connor <wesleyjcon...@gmail.com> wrote: > > I am setting up a docker image which will start Jenkins in a known state, > this will be deployed to multiple users to run standalone and it will > populate its jobs from a dsl script in a separate repository. > > By copying the files that I need from a running Jenkins instance I have been > able to configure the Dockerfile so it starts with all relevant config set > (plugins, configuration, email addresses etc) > However, I am unable to set the credentials for sending mail in the Mail > plugin, I have tried importing all secret.key files and including all the > files from the secrets directory. > The problem is when I start up the instance Jenkins detects that there is > possibly something wrong and then resets all the encrypted files. I realise > that security is a good thing and Jenkins is doing the right thing, however I > am fine with the email password being saved as the image will only be used > internally. > > Does anyone know the files I need to include so that I can preset the > password for Jenkins or alternatively a way that i can set the email > credentials on the command line, so that I can include it as a step when > starting Jenkins, inside the docker image? > > Thanks > > -- > 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/b3152fe7-a74f-4a18-96bf-9098ad79a974%40googlegroups.com. > 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/4E59BCFD-0800-4986-A3A9-3C5EF8124AB4%40beckweb.net. For more options, visit https://groups.google.com/d/optout.