userver-framework / userver

Production-ready C++ Asynchronous Framework with rich functionality
https://userver.tech
Apache License 2.0
2.37k stars 275 forks source link

Add a command to pack only files required for tests into Docker #652

Open Anton3 opened 1 month ago

Anton3 commented 1 month ago

Multiple users have reported (ru support chat example) that their CI uses the following process:

  1. One machine builds the service
  2. Only the required artifacts are stored and packed into Docker
  3. Another machine runs the tests

To better support this workflow, we need the ability to prepare such a Docker image (in debug or release build) with a single command.

The files required for tests:

  1. the binary build/SERVICE_NAME
  2. build/runtests-testsuite-SERVICE_NAME
  3. configs
  4. testsuite tests directory
  5. build/venv-testsuite-SERVICE_NAME
  6. while we are at it, let's also pack the binary of gtest tests

All the files currently have to be placed at the paths within the Docker image that are identical to the paths on the build machine, e.g. /path/to/my-service/build-release/my-service should be put at exactly that path within the Docker.