mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-21 21:30:48 +02:00
- Update to circleci 2.0
- Use latest gobuilder with goreleaser which also publishes docker files.
This commit is contained in:
parent
3b9742a33c
commit
296f98fe42
4 changed files with 52 additions and 37 deletions
53
circle.yml
53
circle.yml
|
@ -1,30 +1,25 @@
|
||||||
machine:
|
version: 2
|
||||||
services:
|
jobs:
|
||||||
- docker
|
build:
|
||||||
environment:
|
docker:
|
||||||
IS_RELEASE: $(if [ "$CIRCLE_TAG" != "" ] ; then echo release; else echo ci; fi;)
|
- image: v2tec/gobuilder:0.2.0_go1.7.4-glide0.12.3-goreleaser0.40.3-docker17.03.0
|
||||||
BUILD_IMAGE: v2tec/gobuilder:0.1.0_go1.7.4-glide0.12.3-goreleaser0.6.2
|
working_directory: /src
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- setup_remote_docker:
|
||||||
|
version: 17.03.0-ce
|
||||||
|
- run: git fetch --tags
|
||||||
|
- run: |
|
||||||
|
IS_RELEASE=$(if [ "$CIRCLE_TAG" != "" ] ; then echo release; else echo ci; fi;)
|
||||||
|
/build.sh $IS_RELEASE
|
||||||
|
|
||||||
dependencies:
|
- store_artifacts:
|
||||||
override:
|
path: /src/dist/
|
||||||
- git fetch --tags
|
workflows:
|
||||||
- docker pull $BUILD_IMAGE
|
version: 2
|
||||||
|
build-deploy:
|
||||||
compile:
|
jobs:
|
||||||
override:
|
- build:
|
||||||
- docker run -v "$PWD":/src -e GITHUB_TOKEN=$GITHUB_TOKEN $BUILD_IMAGE $IS_RELEASE $CIRCLE_BRANCH-$CIRCLE_SHA1
|
filters:
|
||||||
|
tags:
|
||||||
test:
|
only: /.*/
|
||||||
override:
|
|
||||||
- echo "Tests included in compile step."
|
|
||||||
|
|
||||||
deployment:
|
|
||||||
ci:
|
|
||||||
branch: /.*/
|
|
||||||
commands:
|
|
||||||
- cp -r ./dist/* $CIRCLE_ARTIFACTS
|
|
||||||
release:
|
|
||||||
tag: /v[0-9]+(\.[0-9]+)*/
|
|
||||||
owner: v2tec
|
|
||||||
commands:
|
|
||||||
- cp -r ./dist/* $CIRCLE_ARTIFACTS
|
|
4
dockerfile/amd64/Dockerfile
Normal file
4
dockerfile/amd64/Dockerfile
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
FROM centurylink/ca-certs
|
||||||
|
LABEL "com.centurylinklabs.watchtower"="true"
|
||||||
|
COPY watchtower /
|
||||||
|
ENTRYPOINT ["/watchtower"]
|
4
dockerfile/armhf/Dockerfile
Normal file
4
dockerfile/armhf/Dockerfile
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
FROM centurylink/ca-certs
|
||||||
|
LABEL "com.centurylinklabs.watchtower"="true"
|
||||||
|
COPY watchtower /
|
||||||
|
ENTRYPOINT ["/watchtower"]
|
|
@ -24,14 +24,8 @@ build:
|
||||||
# Archive customization
|
# Archive customization
|
||||||
archive:
|
archive:
|
||||||
# You can change the name of the archive.
|
# You can change the name of the archive.
|
||||||
# This is parsed with Golang template engine and the following variables
|
# This is parsed with Golang template engine and the following variables.
|
||||||
# are available:
|
name_template: "{{.ProjectName}}_{{.Os}}_{{.Arch}}"
|
||||||
# - BinaryName
|
|
||||||
# - Version
|
|
||||||
# - Os
|
|
||||||
# - Arch
|
|
||||||
# The default is `{{.BinaryName}}_{{.Os}}_{{.Arch}}`
|
|
||||||
name_template: "{{.BinaryName}}_{{.Os}}_{{.Arch}}"
|
|
||||||
|
|
||||||
# Archive format. Valid options are `tar.gz` and `zip`.
|
# Archive format. Valid options are `tar.gz` and `zip`.
|
||||||
# Default is `zip`
|
# Default is `zip`
|
||||||
|
@ -54,3 +48,21 @@ archive:
|
||||||
# `README*` and `CHANGELOG*` (case-insensitive)
|
# `README*` and `CHANGELOG*` (case-insensitive)
|
||||||
files:
|
files:
|
||||||
- LICENSE.md
|
- LICENSE.md
|
||||||
|
|
||||||
|
dockers:
|
||||||
|
-
|
||||||
|
goos: linux
|
||||||
|
goarch: amd64
|
||||||
|
goarm: ''
|
||||||
|
binary: watchtower
|
||||||
|
image: v2tec/watchtower
|
||||||
|
dockerfile: dockerfile/amd64/Dockerfile
|
||||||
|
tag_template: "{{ .Version }}"
|
||||||
|
-
|
||||||
|
goos: linux
|
||||||
|
goarch: arm
|
||||||
|
goarm: 6
|
||||||
|
binary: watchtower
|
||||||
|
image: v2tec/watchtower
|
||||||
|
dockerfile: dockerfile/armhf/Dockerfile
|
||||||
|
tag_template: "armhf-{{ .Version }}"
|
Loading…
Add table
Add a link
Reference in a new issue