feat: docker image for master.

This commit is contained in:
Bo-Yi Wu 2017-12-29 08:34:47 +08:00
Родитель 56dc22a40d
Коммит 0893e292aa
2 изменённых файлов: 13 добавлений и 2 удалений

Просмотреть файл

@ -76,6 +76,16 @@ pipeline:
when:
event: [ push, tag ]
docker:
image: plugins/docker:17.05
pull: true
secrets: [ docker_username, docker_password ]
group: release
repo: gitea/lgtm
when:
event: [ push ]
branch: [ master ]
release:
image: plugins/s3:1
pull: true

Просмотреть файл

@ -5,6 +5,7 @@ EXECUTABLE := lgtm
IMPORT := github.com/go-gitea/lgtm
SHA := $(shell git rev-parse --short HEAD)
SOURCES ?= $(shell find . -name "*.go" -type f)
LDFLAGS += -X "github.com/go-gitea/lgtm/version.VersionDev=$(SHA)"
@ -79,13 +80,13 @@ test-pgsql:
DATABASE_DRIVER="postgres" DATABASE_DATASOURCE="postgres://postgres@pgsql:5432/postgres?sslmode=disable" go test -v -cover $(IMPORT)/store/datastore
.PHONY: install
install: $(wildcard *.go)
install: $(SOURCES)
go install -v -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)'
.PHONY: build
build: $(BIN)/$(EXECUTABLE)
$(BIN)/$(EXECUTABLE): $(wildcard *.go)
$(BIN)/$(EXECUTABLE): $(SOURCES)
go build -v -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
release: release-dirs release-build release-copy release-check