Docker Community Forums

Share and learn in the Docker community.

Doing automated testing on internal pull request without the build


(Deanunnotech) #1

Our team will relying in docker cloud with our CI and everything is great. The automated testing and build is great however this time; We would love to have every test to be executed upon merge request however it still triggers the auto build at the beginning which is like a redundancy and is just an extra time. Ideally, we just want the tests to be triggered and upon merge only the build will be triggered

Here is my Dockerfile

FROM deanchrisarmada/django-image-sample:latest

WORKDIR /usr/src/app
COPY . .
RUN pip install -r requirements.txt
RUN django-admin startproject project .; exit 0
EXPOSE 8000:8000
CMD supervisord -c supervisord.conf --nodaemon

Here is my Dockerfile.test

FROM python:2.7

COPY . .
RUN pip install -r requirements.txt && python manage.py makemigrations

Here is my django.test.yml

sut:  # system under test
  build: .
  dockerfile: Dockerfile.test
  command: python manage.py test