image: cprov/stoq:candidate

variables:
  GIT_SUBMODULE_STRATEGY: recursive

stages:
  - test
  - build

before_script:
  # Install tools to create debian packages
  - apt update
  - apt --yes install devscripts debhelper python3-all

test:
  stage: test
  script:
    - make check

generate_deb:
  stage: build
  script:
    - rm -rf dist
    - make deb

  artifacts:
    paths:
      - dist/*.deb

  only:
  - master

image: cprov/stoq:candidate

variables:
  GIT_SUBMODULE_STRATEGY: recursive

stages:
  - test
  - build

before_script:
  # Install tools to create debian packages
  - apt update
  - apt --yes install devscripts debhelper python3-all

test:
  stage: test
  script:
    - make check

.create_deb:
  stage: build
  script:
    - rm -rf dist
    - make deb
  artifacts:
    paths:
      - dist/*.deb

create_deb_master:
  extends: .create_deb
  only:
    - master

create_deb_manual:
  extends: .create_deb
  when: manual

Enable manual trigger to build stage
Enable manual trigger to build stage

Allow deb generation to be triggered manually when needed.

Related to: https://gitlab.com/stoqtech/squads/kazoo/tasks/issues/17
