-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
78 lines (76 loc) · 1.89 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
kind: pipeline
name: build_docker
trigger:
repo:
include:
- GeographicaGS/GeoLibs-glutemulo
steps:
- name: docker_tags_push
image: debian:stable-slim
when:
event:
include:
- push
commands:
- echo -n "${DRONE_COMMIT_SHA},${DRONE_COMMIT_BRANCH//\//__},ci-${DRONE_BUILD_NUMBER}" > .tags
- name: docker_tags
image: debian:stable-slim
when:
event:
exclude:
- push
commands:
- echo -n "${DRONE_COMMIT_SHA},ci-${DRONE_BUILD_NUMBER}" > .tags
- name: docker_build
image: plugins/gcr
resources:
limits: &resources
memory: "1024m"
requests: *resources
settings: &build_docker
repo: eu.gcr.io/habichuelas/cicd/geolibs/glutemulo
dockerfile: Dockerfile
registry: eu.gcr.io
json_key:
from_secret: google_credentials
build_args:
- ENVIRONMENT=test
cache_from:
- eu.gcr.io/habichuelas/cicd/geolibs/glutemulo:${DRONE_COMMIT_BRANCH//\//__}
- eu.gcr.io/habichuelas/cicd/geolibs/glutemulo:master
- name: poetry_build
image: eu.gcr.io/habichuelas/cicd/geolibs/glutemulo:ci-${DRONE_BUILD_NUMBER}
resources:
limits: &resources
memory: "1024m"
requests: *resources
commands:
- poetry build
---
kind: pipeline
name: deploy
trigger:
branch:
- master
event:
- push
repo:
- GeographicaGS/GeoLibs-glutemulo
status:
- success
depends_on:
- build_docker
steps:
- name: poetry_publish
image: eu.gcr.io/habichuelas/cicd/geolibs/glutemulo:ci-${DRONE_BUILD_NUMBER}
resources:
limits: &resources
memory: "1024m"
requests: *resources
environment:
PYPI_USER:
from_secret: pypi_credentials_user
PYPI_PSWD:
from_secret: pypi_credentials_pswd
commands:
- poetry publish -vvv --build --username $${PYPI_USER} --password $${PYPI_PSWD}