In this section we'll be finishing the CI flow, I say finishing
because we've already configured Quay to pull, build, and secruity scan on any new tag on our remote repo so that's half of it. This will be the first half in which runs our Go
tests and tests the 🐳 build on a pre-merge hook
So there's some redundancy happening but I think is important and good if your mantra is DON'T BREAK THE BUILD!
Because we're utilizing github/gitlab and this is a public repo (OSS) we can utilize drone's free services.
Goto drone.io
Click
Login
Select
autoapp
repo
Because we're adhering to golang-standards our project layout has our build files in
build/
dir
The drone config in build/
is already setup but we can explain what's happening
---
pipeline: # <- drone syntax
test: # test phase runs a go docker image and leverages our make cmds
image: golang
commands:
- make test
- make coverage
build: # build phase tests our docker build
image: plugins/docker
repo: derekahn/autoapp # required for this "plugin"
dry_run: true # indicates to just check build and not push to a registry
- First step Drone will be configured as a pre-merge hook which will check tests and build (bit redundant, but thorough).
- Second step will be on post merge which we've already configured Quay to trigger a pull on any new recieved tags (ie
v1.0.0
) to our remote repo, in which Quay will then pull and rebuild a fresh image.
Previous | Next |
---|---|
Setting Up Spinnaker | Deploying 🚀 |