-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.drone.yml
75 lines (68 loc) · 1.62 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
---
# SPDX-FileCopyrightText: Free Software Foundation Europe e.V.
#
# SPDX-License-Identifier: GPL-3.0-or-later
kind: pipeline
name: default
steps:
# Check for REUSE compliance
- name: reuse
image: fsfe/reuse:latest
commands:
- reuse lint
- name: quality-image
image: docker:20
environment:
# Docker configuration
XDG_RUNTIME_DIR: "/run/user/1001"
DOCKER_HOST: "unix:///run/user/1001/docker.sock"
volumes:
- name: dockersock
path: /run/user/1001/docker.sock
commands:
- docker compose -p reuse-api --file docker-compose.quality.yml build
# Run pytest
- name: quality
image: reuse-api-quality
pull: never
commands:
- isort --check --diff reuse_api tests/* *.py
- black --check --diff reuse_api tests/* *.py
- pylama reuse_api tests/* *.py
- pytest tests
depends_on:
- quality-image
# Build and deploy Docker
- name: deploy
image: docker:20
commands:
- docker compose -p reuse-api up --build -d
environment:
XDG_RUNTIME_DIR: "/run/user/1001"
DOCKER_HOST: "unix:///run/user/1001/docker.sock"
SECRET_KEY:
from_secret: secret_key
ADMIN_KEY:
from_secret: admin_key
volumes:
- name: dockersock
path: /run/user/1001/docker.sock
depends_on:
- quality
when:
branch:
- master
event:
- push
- tag
- deployment
node:
cont2: noris
volumes:
- name: dockersock
host:
path: /run/user/1001/docker.sock
---
kind: signature
hmac: 903d7edadd247e9498e60016a5d8b79361967fceca9980bc66bd26884cea96b5
...