-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy path.drone.yml
78 lines (63 loc) · 1.35 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
type: kubernetes
name: default
concurrency:
limit: 1
node_selector:
drone/blackufa: true
volumes:
- name: cache
host:
path: /data/drone/workspaces/blackufa
clone:
disable: true
trigger:
branch:
- master
steps:
- name: chown-cache
image: alpine
pull: if-not-exists
volumes:
- name: cache
path: /drone/cached
commands:
- chown 1000:1000 /drone/cached
- name: build
image: thedrhax/buildenv-blackufa
volumes:
- name: cache
path: /drone/cached
environment:
SSH_KEY:
from_secret: ssh_key
PYTHONUNBUFFERED: 1
commands:
- |
mkdir ~/.ssh
echo "$SSH_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
- cd /drone/cached
- |
if [ ! -d .git ]; then
git clone $DRONE_GIT_SSH_URL .
git config --local user.email "[email protected]"
git config --local user.name "Drone"
else
git fetch
fi
git checkout $DRONE_COMMIT
- ./bsu venv update
- ./bsu repo pull --force
- ./bsu generate --download-chats
- ./bsu webpack
# - ./bsu npm test
- './bsu pages commit "Drone: Обновление статичных файлов"'
- ./bsu pages push
- |
getent hosts blackufa.blackufa.svc.cluster.local \
| cut -d\ -f 1 \
| xargs -I '{}' curl -v http://{}:8000/reload \
|| true
- ./bsu repo prune --optional
- git gc --prune=now