gonut is a portable tool to help you verify whether you can push a sample app to a Cloud Foundry. It will push an app to Cloud Foundry and delete it afterwards. The apps are embedded into the gonut binary, so you just have to install gonut and you are set.
It is written in Go and uses pina-golada to include arbitrary sample app data in the final binary.
Installation options are either using Homebrew or a convenience download script.
-
On macOS systems, a Homebrew tap is available to install
gonut:brew install homeport/tap/gonut
-
Use a convenience script to download the latest release to install it in a suitable location on your local machine:
curl -fsL http://ibm.biz/Bd2t2v | bash
We are happy to have other people contributing to the project. If you decide to do that, here's how to:
- get Go (
gonutrequires Go version 1.11 or greater) - fork the project
- create a new branch
- make your changes
- open a PR.
Git commit messages should be meaningful and follow the rules nicely written down by Chris Beams:
The seven rules of a great Git commit message
- Separate subject from body with a blank line
- Limit the subject line to 50 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use the imperative mood in the subject line
- Wrap the body at 72 characters
- Use the body to explain what and why vs. how
There are multiple make targets, but running all does everything you want in one call.
make allBest way is to use Docker to spin up a container:
docker run \
--interactive \
--tty \
--rm \
--volume $GOPATH/src/github.com/homeport/gonut:/go/src/github.com/homeport/gonut \
--workdir /go/src/github.com/homeport/gonut \
golang:1.19 /bin/bashAdd a pre-commit hook using this command in the repository directory:
cat <<EOS | cat > .git/hooks/pre-commit && chmod a+rx .git/hooks/pre-commit
#!/usr/bin/env bash
set -euo pipefail
make test
EOS
