remove drone

This commit is contained in:
Jeffrey C. Ollie 2022-04-17 20:57:26 -05:00
parent 5ae8daae5e
commit 66f8396632
Signed by: jeff
GPG Key ID: 6F86035A6D97044E

View File

@ -1,64 +0,0 @@
---
kind: secret
name: drone_ssh_private_key
get:
path: drone-ssh-key
name: ssh-private-key
---
kind: pipeline
type: kubernetes
name: build
steps:
# - name: test
# image: golang
# commands:
# - go test -v ./...
# - name: describe
# image: jcollie/git
# commands:
# - git describe --dirty
- name: build 32 bit arm
image: golang
environment:
GOOS: linux
GOARCH: arm
commands:
- go build -o ble-sensors-${DRONE_BUILD_STARTED} -v .
- name: copy to hosts
image: appleboy/drone-scp
environment:
GOOS: linux
GOARCH: arm
settings:
host:
- "192.168.4.147"
- "192.168.4.79"
username: root
key:
from_secret: drone_ssh_private_key
target:
- /opt/ble-sensors
source:
- ble-sensors-${DRONE_BUILD_STARTED}
- ble-sensors.service
- name: deploy
image: appleboy/drone-ssh
settings:
host:
- "192.168.4.147"
- "192.168.4.79"
username: root
key:
from_secret: drone_ssh_private_key
script:
- rm -f /opt/ble-sensors/ble-sensors
- mv /opt/ble-sensors/ble-sensors-${DRONE_BUILD_STARTED} /opt/ble-sensors/ble-sensors
- cp /opt/ble-sensors/ble-sensors.service /etc/systemd/system
- systemctl daemon-reload
- systemctl enable ble-sensors.service
- systemctl restart ble-sensors.service