2020-03-02 20:30:25 +01:00
---
2020-02-28 00:54:16 +01:00
kind : pipeline
type : docker
2020-03-08 05:11:26 +01:00
name : test-build
2020-02-28 00:54:16 +01:00
steps :
- name : hugo-extended
2020-03-03 22:33:04 +01:00
pull : always
2020-03-05 00:15:10 +01:00
image : immawanderer/archlinux-hugo:latest
2020-02-28 00:54:16 +01:00
commands :
- git submodule init
- git submodule update
2020-03-02 01:03:14 +01:00
- hugo version
2020-03-08 05:11:26 +01:00
- hugo --gc=true --minify
2020-03-02 20:25:56 +01:00
2020-03-08 05:11:26 +01:00
---
kind : pipeline
type : docker
name : deploy
steps :
- name : hugo-rsync-deploy
pull : always
image : immawanderer/archlinux-hugo:latest
2020-03-08 05:44:34 +01:00
environment :
hugo_key :
from_secret : hugo_key
hugo_user :
from_secret : hugo_user
hugo_host :
from_secret : hugo_host
hugo_dir :
from_secret : hugo_dir
2020-03-08 05:11:26 +01:00
commands :
- git submodule init
- git submodule update
- rm -rfv ./public
- hugo --gc=true --minify
2020-03-08 06:10:34 +01:00
- echo "$hugo_key" > hugo_deploy
2020-03-08 05:55:24 +01:00
- chmod -v 600 hugo_deploy #hellyeah
2020-03-08 06:14:16 +01:00
- rsync -ave 'ssh -i ./hugo_deploy -o PreferredAuthentications=publickey -o PasswordAuthentication=no -c aes256-ctr,aes256-cbc -o StrictHostKeyChecking=no' --delete public/ $hugo_user@$hugo_host:$hugo_dir
2020-03-08 05:11:26 +01:00
- shred -zuv 7 hugo_deploy || true
when :
status :
- success
2020-03-02 20:25:56 +01:00
---
kind : pipeline
name : notifications
platform :
os : linux
arch : amd64
clone :
disable : true
trigger :
branch :
- master
2020-03-07 05:59:20 +01:00
- "dev*"
2020-03-02 20:25:56 +01:00
- "release/*"
event :
- push
- tag
status :
- success
- failure
depends_on :
2020-03-08 05:11:26 +01:00
- test-build
2020-03-02 20:25:56 +01:00
steps :
- name : discord
pull : always
image : appleboy/drone-discord:1.2.4
settings :
message : "{{#success build.status}} ā
Build #{{build.number}} of `{{repo.name}}` succeeded.\n\nš Commit by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\nš {{ build.link }} {{else}} ā Build #{{build.number}} of `{{repo.name}}` failed.\n\nš Commit by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\nš {{ build.link }} {{/success}}\n"
webhook_id :
from_secret : discord_webhook_id
webhook_token :
from_secret : discord_webhook_token
2020-03-02 23:14:56 +01:00
---
kind : pipeline
name : notifications-cronbuild
platform :
os : linux
arch : amd64
clone :
disable : true
trigger :
event :
- cron
cron :
- hourly
- hourly-build
status :
- success
- failure
depends_on :
2020-03-08 05:11:26 +01:00
- test-build
2020-03-02 23:14:56 +01:00
steps :
- name : discord
pull : always
image : appleboy/drone-discord:1.2.4
settings :
message : "{{#success build.status}} ā
Build #{{build.number}} of `{{repo.name}}` succeeded.\n\nš Commit by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\nš {{ build.link }} {{else}} ā Build #{{build.number}} of `{{repo.name}}` failed.\n\nš Commit by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\nš {{ build.link }} {{/success}}\n"
webhook_id :
from_secret : discord_webhook_hourly_id
webhook_token :
from_secret : discord_webhook_hourly_token
2020-03-08 05:11:26 +01:00
---
kind : pipeline
name : notifications-deploy
platform :
os : linux
arch : amd64
clone :
disable : true
trigger :
status :
- success
- failure
depends_on :
- deploy
steps :
- name : discord
pull : always
image : appleboy/drone-discord:1.2.4
settings :
message : "{{#success build.status}} ā
Build #{{build.number}} of `{{repo.name}}` has been successfully deployed.\n\nš Commit by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\nš {{ build.link }} {{else}} ā Build #{{build.number}} of `{{repo.name}}` failed to deploy.\n\nš Commit by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\nš {{ build.link }} {{/success}}\n\n"
webhook_id :
from_secret : discord_webhook_id
webhook_token :
from_secret : discord_webhook_token