Setup a working pipeline

* add tests to ensure function even after switching docker client api version
* switch docker client api version to remove import of Sirupsen and get rid of the casing workaround
* migrate from glide to dep to go modules
* rewrite ci workflow
  * only run publish on version tags
  * only run build on branches
  * update goreleaser config
  * disable automated latest tag push
* remove dependency to v2tec/docker-gobuilder
* remove dead code and files
* add golands .idea folder to gitignore
* add label to released docker images
* add test reporting, add some unit tests
* change test output dir
* fix goreleaser versions
* add debug output for circleci and goreleaser
* disable cgo
This commit is contained in:
Simon Aronsson 2019-04-04 23:08:44 +02:00
parent 98f916f29a
commit 1b82da1ab7
16 changed files with 450 additions and 362 deletions

View file

@ -1,39 +1,16 @@
# Build customization
build:
# Path to main.go file.
# Default is `main.go`
main: ./main.go
# GOOS list to build in.
# For more info refer to https://golang.org/doc/install/source#environment
# Defaults are darwin and linux
binary: watchtower
goos:
- linux
- windows
# GOARCH to build in.
# For more info refer to https://golang.org/doc/install/source#environment
# Defaults are 386 and amd64
goarch:
- amd64
- arm
- arm64
# Archive customization
archive:
# You can change the name of the archive.
# This is parsed with Golang template engine and the following variables.
name_template: "{{.ProjectName}}_{{.Os}}_{{.Arch}}"
# Archive format. Valid options are `tar.gz` and `zip`.
# Default is `zip`
format: tar.gz
# Replacements for GOOS and GOARCH on the archive name.
# The keys should be valid GOOS or GOARCH values followed by your custom
# replacements.
# By default, `replacements` replace GOOS and GOARCH values with valid outputs
# of `uname -s` and `uname -m` respectively.
replacements:
arm: armhf
arm64: arm64v8
@ -41,42 +18,42 @@ archive:
386: 386
darwin: macOS
linux: linux
format_overrides:
- goos: windows
format: zip
# Additional files you want to add to the archive.
# Defaults are any files matching `LICENCE*`, `LICENSE*`,
# `README*` and `CHANGELOG*` (case-insensitive)
files:
- LICENSE.md
dockers:
-
goos: linux
goarch: amd64
goarm: ''
binary: watchtower
image: containrrr/watchtower
dockerfile: dockerfile/amd64/Dockerfile
tag_templates:
- '{{ .Version }}'
build_flag_templates:
- "--label=com.centurylinklabs.watchtower=true"
image_templates:
- containrrr/watchtower:{{ .Version }}
binaries:
- watchtower
-
goos: linux
goarch: arm
goarm: 6
binary: watchtower
image: containrrr/watchtower
dockerfile: dockerfile/armhf/Dockerfile
tag_templates:
- 'armhf-{{ .Version }}'
build_flag_templates:
- "--label=com.centurylinklabs.watchtower=true"
image_templates:
- containrrr/watchtower:armhf-{{ .Version }}
binaries:
- watchtower
-
goos: linux
goarch: arm64
goarm: ''
binary: watchtower
image: containrrr/watchtower
dockerfile: dockerfile/arm64v8/Dockerfile
tag_templates:
- 'arm64v8-{{ .Version }}'
build_flag_templates:
- "--label=com.centurylinklabs.watchtower=true"
image_templates:
- containrrr/watchtower:arm64v8-{{ .Version }}
binaries:
- watchtower