ci config

This commit is contained in:
Laurent Le Houerou 2020-10-26 13:42:07 +04:00
parent 7903239e4f
commit c6a7618651
2 changed files with 30 additions and 0 deletions

18
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,18 @@
image: golang:1.15
cache:
paths:
- /apt-cache
- /go/src/github.com
- /go/src/golang.org
- /go/src/google.golang.org
- /go/src/gopkg.in
- /go/src/gitlab.lehouerou.net
stages:
- build
build:
stage: build
script:
- make

12
Makefile Normal file
View File

@ -0,0 +1,12 @@
PROJECT_NAME := "dnsupdater"
PKG := "gitlab.lehouerou.net/laurent/$(PROJECT_NAME)"
PKG_LIST := $(shell go list ${PKG}/... | grep -v /vendor/)
GO_FILES := $(shell find . -name '*.go' | grep -v /vendor/ | grep -v _test.go)
all: build
dep: ## Get the dependencies
@go get -v -d ./...
build: dep ## Build the binary file
@go build -i -v $(PKG)