Skip to content

bremnes/docker-test-in-dockerfile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-test-in-dockerfile Build status

.net core project to explore the possibility of running tests as a part of docker build process. By doing it this way there will be no dependencies to specific test runner(s) on the build server, only Docker.

Since there's currently no Docker support for exporting files out from a multi-stage docker build and/or image, the build script places the test results into the container and then later creates a container in which we can copy it from.

Dockerfile

Example Dockerfile can be located at src/CalculatorWeb/Dockerfile

Trigger failure

This example is a simple .net core project consisting of a web api project and a separate project for unit tests. For triggering the tests to fail, add --build-arg FAILTEST=true to the docker build command. This will pass an environment variable to the unit test which will then promptly fail.

TODO

  • Export test results out from build process.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published