This commit is contained in:
parent
7be918c231
commit
435946f769
1 changed files with 66 additions and 60 deletions
126
.drone.yml
126
.drone.yml
|
|
@ -13,67 +13,73 @@ environment:
|
|||
PRE_COMMIT_HOME: /drone/src/.cache/.pre-commit
|
||||
|
||||
steps:
|
||||
- name: restore cache
|
||||
image: meltwater/drone-cache
|
||||
pull: true
|
||||
environment:
|
||||
AWS_ACCESS_KEY_ID:
|
||||
from_secret: AWS_ACCESS_KEY_ID
|
||||
AWS_SECRET_ACCESS_KEY:
|
||||
from_secret: AWS_SECRET_ACCESS_KEY
|
||||
settings:
|
||||
restore: true
|
||||
bucket: halig-cache
|
||||
endpoint: https://s3.fukurokuju.dev
|
||||
region: us-east-1
|
||||
path_style: true
|
||||
mount:
|
||||
- .venv
|
||||
- .cache/.pre-commit
|
||||
- name: restore cache
|
||||
image: meltwater/drone-cache
|
||||
pull: true
|
||||
environment:
|
||||
AWS_ACCESS_KEY_ID:
|
||||
from_secret: AWS_ACCESS_KEY_ID
|
||||
AWS_SECRET_ACCESS_KEY:
|
||||
from_secret: AWS_SECRET_ACCESS_KEY
|
||||
settings:
|
||||
restore: true
|
||||
bucket: halig-cache
|
||||
endpoint: https://s3.fukurokuju.dev
|
||||
region: us-east-1
|
||||
path_style: true
|
||||
mount:
|
||||
- .venv
|
||||
- .cache/.pre-commit
|
||||
|
||||
- name: install dependencies
|
||||
pull: true
|
||||
image: git.roboces.dev/catalin/poetry:beta
|
||||
commands:
|
||||
- poetry config virtualenvs.in-project 1
|
||||
- poetry install --with linters
|
||||
- name: install dependencies
|
||||
pull: true
|
||||
image: git.roboces.dev/catalin/poetry:beta
|
||||
commands:
|
||||
- poetry config virtualenvs.in-project 1
|
||||
- poetry install --with linters,test
|
||||
|
||||
- name: lint
|
||||
pull: true
|
||||
image: git.roboces.dev/catalin/poetry:beta
|
||||
commands:
|
||||
- .venv/bin/pre-commit run --all-files --color always
|
||||
- name: lint
|
||||
pull: true
|
||||
image: git.roboces.dev/catalin/poetry:beta
|
||||
commands:
|
||||
- .venv/bin/pre-commit run --all-files --color always
|
||||
|
||||
- name: deploy
|
||||
pull: true
|
||||
image: git.roboces.dev/catalin/poetry:beta
|
||||
commands:
|
||||
- poetry build
|
||||
- poetry config repositories.roboces https://git.roboces.dev/api/packages/catalin/pypi
|
||||
- poetry config http-basic.roboces "$REGISTRY_USERNAME" "$REGISTRY_PASSWORD"
|
||||
- poetry publish --repository roboces
|
||||
when:
|
||||
ref:
|
||||
- refs/tags/v*
|
||||
- name: tests
|
||||
pull: true
|
||||
image: git.roboces.dev/catalin/poetry:beta
|
||||
commands:
|
||||
- .venv/bin/pytest
|
||||
|
||||
- name: rebuild cache
|
||||
image: meltwater/drone-cache
|
||||
pull: true
|
||||
environment:
|
||||
AWS_ACCESS_KEY_ID:
|
||||
from_secret: AWS_ACCESS_KEY_ID
|
||||
AWS_SECRET_ACCESS_KEY:
|
||||
from_secret: AWS_SECRET_ACCESS_KEY
|
||||
settings:
|
||||
rebuild: true
|
||||
path_style: true
|
||||
bucket: halig-cache
|
||||
endpoint: https://s3.fukurokuju.dev
|
||||
region: us-east-1
|
||||
mount:
|
||||
- .venv
|
||||
- .cache/.pre-commit
|
||||
when:
|
||||
status:
|
||||
- failure
|
||||
- success
|
||||
- name: deploy
|
||||
pull: true
|
||||
image: git.roboces.dev/catalin/poetry:beta
|
||||
commands:
|
||||
- poetry build
|
||||
- poetry config repositories.roboces https://git.roboces.dev/api/packages/catalin/pypi
|
||||
- poetry config http-basic.roboces "$REGISTRY_USERNAME" "$REGISTRY_PASSWORD"
|
||||
- poetry publish --repository roboces
|
||||
when:
|
||||
ref:
|
||||
- refs/tags/v*
|
||||
|
||||
- name: rebuild cache
|
||||
image: meltwater/drone-cache
|
||||
pull: true
|
||||
environment:
|
||||
AWS_ACCESS_KEY_ID:
|
||||
from_secret: AWS_ACCESS_KEY_ID
|
||||
AWS_SECRET_ACCESS_KEY:
|
||||
from_secret: AWS_SECRET_ACCESS_KEY
|
||||
settings:
|
||||
rebuild: true
|
||||
path_style: true
|
||||
bucket: halig-cache
|
||||
endpoint: https://s3.fukurokuju.dev
|
||||
region: us-east-1
|
||||
mount:
|
||||
- .venv
|
||||
- .cache/.pre-commit
|
||||
when:
|
||||
status:
|
||||
- failure
|
||||
- success
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue