Skip to content

Commit bb6a42d

Browse files
committed
Update travis.yml to use go module
Signed-off-by: Aylei <rayingecho@gmail.com>
1 parent 5fb581f commit bb6a42d

File tree

6 files changed

+9
-23
lines changed

6 files changed

+9
-23
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
*.output
55
.swp
66
vendor/
7-
debug-agent
8-
kubectl-debug
7+
/debug-agent
8+
/kubectl-debug
99
dist/

.goreleaser.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@ builds:
2020
ignore:
2121
- goos: darwin
2222
goarch: 386
23-
archive:
24-
replacements:
25-
freebsd: FreeBSD
26-
darwin: Darwin
27-
linux: Linux
28-
windows: Windows
29-
386: i386
30-
amd64: x86_64
3123
checksum:
3224
name_template: 'checksums.txt'
3325
snapshot:

.travis.yml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,10 @@ language: go
55
go:
66
- "1.12.x"
77
env:
8-
- DEP_VERSION="0.5.1"
9-
10-
before_install:
11-
- curl -L -s https://github.com/golang/dep/releases/download/v${DEP_VERSION}/dep-linux-amd64 -o $GOPATH/bin/dep
12-
- chmod +x $GOPATH/bin/dep
8+
- GO111MODULE=on make build
139

1410
install:
15-
- dep ensure -v
11+
- go mod download
1612

1713
before_script:
1814
- GO_FILES=$(find . -iname '*.go' -type f | grep -v /vendor/) # All the .go files, excluding vendor/
@@ -25,11 +21,8 @@ script:
2521
- staticcheck ./... # "go vet on steroids" + linter
2622

2723
before_deploy:
28-
- GOOS=linux GARCH=amd64 go build -o debug-agent ./cmd/agent
29-
- docker build . -t aylei/debug-agent:$TRAVIS_TAG
24+
- make agent-docker
3025

3126
deploy:
3227
- provider: script
3328
script: bash ./scripts/docker_push.sh
34-
on:
35-
tags: true

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ plugin:
1111
GO111MODULE=on CGO_ENABLED=0 go build -o kubectl-debug cmd/plugin/main.go
1212

1313
agent-docker: agent
14-
docker build . -t aylei/debug-agent
14+
docker build . -t aylei/debug-agent:latest
1515

1616
agent:
1717
$(GO) -o debug-agent cmd/agent/main.go

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ Install the debug agent DaemonSet in your cluster, which is responsible for runn
3131

3232
```bash
3333
kubectl apply -f https://raw.githubusercontent.com/aylei/kubectl-debug/master/scripts/agent_daemonset.yml
34+
# or using helm
35+
helm install -n=debug-agent ./contrib/helm/kubectl-debug
3436
```
3537

3638
Install the kubectl debug plugin:
@@ -41,7 +43,6 @@ Using [krew]():
4143

4244
Homebrew:
4345
```shell
44-
# MacOS
4546
brew install aylei/tap/kubectl-debug
4647
```
4748

scripts/docker_push.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
3-
docker push aylei/debug-agent:$TRAVIS_TAG
3+
docker push aylei/debug-agent:latest

0 commit comments

Comments
 (0)