-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
83 lines (75 loc) · 1.94 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
79
80
81
82
83
# =============================================================================
# Continuous Delivery instructions
# =============================================================================
# This file is part of the FSFE Form Server.
#
# SPDX-FileCopyrightText: 2020 FSFE e.V. <[email protected]>
#
# SPDX-License-Identifier: GPL-3.0-or-later
kind: pipeline
name: default
steps:
- name: reuse
pull: if-not-exists
image: fsfe/reuse:latest
commands:
- reuse lint
- name: quality-image
image: docker:24.0.7
environment:
XDG_RUNTIME_DIR: "/run/user/1001"
DOCKER_HOST: "unix:///run/user/1001/docker.sock"
commands:
- docker compose -p forms -f docker-compose-quality.yml build
volumes:
- name: dockersock
path: /run/user/1001/docker.sock
- name: quality
pull: never
image: fsfe-forms-quality
commands:
- isort --check --diff fsfe_forms tests/* *.py
- pylama
- pytest --cov=fsfe_forms tests
depends_on:
- quality-image
- name: push-to-docs
image: git.fsfe.org/fsfe-system-hackers/docs-centralizer:latest
environment:
REPO_NAME: forms
SSH_PRIVATE_KEY:
# This is an organisation secret, so you don't need to set it
from_secret: docs_bot_private_key
when:
branch:
- master
event:
- push
- name: deploy
pull: if-not-exists
image: docker:24
commands:
- docker compose -p forms up --build -d
environment:
XDG_RUNTIME_DIR: "/run/user/1001"
DOCKER_HOST: "unix:///run/user/1001/docker.sock"
FSFE_CD_PASSPHRASE:
from_secret: fsfe_cd_passphrase
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