Make go module
git-svn-id: file:///srv/svn/repo/toyohime/trunk@102 922d331f-388e-da47-97a9-ad700dc0b8b9
This commit is contained in:
parent
e21d7a0896
commit
721ef666e8
30
.drone.yml
30
.drone.yml
@ -1,15 +1,27 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: amd64
|
||||||
|
|
||||||
workspace:
|
workspace:
|
||||||
base: /go
|
base: /go
|
||||||
path: src/go.jonnrb.io/vanity
|
path: src/go.jonnrb.io/vanity
|
||||||
|
|
||||||
pipeline:
|
steps:
|
||||||
build:
|
- name: build
|
||||||
image: golang:latest
|
image: golang:latest
|
||||||
commands:
|
commands:
|
||||||
- go test ./...
|
- go test ./...
|
||||||
- go build ./...
|
- go build ./...
|
||||||
docker:
|
|
||||||
image: plugins/docker
|
- name: docker
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
repo: jonnrb/vanityserver
|
repo: jonnrb/vanityserver
|
||||||
|
secrets:
|
||||||
|
- docker_username
|
||||||
|
- docker_password
|
||||||
storage_driver: overlay2
|
storage_driver: overlay2
|
||||||
secrets: [ docker_username, docker_password ]
|
|
||||||
|
...
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
from golang:1.10.3 as build
|
from golang:1.11.2 as build
|
||||||
add . /go/src/go.jonnrb.io/vanity
|
add . /src
|
||||||
workdir /go/src/go.jonnrb.io/vanity
|
run cd /src && go get -v ./cmd/vanityserver
|
||||||
run go install ./cmd/vanityserver
|
|
||||||
|
|
||||||
from gcr.io/distroless/base
|
from gcr.io/distroless/base
|
||||||
expose 8080
|
expose 8080
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-s -w" .
|
|
||||||
upx vanityserver
|
|
||||||
docker build -t jonnrb/vanity .
|
|
||||||
rm vanityserver
|
|
Loading…
x
Reference in New Issue
Block a user