libnetwork: remove CircleCI config and code

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2021-06-09 12:31:52 +02:00
parent ef4d473401
commit a384f83e7a
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C
13 changed files with 14 additions and 170 deletions

View file

@ -1,79 +0,0 @@
version: 2
defaults: &defaults
working_directory: ~/go/src/github.com/docker/libnetwork
docker:
# the following image is irrelevant for the build, everything is built inside a container, check the Makefile
- image: 'circleci/golang:latest'
environment:
dockerbuildargs: .
dockerargs: --privileged -e CIRCLECI
jobs:
builder:
<<: *defaults
steps:
- checkout
- setup_remote_docker:
version: 19.03.12
reusable: true
exclusive: false
- run: make builder
build:
<<: *defaults
steps:
- checkout
- setup_remote_docker:
version: 19.03.12
reusable: true
exclusive: false
- run: make build
check:
<<: *defaults
steps:
- checkout
- setup_remote_docker:
version: 19.03.12
reusable: true
exclusive: false
- run: make check
cross:
<<: *defaults
steps:
- checkout
- setup_remote_docker:
version: 19.03.12
reusable: true
exclusive: false
- run: make cross
unit-tests:
<<: *defaults
steps:
- checkout
- setup_remote_docker:
version: 19.03.12
reusable: true
exclusive: false
- run: make unit-tests
workflows:
version: 2
ci:
jobs:
- builder
- build:
requires:
- builder
- check:
requires:
- builder
- cross:
requires:
- builder
- unit-tests:
requires:
- builder

View file

