-
Notifications
You must be signed in to change notification settings - Fork 16
Add tests for docker compose #130
base: master
Are you sure you want to change the base?
Conversation
src/test/java/com/org/jenkins/custom/jenkins/distribution/service/DockerBuildTest.java
Outdated
Show resolved
Hide resolved
For this PR, we discussed using testcontainers and another method I think but sorry I don't remember, @kwhetstone do you remember? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So a few things: I think minimally that this repository should have tests available to LOCALLY run in order to confirm that nothing breaks in docker. I know that the cost of running the agents that run docker tests is much higher, so I think that we should try to pull that into the Jenkinsfile builds only if we're absolutely sure these tests are accurately producing status for the docker-compose.
The base question: can you run locally, and can you then actually confirm everything works? As much as I hesitate to share this (as I have some nightmareish experiences with the application that used this particular maven plugin), you might want to investigate running plugin tests with docker-maven-plugin
. You can add options to skip those tests, which is what you'll end up doing for the Jenkins build.
src/test/java/com/org/jenkins/custom/jenkins/distribution/service/DockerBuildTest.java
Outdated
Show resolved
Hide resolved
Added docker scripts to test locally |
src/test/java/com/org/jenkins/custom/jenkins/distribution/service/DockerBuildTest.java
Outdated
Show resolved
Hide resolved
@kwhetstone @martinda Added scripts to test the docker compose locally. |
How to test |
Added bash scripts to test the docker compose