build-job-{{ job_name }}:
  docker:
    - image: << pipeline.parameters.git-image >>
  steps:
    - checkout
    - compare-branch:
        pattern: ^jobs/{{ job_name }}/
    - setup_remote_docker:
        version: << pipeline.parameters.docker-version >>
    - run:
        name: Build Docker image
        command: docker build -t app:build jobs/{{ job_name }}/
    - run:
        name: Test Code
        command: docker run app:build pytest --flake8 --black
