Scala slave repository hardening does not work
Currently the scala slave will pull dependencies from the public repositories that are enabled by default in sbt and thus circumventing the configured Nexus.
This depends on whether or Not a Proxy is set because of an sbt issue with noproxy.. ;-( https://github.com/opendevstack/ods-project-quickstarters/blob/master/jenkins-slaves/scala/Dockerfile.rhel7#L64
For some reason files and directories created during image creation in the jenkins home directory are not there anymore if you start the container afterwards for the builds. I.e. sbt configuration is gone for every build.
This seems odd to me as the official slaves use the homedir as well https://github.com/openshift/jenkins/blob/41bf8a53b33b12b8f0ae504d9865cf060f7b26d3/agent-maven-3.5/Dockerfile.rhel7#L35. So if anyone can point out possible sources of error...
I can fix it meanwhile by moving the configuration to a different directory but that does not feel nice to me.
@oalyman - what files do you talk about? just curious...
directories .sbt and .ivy2
@clemensutschig Ok got it. The jenkins slave has a mount for /home/jenkins with an emptyDir.
That erases everything that was living there previously from the image.
So all the sbt config is gone when builds are executed.
Can you give me a hint what in the stack configures the emptyDir for /home/jenkins?
The only tzung i can think of is the podtemplate. @michaelsauter ?
Jan Frank [email protected] schrieb am Di., 1. Okt. 2019, 19:57:
@clemensutschig https://github.com/clemensutschig Ok got it. The jenkins slave has a mount for /home/jenkins with an emptyDir. That erases everything that was living there previously from the image. So all the sbt config is gone when builds are executed. Can you give me a hint what in the stack configures the emptyDir for /home/jenkins?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/opendevstack/ods-project-quickstarters/issues/329?email_source=notifications&email_token=AJV7CSAL6OOTZ4BYMPFMJ4LQMOFSPA5CNFSM4ITC2CUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEACFMUY#issuecomment-537155155, or mute the thread https://github.com/notifications/unsubscribe-auth/AJV7CSBQBQCR532DX3UFDDDQMOFSPANCNFSM4ITC2CUA .
It's the kubernetes-plugin (kubernetes-1.12.8) in the version I am using it for jenkins... https://github.com/jenkinsci/kubernetes-plugin/blob/3c52496f4a138132372a2d683ad97c5111d2803f/src/main/java/org/csanchez/jenkins/plugins/kubernetes/PodTemplateBuilder.java#L232
@clemensutschig this is what we were suffering from https://github.com/jenkinsci/kubernetes-plugin/releases/tag/kubernetes-1.18.0. Actually every jenkins-slave image, that uses the $HOME dir for shipping configuration and a version of the kubernetes-plugin prior 1.18.0 might not behave as intended.
@oalyman I think this issue is outdated now, right? Or does it still apply?