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:
jonbetti 2018-12-08 22:02:46 +00:00
parent aae3c62ea3
commit 0a2bb13612
4 changed files with 25 additions and 19 deletions

View File

@ -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 ]
...

View File

@ -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

View File

@ -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

1
go.mod Normal file
View File

@ -0,0 +1 @@
module go.jonnrb.io/vanity