-
Bug
-
Resolution: Fixed
-
Normal
-
None
-
None
-
None
-
None
New versions of docker and/or docker-compose name containers as project_service_containerid, whereas older versions just included an incrementing number instead of the containerid. This means that our script to copy test results from jenkins no longer works because it assumes that the container name just ends in a number:
https://github.com/metabrainz/acousticbrainz-server/blob/master/docker/jenkins-test.sh#L12
This results in an error such as: https://ci.metabrainz.org/job/acousticbrainz-server/364/console
Error response from daemon: No such container: jenkinsbuildjenkinsacousticbrainzserver364_acousticbrainz_run_1
Stopping jenkinsbuildjenkinsacousticbrainzserver364_redis_1 ...
Stopping jenkinsbuildjenkinsacousticbrainzserver364_db_1 ...
[2A[2K
Stopping jenkinsbuildjenkinsacousticbrainzserver364_redis_1 ... [32mdone[0m
[2B[1A[2K
Stopping jenkinsbuildjenkinsacousticbrainzserver364_db_1 ... [32mdone[0m
[1BRemoving jenkinsbuildjenkinsacousticbrainzserver364_acousticbrainz_run_77ae4abb29ba ...
Note that the expected container name for copying the test results is different to the actual container name.
We should either:
1. use docker-compose run --name to specify a specific expected container name when running the tests
2. use docker-compose ps to automatically determine the name of the container when copying results
3. bind mount a folder from the host into the container to save results instead of using docker cp
This likely will affect other services which we test with jenkins too (MsB, CB), but we've not seen these failures yet.