Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added test & build to makefile #248

Merged
merged 3 commits into from
Sep 9, 2020
Merged

Added test & build to makefile #248

merged 3 commits into from
Sep 9, 2020

Conversation

el10savio
Copy link
Contributor

References: #146

Added make test & make build

test - Since check is already added, test redirects and runs make check

build - added make build to run go build and generate the binary in bin/chaoskube

@linki
Copy link
Owner

linki commented Sep 8, 2020

@el10savio Thank you 😃

Makefile Outdated

test: check

build: go build -o /bin/chaoskube -v
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you intentionally use the global /bin instead of a local (relative) path?

Copy link
Contributor Author

@el10savio el10savio Sep 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, I can change it to be relative to the project root

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do that. Otherwise it might have unintended effects.

Copy link
Contributor Author

@el10savio el10savio Sep 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've changed it to generate the build in a bin folder located in the project root
Added it to .gitignore so that local builds are not picked up by git

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ ~/chaoskube tree -L 2          
.
├── CHANGELOG.md
├── Dockerfile
├── Dockerfile.arm32v6
├── Dockerfile.arm64v8
├── Dockerfile.ppc64le
├── LICENSE
├── Makefile
├── README.md
├── bin
│   └── chaoskube    <--- here
├── chaoskube
│   ├── chaoskube.go
│   └── chaoskube_test.go
├── chaoskube.png
├── examples
│   ├── chaoskube.yaml
│   └── rbac.yaml
├── go.mod
├── go.sum
├── internal
│   └── testutil
├── main.go
├── metrics
│   └── metrics.go
├── notifier
│   ├── noop.go
│   ├── notifier.go
│   ├── notifier_test.go
│   ├── slack.go
│   └── slack_test.go
├── renovate.json
├── terminator
│   ├── delete_pod.go
│   ├── delete_pod_test.go
│   └── terminator.go
└── util
    ├── util.go
    └── util_test.go

9 directories, 29 files

@linki
Copy link
Owner

linki commented Sep 9, 2020

@el10savio Awesome. Thank you!

@linki linki merged commit 7becea1 into linki:master Sep 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants