-
Notifications
You must be signed in to change notification settings - Fork 0
/
.drone.yml
65 lines (58 loc) · 1.45 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
kind: pipeline
type: docker
name: default
steps:
- name: build
image: banzaicloud/drone-kaniko
settings:
dockerfile: Dockerfile
repo: xnv/aurum
tags:
- latest
- ${DRONE_COMMIT_SHA:0:8}
registry: k2so.xnv.io
username:
from_secret: docker_username
password:
from_secret: docker_password
# - name: unit_test
# image: k2so.xnv.io/xnv/aurum:${DRONE_COMMIT_SHA:0:8}
# commands:
# - "python -m unittest discover -v -f tests"
- name: deploy_pypi
image: k2so.xnv.io/xnv/aurum:${DRONE_COMMIT_SHA:0:8}
settings:
pypirc:
from_secret: pypirc
environment:
PYPIRC:
from_secret: pypirc
commands:
- "echo $PYPIRC | base64 -d > /root/.pypirc"
- "pip install twine"
- "twine upload --repository pypi /usr/src/app/dist/* "
- name: slack
image: plugins/slack
when:
status:
- failure
- success
settings:
webhook:
from_secret: slack_webhook
channel: amalgam
template: >
{{#success build.status}}
Aurum: #build {{build.number}} succeeded. Good job.
Commit: `${DRONE_COMMIT_SHA:0:8}`
${DRONE_BUILD_LINK}
{{else}}
Aurum: build #{{build.number}} failed. Fix me please.
Commit: `${DRONE_COMMIT_SHA:0:8}`
${DRONE_BUILD_LINK}
{{/success}}
trigger:
branch:
- master
image_pull_secrets:
- dockerconfigjson