m1kc / django-spinproject

Opinionated version of `startproject` with some popular third-party packages.
MIT License
5 stars 1 forks source link

Skip running PostgreSQL during CI deploy #21

Closed m1kc closed 1 year ago

m1kc commented 2 years ago
stages:
- check
- deploy

image: python:3.9-slim

cache:
  paths:
    - .cache/pip
    - .cache/pypoetry
    - venv/

services:
  - postgres:13.1-alpine
  - clickhouse/clickhouse-server:22.3-alpine

variables:
...

before_script:
  - python -V  # Print out python version for debugging
  - apt update -qq
  - apt install -qq -y make
  - pip install -q poetry
  - poetry config cache-dir "$CI_PROJECT_DIR/.cache/pypoetry"
  - poetry config virtualenvs.create true

test:
  stage: check
  script:
    - script/setup
    - script/cibuild

deploy_bleeding:
  when: manual
  stage: deploy
  image: "docker:19.03.1"
  before_script:
    - docker info
  services: []
  cache: {}
  script:
...

deploy_main:
  when: manual
  stage: deploy
  image: "docker:19.03.1"
  before_script:
    - docker info
  services: []
  cache: {}
  script:
...

# ISSUE: nobody can guarantee that image did not change between deploy_bleeding and deploy_promote. Use at your own risk.
# deploy_promote:
#   when: manual
#   stage: deploy
#   script:
#     - docker tag 'docker.comearth.local:5000/comearth/auchan-dash:bleeding' 'docker.comearth.local:5000/comearth/auchan-dash'
#     - docker push 'docker.comearth.local:5000/comearth/auchan-dash'

# pages:
#   script:
#     - pip install sphinx sphinx-rtd-theme
#     - cd doc ; make html
#     - mv build/html/ ../public/
#   artifacts:
#     paths:
#       - public
#   only:
#     - master
m1kc commented 1 year ago

Closed by #50