autoapp 🤖
An example of CI/CD with a simple go application utilizing a multistage docker build.
Run
🐳 ized
# creates a new image
$ make build
# runs the image
$ make run
🐹 ized
# installs deps etc
$ make install
# execute binary
$ ./bin/cmd
Example
Environment Variables
# defaults to "8080"
PORT=3000
# defaults to "Gopher"
NAME="Edgar Allan Poe"
# forces tests to fail
FAILED=true
Commands
Run make help
to list available commands:
$ make help
Choose a command run in autoapp:
install Install missing dependencies. Builds binary in ./bin
build Creates a docker image of the app
fail Forces a failed docker build of the app due to failing tests
run Runs the current docker image on port 8080
clean Clean build files. Runs `go clean` internally
fmt Runs gofmt on all source files
test Runs all the tests.
coverage Tests
…