ev/.drone.yml

46 lines
722 B
YAML
Raw Normal View History

2023-05-29 09:32:25 -06:00
kind: pipeline
type: docker
2023-05-29 10:16:58 -06:00
name: build
2023-05-29 09:32:25 -06:00
steps:
- name: test
image: golang:1.20
commands:
2023-05-29 10:10:38 -06:00
- go test -v -race -skip '^TestE2E' ./...
2023-05-29 10:16:58 -06:00
- name: build
image: golang:1.20
environment:
GOOS: linux
GOARCH: amd64
commands:
- go build -ldflags "-s -w" -o build/ev ./cmd/ev
2023-05-29 10:20:33 -06:00
- name: compress
image: gruebel/upx:latest
commands:
- upx --best --lzma -o ev build/ev
2023-05-29 10:16:58 -06:00
---
kind: pipeline
type: docker
name: default
2023-05-29 10:17:53 -06:00
steps:
2023-05-29 10:10:38 -06:00
- name: deploy
image: plugins/ansible:3
settings:
playbook: .ansible/playbook.yml
inventory: .ansible/inventory
become: true
become_method: sudo
user: deploy
private_key:
2023-05-29 10:16:58 -06:00
from_secret: drone_ssh
trigger:
event:
- promote
target:
- lavana