Split deploy to new pipeline
Now deploy both to pypi and docker hub after all tests pass
This commit is contained in:
parent
5839db14b1
commit
3aad68e3f6
119
.drone.yml
119
.drone.yml
@ -10,17 +10,34 @@ steps:
|
|||||||
image: python:3
|
image: python:3
|
||||||
commands:
|
commands:
|
||||||
- make test-env test
|
- make test-env test
|
||||||
- name: push to pypi
|
|
||||||
image: python:3
|
- name: notify
|
||||||
commands:
|
image: drillster/drone-email
|
||||||
- make build-env upload
|
settings:
|
||||||
environment:
|
host:
|
||||||
TWINE_USERNAME:
|
from_secret: SMTP_HOST
|
||||||
from_secret: PYPI_USERNAME
|
username:
|
||||||
TWINE_PASSWORD:
|
from_secret: SMTP_USER
|
||||||
from_secret: PYPI_PASSWORD
|
password:
|
||||||
|
from_secret: SMTP_PASS
|
||||||
|
from: drone@iamthefij.com
|
||||||
when:
|
when:
|
||||||
event: [ tag ]
|
status: [ changed, failure ]
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: python-3.4
|
||||||
|
|
||||||
|
workspace:
|
||||||
|
base: /app
|
||||||
|
path: .
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: test
|
||||||
|
image: python:3.4
|
||||||
|
commands:
|
||||||
|
- make test-env test
|
||||||
|
|
||||||
- name: notify
|
- name: notify
|
||||||
image: drillster/drone-email
|
image: drillster/drone-email
|
||||||
settings:
|
settings:
|
||||||
@ -42,13 +59,25 @@ workspace:
|
|||||||
base: /app
|
base: /app
|
||||||
path: .
|
path: .
|
||||||
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: test
|
- name: test
|
||||||
image: python:3.6
|
image: python:3.6
|
||||||
commands:
|
commands:
|
||||||
- make test-env test
|
- make test-env test
|
||||||
|
|
||||||
|
- name: notify
|
||||||
|
image: drillster/drone-email
|
||||||
|
settings:
|
||||||
|
host:
|
||||||
|
from_secret: SMTP_HOST
|
||||||
|
username:
|
||||||
|
from_secret: SMTP_USER
|
||||||
|
password:
|
||||||
|
from_secret: SMTP_PASS
|
||||||
|
from: drone@iamthefij.com
|
||||||
|
when:
|
||||||
|
status: [ changed, failure ]
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: python-3.7
|
name: python-3.7
|
||||||
@ -57,9 +86,75 @@ workspace:
|
|||||||
base: /app
|
base: /app
|
||||||
path: .
|
path: .
|
||||||
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: test
|
- name: test
|
||||||
image: python:3.7
|
image: python:3.7
|
||||||
commands:
|
commands:
|
||||||
- make test-env test
|
- make test-env test
|
||||||
|
|
||||||
|
- name: notify
|
||||||
|
image: drillster/drone-email
|
||||||
|
settings:
|
||||||
|
host:
|
||||||
|
from_secret: SMTP_HOST
|
||||||
|
username:
|
||||||
|
from_secret: SMTP_USER
|
||||||
|
password:
|
||||||
|
from_secret: SMTP_PASS
|
||||||
|
from: drone@iamthefij.com
|
||||||
|
when:
|
||||||
|
status: [ changed, failure ]
|
||||||
|
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
name: deploy
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- python-latest
|
||||||
|
- python-3.6
|
||||||
|
- python-3.7
|
||||||
|
|
||||||
|
workspace:
|
||||||
|
base: /app
|
||||||
|
path: .
|
||||||
|
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: push to docker hub
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
repo: iamthefij/minitor
|
||||||
|
auto_tag: true
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
when:
|
||||||
|
branch:
|
||||||
|
- master
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- tag
|
||||||
|
|
||||||
|
- name: push to pypi
|
||||||
|
image: python:3
|
||||||
|
commands:
|
||||||
|
- make build-env upload
|
||||||
|
environment:
|
||||||
|
TWINE_USERNAME:
|
||||||
|
from_secret: PYPI_USERNAME
|
||||||
|
TWINE_PASSWORD:
|
||||||
|
from_secret: PYPI_PASSWORD
|
||||||
|
when:
|
||||||
|
event: [ tag ]
|
||||||
|
|
||||||
|
- name: notify
|
||||||
|
image: drillster/drone-email
|
||||||
|
settings:
|
||||||
|
host:
|
||||||
|
from_secret: SMTP_HOST
|
||||||
|
username:
|
||||||
|
from_secret: SMTP_USER
|
||||||
|
password:
|
||||||
|
from_secret: SMTP_PASS
|
||||||
|
from: drone@iamthefij.com
|
||||||
|
Loading…
Reference in New Issue
Block a user