Make go module
git-svn-id: https://svn.yakumo.dev/yakumo.izuru/toyohime/trunk@102 922d331f-388e-da47-97a9-ad700dc0b8b9
This commit is contained in:
parent
aae3c62ea3
commit
0a2bb13612
30
.drone.yml
30
.drone.yml
@ -1,15 +1,27 @@
|
||||
---
|
||||
|
||||
platform:
|
||||
os: linux
|
||||
arch: amd64
|
||||
|
||||
workspace:
|
||||
base: /go
|
||||
path: src/go.jonnrb.io/vanity
|
||||
|
||||
pipeline:
|
||||
build:
|
||||
image: golang:latest
|
||||
commands:
|
||||
- go test ./...
|
||||
- go build ./...
|
||||
docker:
|
||||
image: plugins/docker
|
||||
steps:
|
||||
- name: build
|
||||
image: golang:latest
|
||||
commands:
|
||||
- go test ./...
|
||||
- go build ./...
|
||||
|
||||
- name: docker
|
||||
image: plugins/docker
|
||||
settings:
|
||||
repo: jonnrb/vanityserver
|
||||
secrets:
|
||||
- docker_username
|
||||
- docker_password
|
||||
storage_driver: overlay2
|
||||
secrets: [ docker_username, docker_password ]
|
||||
|
||||
...
|
||||
|
@ -1,7 +1,6 @@
|
||||
from golang:1.10.3 as build
|
||||
add . /go/src/go.jonnrb.io/vanity
|
||||
workdir /go/src/go.jonnrb.io/vanity
|
||||
run go install ./cmd/vanityserver
|
||||
from golang:1.11.2 as build
|
||||
add . /src
|
||||
run cd /src && go get -v ./cmd/vanityserver
|
||||
|
||||
from gcr.io/distroless/base
|
||||
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