-
-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy path.drone.yml
More file actions
112 lines (101 loc) · 2.52 KB
/
Copy path.drone.yml
File metadata and controls
112 lines (101 loc) · 2.52 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
kind: pipeline
type: docker
name: translations and contributors
steps:
- name: install dependencies
image: node
commands:
- npm install
- name: import translations
image: node
commands:
- cd ci/
- node import_translations.js
environment:
POEDITOR_API_TOKEN:
from_secret: POEDITOR_API_TOKEN
depends_on:
- install dependencies
- name: convert to fastlane files
image: node
commands:
- cd fastlane/
- node metadata/android/poeditor2fastlane.js
depends_on:
- import translations
- name: create contributors.md
image: node
commands:
- mv CONTRIBUTORS.md CONTRIBUTORS.old.md
- node pull_contributors.js
environment:
POEDITOR_API_TOKEN:
from_secret: POEDITOR_API_TOKEN
depends_on:
- convert to fastlane files
- name: git cleanup
image: bitnami/git
commands:
- git status
# Do not push package-lock.json
- git restore package-lock.json
# For some unknown reason, if two contributors have the same name, they appear twice in the file
# but with different amount of whitespaces. And for some other weird reason, the two names
# switch position in the list on each build.
# If the changes on the file CONTRIBUTORS.md are just whitespaces, we discard them again:
- bash ci/git-cleanup.sh
- rm CONTRIBUTORS.old.md
- git status
depends_on:
- create contributors.md
- name: push
image: jonasbernard/drone-git-push
# We have to bypass the push, if we run this by promoting it on an older commit as we could get merge conflicts
# in the build environment and this is not something that we want.
when:
event:
exclude:
- promote
settings:
branch: master
remote: git@github.com:JonasBernard/FakeStandby.git
ssh_key:
from_secret: GH_SSH_KEY
force: false
commit: true
commit_message: "Auto-imported translations from PoEditor and updated CONTRIBUTING.MD"
author_name: Drone Pipeline
depends_on:
- git cleanup
- name: send status mail
image: jonasbernard/drone-email
when:
event:
- cron
- promote
status:
- success
- failure
settings:
from.address:
from_secret: ORG_MAIL_FROM_ADDRESS
from.name:
from_secret: ORG_MAIL_FROM_NAME
host:
from_secret: ORG_MAIL_SMTP_SERVER
recipients_only: true
recipients:
from_secret: ORG_MAIL_RECIPIENTS
username:
from_secret: ORG_MAIL_SMTP_USERNAME
password:
from_secret: ORG_MAIL_SMTP_PASSWORD
depends_on:
- push
- git cleanup
trigger:
event:
include:
- promote
- custom
- cron