51 lines
1.3 KiB
YAML
51 lines
1.3 KiB
YAML
---
|
|
kind: pipeline
|
|
|
|
name: default
|
|
|
|
steps:
|
|
- name: Build Gitea docker image
|
|
image: docker:stable
|
|
volumes:
|
|
- name: docker_sock
|
|
path: /var/run/docker.sock
|
|
commands:
|
|
- docker build --no-cache -t autonomic/gitea:drone .
|
|
|
|
- name: Deploy Gitea with Dokku
|
|
image: appleboy/drone-git-push:0.2.0-linux-amd64
|
|
settings:
|
|
remote: ssh://dokku@dokku.autonomic.zone:222/gitea
|
|
ssh_key:
|
|
from_secret: drone_deploy_key
|
|
when:
|
|
branch: master
|
|
|
|
- name: Send notification to chat.internal.autonomic.zone
|
|
image: rmilewski/drone-rocket:latest
|
|
when:
|
|
status: [success, failure]
|
|
settings:
|
|
webhook:
|
|
from_secret: rocket_chat_webhook
|
|
channel: notifications
|
|
username: drone-notifications-bot
|
|
color:
|
|
- value: green
|
|
when:
|
|
DRONE_BUILD_STATUS: success
|
|
- value: red
|
|
when:
|
|
DRONE_BUILD_STATUS: failure
|
|
message:
|
|
- value: "git.autonomic.zone build: ${DRONE_BUILD_NUMBER} succeeded. Well done :partying_face:"
|
|
when:
|
|
DRONE_BUILD_STATUS: success
|
|
- value: "git.autonomic.zone build: ${DRONE_BUILD_NUMBER} failed. No stress :relaxed:"
|
|
text: ${DRONE_COMMIT_MESSAGE}
|
|
fields:
|
|
- title: Author
|
|
value: ${DRONE_COMMIT_AUTHOR}
|
|
when:
|
|
branch: master
|