1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #2192 from fcrisciani/circle-multistage

Multistage for build
This commit is contained in:
Flavio Crisciani 2018-06-19 21:58:45 -07:00 committed by GitHub
commit 3a5f106ec3
6 changed files with 11 additions and 17 deletions

View file

@ -5,7 +5,7 @@ defaults: &defaults
docker:
- image: 'circleci/golang:1.10'
environment:
dockerbuildargs: -f Dockerfile.ci .
dockerbuildargs: .
dockerargs: --privileged -e CIRCLECI
jobs:
@ -14,6 +14,7 @@ jobs:
steps:
- checkout
- setup_remote_docker:
version: 18.05.0-ce
reusable: true
exclusive: false
- run: make builder
@ -23,6 +24,7 @@ jobs:
steps:
- checkout
- setup_remote_docker:
version: 18.05.0-ce
reusable: true
exclusive: false
- run: make build
@ -32,6 +34,7 @@ jobs:
steps:
- checkout
- setup_remote_docker:
version: 18.05.0-ce
reusable: true
exclusive: false
- run: make check
@ -41,6 +44,7 @@ jobs:
steps:
- checkout
- setup_remote_docker:
version: 18.05.0-ce
reusable: true
exclusive: false
- run: make cross
@ -50,6 +54,7 @@ jobs:
steps:
- checkout
- setup_remote_docker:
version: 18.05.0-ce
reusable: true
exclusive: false
- run: make unit-tests

View file

@ -1,4 +1,4 @@
FROM golang:1.10
FROM golang:1.10.2 as dev
RUN apt-get update && apt-get -y install iptables
RUN go get github.com/golang/lint/golint \
@ -10,4 +10,6 @@ RUN go get github.com/golang/lint/golint \
WORKDIR /go/src/github.com/docker/libnetwork
FROM dev
COPY . .

View file

@ -1,11 +0,0 @@
FROM golang:1.10.2
RUN apt-get update && apt-get -y install iptables
RUN go get github.com/golang/lint/golint \
golang.org/x/tools/cmd/cover \
github.com/mattn/goveralls \
github.com/gordonklaus/ineffassign \
github.com/client9/misspell/cmd/misspell \
honnef.co/go/tools/cmd/gosimple
WORKDIR /go/src/github.com/docker/libnetwork

View file

@ -1,6 +1,6 @@
.PHONY: all all-local build build-local clean cross cross-local gosimple vet lint misspell check check-local check-code check-format unit-tests
SHELL=/bin/bash
dockerbuildargs ?= - < Dockerfile.build
dockerbuildargs ?= --target dev - < Dockerfile
dockerargs ?= --privileged -v $(shell pwd):/go/src/github.com/docker/libnetwork -w /go/src/github.com/docker/libnetwork
build_image=libnetworkbuild
container_env = -e "INSIDECONTAINER=-incontainer=true"

View file

@ -76,7 +76,7 @@ func newInfo(hnd *netlink.Handle, t *testing.T) (Sandbox, error) {
intf1.address = addr
intf1.address.IP = ip4
ip6, addrv6, err := net.ParseCIDR("2001:DB8::ABCD/48")
ip6, addrv6, err := net.ParseCIDR("fe80::2/64")
if err != nil {
return nil, err
}
@ -111,7 +111,6 @@ func newInfo(hnd *netlink.Handle, t *testing.T) (Sandbox, error) {
info := &networkNamespace{iFaces: []*nwIface{intf1, intf2, intf3}}
info.gw = net.ParseIP("192.168.1.1")
// sinfo.GatewayIPv6 = net.ParseIP("2001:DB8::1")
info.gwv6 = net.ParseIP("fe80::1")
return info, nil

View file

@ -29,7 +29,6 @@ func TestSandboxCreate(t *testing.T) {
if err != nil {
t.Fatalf("Failed to create a new sandbox: %v", err)
}
runtime.LockOSThread()
if s.Key() != key {
t.Fatalf("s.Key() returned %s. Expected %s", s.Key(), key)