# Painless deployment with Codeship.
# Visit the docs at https://documentation.codeship.com/docker/steps/

- name: Checks
  type: parallel
  service: app
  steps:
  - name: Flake8
    command: tox -e flake8
  - name: Pylint
    command: tox -e pylint
  - name: Bandit
    command: tox -e bandit

- name: Tests
  type: parallel
  service: app
  steps:
  - name: Python 3.5
    command: tox -e py35
  - name: Python 3.6
    command: tox -e py36
  - name: Python 3.7
    command: tox -e py37
  - name: PyPy 3
    command: tox -e pypy3
  - name: Behave
    command: tox -e behave

- name: Deploy staging
  type: serial
  tag: master
  service: app
  steps:
  - name: Staging
    command: echo 'This build would deploy to Staging now.'

- name: Deploy production
  type: manual
  tag: ^v[0-9]+\.[0-9]+\.[0-9]+$
  service: app
  steps:
  - name: Production
    command: echo 'This build would deploy to Production now.'

# Painless deployment with Codeship.
# Visit the docs at https://documentation.codeship.com/docker/steps/

- name: Checks
  type: parallel
  service: app
  steps:
  - name: Flake8
    command: tox -e flake8
  - name: Pylint
    command: tox -e pylint
  - name: Bandit
    command: tox -e bandit || true

- name: Tests
  type: parallel
  service: app
  steps:
  - name: Python 3.5
    command: tox -e py35
  - name: Python 3.6
    command: tox -e py36
  - name: Python 3.7
    command: tox -e py37
  - name: PyPy 3
    command: tox -e pypy3
  - name: Behave
    command: tox -e behave

- name: Deploy staging
  type: serial
  tag: master
  service: app
  steps:
  - name: Staging
    command: echo 'This build would deploy to Staging now.'

- name: Deploy production
  type: manual
  tag: ^v[0-9]+\.[0-9]+\.[0-9]+$
  service: app
  steps:
  - name: Production
    command: echo 'This build would deploy to Production now.'

Allow Bandit to fail on Codeship
Allow Bandit to fail on Codeship
