2023-08-13 17:34:58 +00:00
|
|
|
kind: pipeline
|
|
|
|
type: docker
|
|
|
|
name: default
|
|
|
|
|
|
|
|
steps:
|
2023-08-13 20:10:45 +00:00
|
|
|
|
|
|
|
- name: test
|
2023-08-13 17:45:31 +00:00
|
|
|
pull: if-not-exists
|
2023-08-13 17:39:55 +00:00
|
|
|
image: golang:1.20
|
2023-08-13 17:34:58 +00:00
|
|
|
commands:
|
2023-08-13 20:10:45 +00:00
|
|
|
- go test ./...
|
2023-08-13 17:34:58 +00:00
|
|
|
|
2023-08-13 20:10:45 +00:00
|
|
|
- name: build
|
|
|
|
pull: if-not-exists
|
|
|
|
image: golang:1.20
|
2023-08-13 17:34:58 +00:00
|
|
|
commands:
|
2023-08-13 20:10:45 +00:00
|
|
|
- GOOS=linux GOARCH=amd64 go build -o butler cmd/butler/main.go
|
|
|
|
|
|
|
|
# TODO:
|
|
|
|
# scp bin, Dockerfile, docker-compose
|
|
|
|
# create .env from secrets
|
|
|
|
# run migrations
|
|
|
|
# restart container
|
2023-08-13 17:34:58 +00:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
event:
|
|
|
|
- push
|