2021-08-04 03:33:31 +02:00
|
|
|
---
|
|
|
|
kind: pipeline
|
2021-08-05 23:29:57 +02:00
|
|
|
type: docker
|
2021-08-04 03:33:31 +02:00
|
|
|
name: deploy
|
|
|
|
|
|
|
|
platform:
|
|
|
|
os: linux
|
|
|
|
arch: amd64
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- development
|
2021-08-04 04:10:52 +02:00
|
|
|
event: [push]
|
2021-08-04 03:33:31 +02:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: deploy
|
2021-08-05 23:29:57 +02:00
|
|
|
depends_on: [clone]
|
2022-10-11 17:09:03 +02:00
|
|
|
image: docker.io/appleboy/drone-ssh:1.6.4
|
2021-08-05 23:29:57 +02:00
|
|
|
settings:
|
|
|
|
host:
|
|
|
|
from_secret: host
|
|
|
|
username:
|
|
|
|
from_secret: username
|
|
|
|
key:
|
|
|
|
from_secret: ssh-key
|
|
|
|
port: 22
|
2022-10-11 14:04:13 +02:00
|
|
|
command_timeout: 13m
|
2022-10-11 17:27:05 +02:00
|
|
|
fingerprint:
|
|
|
|
from_secret: fingerprint
|
2022-10-11 17:19:24 +02:00
|
|
|
use_insecure_cipher: false
|
2021-08-05 23:29:57 +02:00
|
|
|
script:
|
2022-10-11 14:06:38 +02:00
|
|
|
# giteaupdater updates to latest available
|
|
|
|
# commit unless $1 specifies otherwise.
|
2022-12-14 13:20:37 +01:00
|
|
|
- /usr/local/bin/giteaupdater 1b32ed014a
|
2021-08-09 23:16:51 +02:00
|
|
|
|
2022-10-11 14:02:34 +02:00
|
|
|
# simply demonstrate we're able to run ansible.
|
2021-08-09 23:16:51 +02:00
|
|
|
- name: ansible - sayhi
|
|
|
|
image: plugins/ansible:3.0.0
|
|
|
|
environment:
|
2022-03-22 13:24:39 +01:00
|
|
|
ANSIBLE_CONFIG: ansible/ansible.cfg
|
2021-08-09 23:16:51 +02:00
|
|
|
DEFAULT_REMOTE_USER:
|
|
|
|
from_secret: username
|
|
|
|
settings:
|
2022-03-22 13:24:39 +01:00
|
|
|
playbook: ansible/playbooks/playbook.yml
|
|
|
|
inventory: ansible/inventory
|
2021-08-09 23:16:51 +02:00
|
|
|
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
|
2022-10-11 17:36:38 +02:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: signature
|
2022-12-14 13:20:37 +01:00
|
|
|
hmac: 144ad18b826816cec5af05c3cd2b0885ab2fea4b6abdfda89353d230bbe904c9
|
2022-10-11 17:36:38 +02:00
|
|
|
|
|
|
|
...
|