63 lines
1.3 KiB
YAML
63 lines
1.3 KiB
YAML
---
|
|
kind: pipeline
|
|
type: docker
|
|
name: deploy
|
|
|
|
platform:
|
|
os: linux
|
|
arch: amd64
|
|
|
|
trigger:
|
|
branch:
|
|
- development
|
|
event: [push]
|
|
|
|
steps:
|
|
- name: deploy
|
|
depends_on: [clone]
|
|
image: docker.io/appleboy/drone-ssh:1.6.4
|
|
settings:
|
|
host:
|
|
from_secret: host
|
|
username:
|
|
from_secret: username
|
|
key:
|
|
from_secret: ssh-key
|
|
port: 22
|
|
command_timeout: 13m
|
|
fingerprint:
|
|
from_secret: fingerprint
|
|
use_insecure_cipher: false
|
|
script:
|
|
# giteaupdater updates to latest available
|
|
# commit unless $1 specifies otherwise.
|
|
- /usr/local/bin/giteaupdater a78e0b7dad
|
|
|
|
# simply demonstrate we're able to run ansible.
|
|
- name: ansible - sayhi
|
|
image: plugins/ansible:3.0.0
|
|
environment:
|
|
ANSIBLE_CONFIG: ansible/ansible.cfg
|
|
DEFAULT_REMOTE_USER:
|
|
from_secret: username
|
|
settings:
|
|
playbook: ansible/playbooks/playbook.yml
|
|
inventory: ansible/inventory
|
|
extra_vars:
|
|
'additional_var=footestpls,another_var=bartest'
|
|
ssh_extra_args: "'-o StrictHostKeyChecking=no'"
|
|
private_key:
|
|
from_secret: ssh-key
|
|
verbose: 2
|
|
user:
|
|
from_secret: username
|
|
when:
|
|
event:
|
|
- push
|
|
|
|
---
|
|
kind: signature
|
|
hmac: 48b99368e1e852231cd99dbf7708e5d5aae1cfee8a173708bf9198e85400b84a
|
|
|
|
...
|