From 2c9ac6b1ce45b30ed65ab67af04ecc1d2adab51b Mon Sep 17 00:00:00 2001 From: Fedorov Vladimir Date: Mon, 14 Aug 2023 03:10:45 +0700 Subject: [PATCH] update drone pipeline --- README.md | 8 ++++++++ build/ci/.drone.yml | 18 +++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 751ba3e..6a8df05 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,14 @@ go run cmd/butler/main.go ### Сборка +Для arm + ```sh GOOS=linux GOARCH=arm go build -o butler cmd/butler/main.go ``` + +Для x64 + +```sh +GOOS=linux GOARCH=amd64 go build -o butler cmd/butler/main.go +``` diff --git a/build/ci/.drone.yml b/build/ci/.drone.yml index 389a205..350c7d7 100644 --- a/build/ci/.drone.yml +++ b/build/ci/.drone.yml @@ -3,16 +3,24 @@ type: docker name: default steps: + + - name: test + pull: if-not-exists + image: golang:1.20 + commands: + - go test ./... + - name: build pull: if-not-exists image: golang:1.20 commands: - - go build -o butler cmd/butler/main.go + - GOOS=linux GOARCH=amd64 go build -o butler cmd/butler/main.go - - name: test - image: golang - commands: - - go test ./... + # TODO: + # scp bin, Dockerfile, docker-compose + # create .env from secrets + # run migrations + # restart container trigger: event: