Open kayibal opened 5 years ago
I think it is a good idea to have the following practice before pushing any docker image:
I think we should enforce this with a bashscript that automates the process. We should then also use this in CI env to build and push images.
What do you think @mdank @vitords ?
Here is a starting point for such a script:
#!/usr/bin/env bash set -e IMAGE=drtools/project:$TAG docker build --pull -t $IMAGE -f Dockerfile .. docker run \ -e DRTOOLS_SETTINGS_MODULE=project.settings.tests \ -e AWS_ACCESS_KEY_ID=dummy-access-key \ -e AWS_SECRET_ACCESS_KEY=dummy-access-key-secret \ -e AWS_DEFAULT_REGION=eu-west-1 \ --user root \ $IMAGE \ py.test \ -W ignore \ -x \ --ignore project/tests/integration \ project/tests docker push $IMAGE
Would you swear for your MacBook that you'll run integration tests after every build and before every push? :P
Hahaha no that's why they are ignored right ;) but unittests at least.
I think it is a good idea to have the following practice before pushing any docker image:
I think we should enforce this with a bashscript that automates the process. We should then also use this in CI env to build and push images.
What do you think @mdank @vitords ?
Here is a starting point for such a script: