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 :
2020-03-10 03:49:49 +01:00
- name : ssh-deploy
2020-03-10 01:24:45 +01:00
pull : if-not-exists
2020-03-10 03:49:49 +01:00
image : appleboy/drone-ssh:latest
settings :
host :
from_secret : hugo_host
username :
from_secret : hugo_user
2020-03-10 03:52:44 +01:00
password :
from_secret : hugo_passwd
2020-03-10 03:49:49 +01:00
script_stop : true
script :
- echo deploy from drone started
- cd ~/dtya
2020-03-10 04:00:26 +01:00
- eval $(ssh-agent)
2020-03-10 03:56:53 +01:00
- ssh-add ~/.ssh/overlord
2020-03-10 03:49:49 +01:00
- git pull
- ./deploy
2020-03-08 05:11:26 +01:00
when :
status :
- success
2020-03-10 01:24:45 +01:00
depends_on :
- test-build
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 :
2020-03-10 03:49:49 +01:00
message : "{{#success build.status}} ✅ Build #{{build.number}} of `{{repo.name}}` succeeded.\n\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n{{ build.link }}\n\n{{else}} ❌ Build #{{build.number}} of `{{repo.name}}` failed.\n\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n{{ build.link }}\n\n{{/success}}\n"
2020-03-02 20:25:56 +01:00
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 :
2020-03-10 02:34:42 +01:00
message : "{{#success build.status}} ✅ Build #{{build.number}} of `{{repo.name}}` succeeded.\n\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n{{ build.link }}\n\n {{else}} ❌ Build #{{build.number}} of `{{repo.name}}` failed.\n\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n{{ build.link }}\n\n {{/success}}\n"
2020-03-02 23:14:56 +01:00
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 :
2020-03-10 02:00:30 +01:00
message : "{{#success build.status}} ✅ Build #{{build.number}} of `{{repo.name}}` has been successfully deployed.\n\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n\n{{ build.link }}\n {{else}} ❌ Build #{{build.number}} of `{{repo.name}}` failed to deploy.\n\ncommit `${DRONE_COMMIT_SHA:0:7}` by {{commit.author}} on `{{commit.branch}}`:\n``` {{commit.message}} ```\n{{ build.link }}\n {{/success}}\n\n"
2020-03-08 05:11:26 +01:00
webhook_id :
from_secret : discord_webhook_id
webhook_token :
from_secret : discord_webhook_token