Skip to content

Commit c4a2df4

Browse files
authored
Add support for publishing package over atp (hestiacp#2399)
* Add support for publishing package over atp * Fix bug in path * Update signature * Upload via SCP * Update signature * Fix typo in freigth-add command * Clean up packages after been added
1 parent d6b6ca5 commit c4a2df4

File tree

1 file changed

+63
-3
lines changed

1 file changed

+63
-3
lines changed

.drone.yml

Lines changed: 63 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,13 @@ steps:
4040
- ./test/check_php.sh
4141

4242
trigger:
43-
event: [ push, pull_request ]
43+
event: [ pull_request, push ]
44+
ref:
45+
- refs/heads/staging/*
46+
- refs/heads/beta
47+
- refs/heads/release
48+
- refs/heads/main
49+
- refs/pull/*/head
4450

4551
---
4652
kind: pipeline
@@ -88,7 +94,13 @@ steps:
8894
- ./test/check_php.sh
8995

9096
trigger:
91-
event: [ push, pull_request ]
97+
event: [ pull_request, push ]
98+
ref:
99+
- refs/heads/staging/*
100+
- refs/heads/beta
101+
- refs/heads/release
102+
- refs/heads/main
103+
- refs/pull/*/head
92104

93105
---
94106
kind: pipeline
@@ -107,6 +119,54 @@ steps:
107119
trigger:
108120
event: [ pull_request, push ]
109121

122+
---
123+
kind: pipeline
124+
type: docker
125+
name: Push to beta atp server
126+
127+
platform:
128+
os: linux
129+
arch: amd64
130+
131+
steps:
132+
- name: Build
133+
image: debian:bullseye
134+
commands:
135+
- ln -snf /etc/localtime && echo CET > /etc/timezone
136+
- ./src/hst_autocompile.sh --dontinstalldeps --hestia --debug --cross --noinstall --keepbuild --debug '~localsrc'
137+
- mkdir -p ./hestia/
138+
- mv /tmp/hestiacp-src/deb/*.deb ./hestia/
139+
- name: Upload
140+
image: appleboy/drone-scp
141+
settings:
142+
host:
143+
from_secret: apt_server
144+
user: root
145+
key:
146+
from_secret: ssh_key
147+
port: 22
148+
command_timeout: 2m
149+
target: /root/
150+
source:
151+
- ./hestia/*
152+
- name: Publish
153+
image: appleboy/drone-ssh
154+
settings:
155+
host:
156+
from_secret: apt_server
157+
user: root
158+
key:
159+
from_secret: ssh_key
160+
port: 22
161+
command_timeout: 2m
162+
script:
163+
- freight-add ./hestia/*.deb apt/bionic apt/focal apt/strech apt/buster apt/bullseye
164+
- freight-cache
165+
- rm -fr ./hestia/
166+
167+
trigger:
168+
event: [ promote]
169+
110170
---
111171
kind: signature
112-
hmac: e6d1a0d62ad4f5b0b8bed33c248e55e6de60ee9c1601ee5395fe5d5e72942e85
172+
hmac: 31806a1e5357c43d17d24ef797995fb9952a1d883ad282fd152d7d0378112213

0 commit comments

Comments
 (0)