You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.4 KiB
YAML
59 lines
1.4 KiB
YAML
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: docker-build
|
|
|
|
steps:
|
|
- name: build
|
|
image: docker.shnee.net/shnee/dind:19.03
|
|
pull: always
|
|
volumes:
|
|
- name: dockersock
|
|
path: /var/run
|
|
environment:
|
|
SSH_KEY:
|
|
from_secret: ssh-key
|
|
commands:
|
|
- sleep 5 # give docker enough time to start
|
|
- mkdir ~/.ssh
|
|
- echo "Host git.shnee.net\n Port 222" >> ~/.ssh/config
|
|
- eval $(ssh-agent -s)
|
|
- echo "$SSH_KEY" | ssh-add -
|
|
- ssh-keyscan -H git@git.shnee.net > ~/.ssh/known_hosts
|
|
- make
|
|
- make push-all
|
|
|
|
- name: gotify
|
|
image: fredix/drone-gotify
|
|
settings:
|
|
gotifytoken:
|
|
from_secret: gotify-token
|
|
gotifyendpoint: http://push.shnee.net
|
|
gotifytitle: "{{repo.name}} - Pipeline Build {{build.number}}"
|
|
gotifypriority: 5
|
|
message: >
|
|
{{#success build.status}}
|
|
build {{build.number}} succeeded on {{repo.name}}. Good job
|
|
{{build.author}} {{build.link}}
|
|
{{else}}
|
|
build {{build.number}} failed on {{repo.name}}. Fix me please
|
|
{{build.author}} {{build.link}}
|
|
{{/success}}
|
|
when:
|
|
status: [success, failure]
|
|
|
|
services:
|
|
- name: docker
|
|
image: docker.shnee.net/shnee/dind:19.03
|
|
privileged: true
|
|
volumes:
|
|
- name: dockersock
|
|
path: /var/run
|
|
|
|
volumes:
|
|
- name: dockersock
|
|
temp: {}
|
|
|
|
image_pull_secrets:
|
|
- dockerconfig
|