@ -1,7 +1,5 @@
# libnetwork - networking for containers
[![Circle CI](https://circleci.com/gh/docker/libnetwork/tree/master.svg?style=svg)](https://circleci.com/gh/docker/libnetwork/tree/master) [![Coverage Status](https://coveralls.io/repos/docker/libnetwork/badge.svg)](https://coveralls.io/r/docker/libnetwork) [![GoDoc](https://godoc.org/github.com/docker/libnetwork?status.svg)](https://godoc.org/github.com/docker/libnetwork) [![Go Report Card](https://goreportcard.com/badge/github.com/docker/libnetwork)](https://goreportcard.com/report/github.com/docker/libnetwork)
Libnetwork provides a native Go implementation for connecting containers
The goal of libnetwork is to deliver a robust Container Network Model that provides a consistent programming interface and the required network abstractions for applications.
@ -15,15 +13,17 @@ There are many networking solutions available to suit a broad range of use-cases
```go
package main
import (
"fmt"
"log"
"github.com/docker/docker/pkg/reexec"
"github.com/docker/libnetwork"
"github.com/docker/libnetwork/config"
"github.com/docker/libnetwork/netlabel"
"github.com/docker/libnetwork/options"
"github.com/docker/docker/libnetwork"
"github.com/docker/docker/libnetwork/config"
"github.com/docker/docker/libnetwork/netlabel"
"github.com/docker/docker/libnetwork/options"
)
func main() {

View file

@ -186,10 +186,6 @@ func TestScanStatistics(t *testing.T) {
}
func TestDisableIPv6DAD(t *testing.T) {
if testutils.RunningOnCircleCI() {
t.Skipf("Skipping as not supported on CIRCLE CI kernel")
}
defer testutils.SetupTestOSContext(t)()
key, err := newKey(t)

View file

@ -47,16 +47,12 @@ function test_single_network_connectivity() {
}
@test "Test default bridge network" {
skip_for_circleci
echo $(docker ps)
test_single_network_connectivity bridge 3
}
@test "Test default network dnet restart" {
skip_for_circleci
echo $(docker ps)
for iter in `seq 1 2`;
@ -70,8 +66,6 @@ function test_single_network_connectivity() {
}
@test "Test default network dnet ungraceful restart" {
skip_for_circleci
echo $(docker ps)
for iter in `seq 1 2`;
@ -87,8 +81,6 @@ function test_single_network_connectivity() {
}
@test "Test bridge network" {
skip_for_circleci
echo $(docker ps)
dnet_cmd $(inst_id2port 1) network create -d bridge singlehost
test_single_network_connectivity singlehost 3
@ -96,8 +88,6 @@ function test_single_network_connectivity() {
}
@test "Test bridge network dnet restart" {
skip_for_circleci
echo $(docker ps)
dnet_cmd $(inst_id2port 1) network create -d bridge singlehost
@ -114,8 +104,6 @@ function test_single_network_connectivity() {
}
@test "Test bridge network dnet ungraceful restart" {
skip_for_circleci
echo $(docker ps)
dnet_cmd $(inst_id2port 1) network create -d bridge singlehost
@ -134,8 +122,6 @@ function test_single_network_connectivity() {
}
@test "Test multiple bridge networks" {
skip_for_circleci
echo $(docker ps)
start=1
@ -237,7 +223,6 @@ function test_single_network_connectivity() {
}
@test "Test bridge network alias support" {
skip_for_circleci
dnet_cmd $(inst_id2port 1) network create -d bridge br1
dnet_cmd $(inst_id2port 1) container create container_1
net_connect 1 container_1 br1 container_2:c2
@ -254,7 +239,6 @@ function test_single_network_connectivity() {
@test "Test bridge network global alias support" {
skip_for_circleci
dnet_cmd $(inst_id2port 1) network create -d bridge br1
dnet_cmd $(inst_id2port 1) network create -d bridge br2
dnet_cmd $(inst_id2port 1) container create container_1
@ -284,8 +268,6 @@ function test_single_network_connectivity() {
}
@test "Test bridge network internal network" {
skip_for_circleci
echo $(docker ps)
dnet_cmd $(inst_id2port 1) network create -d bridge --internal internal
dnet_cmd $(inst_id2port 1) container create container_1

View file

@ -54,11 +54,7 @@ function start_consul() {
function stop_consul() {
echo "consul started"
docker stop pr_consul || true
# You cannot destroy a container in Circle CI. So do not attempt destroy in circleci
if [ -z "$CIRCLECI" ]; then
docker rm -f pr_consul || true
fi
docker rm -f pr_consul || true
}
hrun() {
@ -228,22 +224,12 @@ function start_ovrouter() {
mrjana/golang ./cmd/ovrouter/ovrouter eth0
}
function skip_for_circleci() {
if [ -n "$CIRCLECI" ]; then
skip
fi
}
function stop_dnet() {
local name
name=$(dnet_container_name $1 $2)
rm -rf /tmp/dnet/${name} || true
docker stop ${name} || true
# You cannot destroy a container in Circle CI. So do not attempt destroy in circleci
if [ -z "$CIRCLECI" ]; then
docker rm -f ${name} || true
fi
docker rm -f ${name} || true
}
function dnet_cmd() {
@ -299,11 +285,7 @@ function start_etcd() {
}
function stop_etcd() {
docker stop dn_etcd || true
# You cannot destroy a container in Circle CI. So do not attempt destroy in circleci
if [ -z "$CIRCLECI" ]; then
docker rm -f dn_etcd || true
fi
docker rm -f dn_etcd || true
}
function start_zookeeper() {
@ -318,11 +300,7 @@ function start_zookeeper() {
function stop_zookeeper() {
echo "zookeeper started"
docker stop zookeeper_server || true
# You cannot destroy a container in Circle CI. So do not attempt destroy in circleci
if [ -z "$CIRCLECI" ]; then
docker rm -f zookeeper_server || true
fi
docker rm -f zookeeper_server || true
}
function test_overlay() {

View file

@ -4,6 +4,5 @@
load helpers
@test "Test overlay network hostmode with consul" {
skip_for_circleci
test_overlay_hostmode consul
}

View file

@ -4,17 +4,14 @@
load helpers
@test "Test overlay network with consul" {
skip_for_circleci
test_overlay consul
}
@test "Test overlay network singlehost with consul" {
skip_for_circleci
test_overlay_singlehost consul
}
@test "Test overlay network with dnet restart" {
skip_for_circleci
test_overlay consul skip_rm
docker restart dnet-1-consul
wait_for_dnet $(inst_id2port 1) dnet-1-consul
@ -26,12 +23,10 @@ load helpers
}
@test "Test overlay network internal network with consul" {
skip_for_circleci
test_overlay consul internal
}
@test "Test overlay network with dnet ungraceful shutdown" {
skip_for_circleci
dnet_cmd $(inst_id2port 1) network create -d overlay multihost
start=1
end=3

View file

@ -4,6 +4,5 @@
load helpers
@test "Test overlay network with etcd" {
skip_for_circleci
test_overlay etcd
}

View file

@ -51,7 +51,6 @@ function test_overlay_local() {
}
@test "Test overlay network in local scope" {
skip_for_circleci
test_overlay_local local
}

View file

@ -4,6 +4,5 @@
load helpers
@test "Test overlay network with zookeeper" {
skip_for_circleci
test_overlay zookeeper
}

View file

@ -11,10 +11,7 @@ trap "cleanup_containers" EXIT SIGINT
function cleanup_containers() {
for c in "${!cmap[@]}"; do
docker stop $c 1>> ${INTEGRATION_ROOT}/test.log 2>&1 || true
if [ -z "$CIRCLECI" ]; then
docker rm -f $c 1>> ${INTEGRATION_ROOT}/test.log 2>&1 || true
fi
docker rm -f $c 1>> ${INTEGRATION_ROOT}/test.log 2>&1 || true
done
unset cmap
@ -223,13 +220,7 @@ fi
# Suite setup
if [ -z "$SUITES" ]; then
if [ -n "$CIRCLECI" ]; then
# We can only run a limited list of suites in circleci because of the
# old kernel and limited docker environment.
suites="dnet multi_consul multi_zk multi_etcd"
else
suites="dnet multi_consul multi_zk multi_etcd bridge overlay_consul overlay_consul_host overlay_zk overlay_etcd"
fi
suites="dnet multi_consul multi_zk multi_etcd bridge overlay_consul overlay_consul_host overlay_zk overlay_etcd"
else
suites="$SUITES"
fi

View file

@ -3,7 +3,6 @@
package testutils
import (
"os"
"runtime"
"syscall"
"testing"
@ -42,8 +41,3 @@ func SetupTestOSContext(t *testing.T) func() {
runtime.UnlockOSThread()
}
}
// RunningOnCircleCI returns true if being executed on libnetwork Circle CI setup
func RunningOnCircleCI() bool {
return os.Getenv("CIRCLECI") != ""
}

View file

@ -1,9 +1,6 @@
package testutils
import (
"os"
"testing"
)
import "testing"
// SetupTestOSContext joins a new network namespace, and returns its associated
// teardown function.
@ -13,11 +10,5 @@ import (
// defer SetupTestOSContext(t)()
//
func SetupTestOSContext(t *testing.T) func() {
return func() {
}
}
// RunningOnCircleCI returns true if being executed on libnetwork Circle CI setup
func RunningOnCircleCI() bool {
return os.Getenv("CIRCLECI") != ""
return func() {}
}