We are currently thinking about an integration of Jenkins into Cloud Foundry. Since Docker is very popular for "containerizing builds" in its containers we thought that the same idea might work for CF containers in the Elastic Runtime.
Here's a rough sketch of what we want to do:
- From within Jenkins, push an app to Cloud Foundry that starts a Jenkins agent inside this app via
java -jar slave.jar -jnlpUrl http://yourserver:port/computer/slave-name/slave-agent.jnlpgiven as the command run in the container - Connect to this container via Jenkins and use the Jenkins agent (now running within the container) to build our application within the container
- Start the application within the container
- Run end-to-end tests against the app running in the container
My questions are:
- Generally speaking: do you think, this is a good idea?
- If so - how can we get a build pack for Cloud Foundry that provides a JDK?
- Is it possible to make the container run our app after it is build inside the container or do we have to push our app to another container after we build it?
Thanks a lot for your help!