Newer
Older
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
kind: pipeline
type: docker
name: deploy
clone:
disable: true
steps:
- name: pull
image: appleboy/drone-ssh
settings:
host: flash.princelle.org
username: mprincelle
port: 22
key:
from_secret: ci_key
script:
- cd /app/uni/erp/back
- git fetch --all
- git reset --hard origin/master
- git pull
- name: configure
image: appleboy/drone-ssh
settings:
host: flash.princelle.org
username: mprincelle
port: 22
key:
from_secret: ci_key
script:
- cd /app/uni/erp/back
- echo -e "\napi.key=theapikey" >> src/main/resources/application.properties
- echo -e "api.key=theapikey" > src/main/resources/apikey.properties
- echo -e "APP_PORT=2001" > .env
- name: build
image: appleboy/drone-ssh
settings:
host: flash.princelle.org
username: mprincelle
port: 22
key:
from_secret: ci_key
script:
- cd /app/uni/erp/back
- docker-compose up -d
- name: discord notification
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
username: "Drone Princelle (ERP - back)"
avatar_url: https://s3.princelle.org/share/drone-ci.png
message: >
{{#success build.status}}
Successfully deployed ERP (back) on Princelle Infrastructure! (https://back.erp.uni.princelle.org)
{{else}}
Error on deploying ERP (back) on Princelle Infrastructure.
{{/success}}
trigger:
branch:
- master