Skip to content

Commit 53e0571

Browse files
authored
fix broken CI (#823)
* fix broken CI * fix .travis.yml * skip gomoqs * fix multi arch image building
1 parent f01a9a5 commit 53e0571

File tree

8 files changed

+22
-10
lines changed

8 files changed

+22
-10
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,7 @@
44
_output
55
_cache
66
Dockerfile.amd64.run
7+
Dockerfile.arm64.run
8+
Dockerfile.s390x.run
9+
Dockerfile.arm.run
10+
vendor/github.com/osrg/gobgp/gobgp/gobgp

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ go:
88
branches:
99
only:
1010
- master
11-
- /^bzub-.*$/
1211
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
1312
- /^PR\d*$/
13+
- /.*/
1414

1515
env:
1616
global:

Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ ADD build/image-assets/profile /root/.profile
1919
ADD build/image-assets/vimrc /root/.vimrc
2020
ADD build/image-assets/motd-kube-router.sh /etc/motd-kube-router.sh
2121
ADD kube-router gobgp /usr/local/bin/
22-
RUN cd && \
23-
/usr/local/bin/gobgp --gen-cmpl --bash-cmpl-file /var/lib/gobgp/gobgp-completion.bash
2422

2523
WORKDIR "/root"
2624
ENTRYPOINT ["/usr/local/bin/kube-router"]

Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ IS_ROOT=$(filter 0,$(shell id -u))
1616
DOCKER=$(if $(or $(IN_DOCKER_GROUP),$(IS_ROOT),$(OSX)),docker,sudo docker)
1717
MAKEFILE_DIR=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
1818
UPSTREAM_IMPORT_PATH=$(GOPATH)/src/github.com/cloudnativelabs/kube-router/
19-
BUILD_IN_DOCKER?=false
19+
BUILD_IN_DOCKER?=true
2020
DOCKER_BUILD_IMAGE?=golang:1.10.8-alpine3.9
2121
ifeq ($(GOARCH), arm)
2222
ARCH_TAG_PREFIX=$(GOARCH)
@@ -51,7 +51,7 @@ else
5151
GOARCH=$(GOARCH) CGO_ENABLED=0 go build -ldflags '-X github.com/cloudnativelabs/kube-router/pkg/cmd.version=$(GIT_COMMIT) -X github.com/cloudnativelabs/kube-router/pkg/cmd.buildDate=$(BUILD_DATE)' -o kube-router cmd/kube-router/kube-router.go
5252
endif
5353

54-
test: gofmt gomoqs ## Runs code quality pipelines (gofmt, tests, coverage, lint, etc)
54+
test: gofmt ## Runs code quality pipelines (gofmt, tests, coverage, lint, etc)
5555
ifeq "$(BUILD_IN_DOCKER)" "true"
5656
$(DOCKER) run -v $(PWD):/go/src/github.com/cloudnativelabs/kube-router -w /go/src/github.com/cloudnativelabs/kube-router $(DOCKER_BUILD_IMAGE) \
5757
sh -c 'go test -v -timeout 30s github.com/cloudnativelabs/kube-router/cmd/kube-router/ github.com/cloudnativelabs/kube-router/pkg/...'
@@ -148,8 +148,11 @@ release: push-release github-release ## Pushes a release to DockerHub and GitHub
148148

149149
clean: ## Removes the kube-router binary and Docker images
150150
rm -f kube-router
151-
$(DOCKER) rmi $(REGISTRY_DEV)
152-
151+
rm -f gobgp
152+
rm -f Dockerfile.$(GOARCH).run
153+
if [ $(shell $(DOCKER) images -q $(REGISTRY_DEV):$(IMG_TAG) 2> /dev/null) ]; then \
154+
$(DOCKER) rmi $(REGISTRY_DEV):$(IMG_TAG); \
155+
fi
153156
gofmt: ## Tells you what files need to be gofmt'd.
154157
@build/verify-gofmt.sh
155158

build/travis-deploy.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,27 @@ if [ "${TRAVIS_EVENT_TYPE}" = "pull_request" ]; then
1111
fi
1212
echo "Building/pushing PR$TRAVIS_PULL_REQUEST from $PR_USER"
1313
make push IMG_TAG="PR$TRAVIS_PULL_REQUEST" GOARCH=amd64
14+
make clean IMG_TAG="PR$TRAVIS_PULL_REQUEST" GOARCH=amd64
1415
make push IMG_TAG="PR$TRAVIS_PULL_REQUEST" GOARCH=arm64
16+
make clean IMG_TAG="PR$TRAVIS_PULL_REQUEST" GOARCH=arm64
1517
make push IMG_TAG="PR$TRAVIS_PULL_REQUEST" GOARCH=arm
18+
make clean IMG_TAG="PR$TRAVIS_PULL_REQUEST" GOARCH=arm
1619
make push IMG_TAG="PR$TRAVIS_PULL_REQUEST" GOARCH=s390x
20+
make clean IMG_TAG="PR$TRAVIS_PULL_REQUEST" GOARCH=s390x
1721
exit 0
1822
fi
1923

2024
# Release image tag format: v0.0.0 and latest
2125
if [ -n "$TRAVIS_TAG" ]; then
2226
echo "Running Release build on Travis"
2327
make push-release RELEASE_TAG="amd64-$TRAVIS_TAG" GOARCH=amd64
28+
make clean RELEASE_TAG="amd64-$TRAVIS_TAG" GOARCH=amd64
2429
make push-release RELEASE_TAG="arm64-$TRAVIS_TAG" GOARCH=arm64
30+
make clean RELEASE_TAG="arm64-$TRAVIS_TAG" GOARCH=arm64
2531
make push-release RELEASE_TAG="arm-$TRAVIS_TAG" GOARCH=arm
32+
make clean RELEASE_TAG="arm-$TRAVIS_TAG" GOARCH=arm
2633
make push-release RELEASE_TAG="s390x-$TRAVIS_TAG" GOARCH=s390x
27-
34+
make clean RELEASE_TAG="s390x-$TRAVIS_TAG" GOARCH=s390x
2835
echo "Pushing manifest on Travis"
2936
make push-manifest RELEASE_TAG="$TRAVIS_TAG"
3037
exit 0

cmd/kube-router/kube-router_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func TestMainHelp(t *testing.T) {
4444
exp = append(exp, []byte("```\n")...)
4545

4646
if !bytes.Contains(docBuf.Bytes(), exp) {
47-
t.Errorf("docs/README.md 'command line options' section does not match `kube-router --help`.\nExpected:\n%s", exp)
47+
t.Errorf("docs/user-guide.md 'command line options' section does not match `kube-router --help`.\nExpected:\n%s", exp)
4848
t.Errorf("\nGot:\n%s", docBuf.Bytes())
4949
}
5050
}

docs/user-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ Usage of kube-router:
6060
--iptables-sync-period duration The delay between iptables rule synchronizations (e.g. '5s', '1m'). Must be greater than 0. (default 5m0s)
6161
--ipvs-graceful-period duration The graceful period before removing destinations from IPVS services (e.g. '5s', '1m', '2h22m'). Must be greater than 0. (default 30s)
6262
--ipvs-graceful-termination Enables the experimental IPVS graceful terminaton capability
63+
--ipvs-permit-all Enables rule to accept all incoming traffic to service VIP's on the node. (default true)
6364
--ipvs-sync-period duration The delay between ipvs config synchronizations (e.g. '5s', '1m', '2h22m'). Must be greater than 0. (default 5m0s)
64-
--ipvs-permit-all Permit all inbound traffic to the service VIP's
6565
--kubeconfig string Path to kubeconfig file with authorization information (the master location is set by the master flag).
6666
--masquerade-all SNAT all traffic to cluster IP/node port.
6767
--master string The address of the Kubernetes API server (overrides any value in kubeconfig).
-21.5 MB
Binary file not shown.

0 commit comments

Comments
 (0)