-
Notifications
You must be signed in to change notification settings - Fork 2
/
.drone.yml
56 lines (54 loc) · 1.55 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
---
kind: pipeline
name: default
clone:
steps:
- name: timestamp
image: joomlaprojects/docker-images:updater
environment:
ACCESS_TOKEN:
from_secret: ACCESS_TOKEN
KEY_TIMESTAMP:
from_secret: KEY_TIMESTAMP
GIT_USER_NAME: Joomla Drone
GIT_USER_EMAIL: [email protected]
GIT_BASE_BRANCH_NAME: main
GIT_TARGET_BRANCH_NAME: ${DRONE_BRANCH}
commands:
- mkdir -p /go/keys || true
- echo $$KEY_TIMESTAMP > /go/keys/timestamp.json
- cd /go
- /tuf/docker-entrypoint.sh update-timestamp
- name: upload
image: joomlaprojects/docker-images:packager
environment:
rclone_key:
from_secret: RCLONE_KEY
rclone_user:
from_secret: RCLONE_USER
rclone_host:
from_secret: RCLONE_HOST
rclone_root:
from_secret: RCLONE_ROOT
GITHUB_TOKEN:
from_secret: ACCESS_TOKEN
commands:
- mkdir -p ~/.ssh
- eval $(ssh-agent -s)
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
- echo "$rclone_key" > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- ssh-add
- rclone config create upload sftp host $rclone_host user $rclone_user port 22
- rclone copy ./repository/ upload:$rclone_root/cms
- /bin/add_github_status.sh "Repository deployed" "Tuf Repository timestamp Updated and deployed to update server." "https://update.joomla.org/cms"
trigger:
branch:
- main
event:
- cron
- custom
---
kind: signature
hmac: 9c72cc153897c82d4ace23eb057d3ca2e4ba660c843dfb13750c109e8851a5e4
...