DEV Community

Cover image for autoapp: A quick dive into containerized CI/CD
derek
derek

Posted on • Updated on

autoapp: A quick dive into containerized CI/CD

I've been deep diving and vetting a lot of new technologies lately to improve productivity for myself and team(s). Some of the things I've been getting into:

So I figure I might as well create an experiment project and document the steps along the way for others to learn and partake. Let me preface and forewarn that this is mostly for educational purposes and is not recommended for production usage. Also to note that it does require some comfort at the command line $.

Pull-requests are welcomed 😍

GitHub logo derekahn / autoapp

Example of CI/CD with a simple go app

autoapp πŸ€–

license Go Report Card Codacy Badge Codacy Badge Build Status Docker Repository on Quay GitHub tag (latest SemVer)

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
Enter fullscreen mode Exit fullscreen mode

🐹ized

# installs deps etc
$ make install

# execute binary
$ ./bin/cmd
Enter fullscreen mode Exit fullscreen mode

Example

example view

Environment Variables

# defaults to "8080"
PORT=3000

# defaults to "Gopher"
NAME="Edgar Allan Poe"

# forces tests to fail
FAILED=true
Enter fullscreen mode Exit fullscreen mode

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
…
Enter fullscreen mode Exit fullscreen mode

Opinions:

  • I personally really πŸ’š Drone; It's ease of use, documentation, and containerization is Amazing! Well at least compared to travis, circle-ci, or jenkins. Fun fact... it can pretty much be deployed on anything. Also it looks to be a perfect match for ephemeral pods on k8s.
  • I definitely prefer Quay's UI/UX, it's also "supposedly" the most battle-tested/preferred at the moment πŸ€·πŸ½β€β™‚οΈ. But it's also the most expensive, so I guess you get what you pay for.
  • Spinnaker is a 🐻. But needless to say it's super powerful and flexible. You can unlock that power once you've figured out how to navigate the esoteric documentation. They do have a slack and forum, but I still found it a tad bit difficult getting help/advice on configurations, etc. But once it's up and running everything is βœ….

Top comments (0)