Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/distribworks/dkron into m…
Browse files Browse the repository at this point in the history
…aster-execution-timezone
  • Loading branch information
yvanoers committed Nov 12, 2020
2 parents a3516fc + 9a4d9fe commit 54c2c23
Show file tree
Hide file tree
Showing 225 changed files with 20,870 additions and 2,753 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/main.yml
@@ -1,23 +1,28 @@
name: Test
on: [push, pull_request]
on:
push:
branches:
- '**'
tags-ignore:
- '**'
pull_request:
jobs:
build:
name: Test
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.13
- name: Set up Go 1.14
uses: actions/setup-go@v1
with:
go-version: 1.13
go-version: 1.14
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v1
uses: actions/checkout@v2

- name: Get dependencies
run: go get -v -t -d ./...

- name: Test without docker
run: go test -v -timeout 200s ./...

run: go test -v -timeout 200s ./...
62 changes: 62 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,62 @@
name: Release

on:
push:
branches-ignore:
- '**'
tags:
- 'v*.*.*'
# to be used by fork patch-releases ^^
- 'v*.*.*-*'

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@master
with:
go-version: 1.14.x

- name: Prepare
id: prepare
run: |
TAG=${GITHUB_REF#refs/tags/}
echo ::set-output name=tag_name::${TAG}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist --timeout=1h
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.prepare.outputs.tag_name }}

- name: set up buildx
id: buildx
uses: crazy-max/ghaction-docker-buildx@v1
with:
version: latest

- name: login to dockerhub
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin

- name: build (and publish) main image
env:
# fork friendly ^^
DOCKER_REPO: ${{ secrets.DOCKER_REPO }}
run: |
docker buildx build \
--platform linux/amd64,linux/arm64,linux/arm/v7 \
--build-arg VERSION=${{ steps.prepare.outputs.tag_name }} \
--push \
-t ${DOCKER_REPO:-dkron/dkron}:${{ steps.prepare.outputs.tag_name }} \
-t ${DOCKER_REPO:-dkron/dkron}:latest \
-f Dockerfile.hub \
.
130 changes: 86 additions & 44 deletions .goreleaser.yml
Expand Up @@ -17,6 +17,9 @@ builds:
goarch:
- amd64
- arm64
- arm
goarm:
- 7
ldflags:
- -s -w

Expand All @@ -33,6 +36,28 @@ builds:
goarch:
- amd64
- arm64
- arm
goarm:
- 7
ldflags:
- -s -w

- main: ./builtin/bins/dkron-executor-rabbitmq/
id: dkron-executor-rabbitmq
binary: dkron-executor-rabbitmq
env:
- CGO_ENABLED=0
goos:
- freebsd
- windows
- darwin
- linux
goarch:
- amd64
- arm64
- arm
goarm:
- 7
ldflags:
- -s -w

Expand All @@ -49,6 +74,9 @@ builds:
goarch:
- amd64
- arm64
- arm
goarm:
- 7
ldflags:
- -s -w

Expand All @@ -65,6 +93,9 @@ builds:
goarch:
- amd64
- arm64
- arm
goarm:
- 7
ldflags:
- -s -w

Expand All @@ -81,6 +112,28 @@ builds:
goarch:
- amd64
- arm64
- arm
goarm:
- 7
ldflags:
- -s -w

- main: ./builtin/bins/dkron-processor-fluent/
id: dkron-processor-fluent
binary: dkron-processor-fluent
env:
- CGO_ENABLED=0
goos:
- freebsd
- windows
- darwin
- linux
goarch:
- amd64
- arm64
- arm
goarm:
- 7
ldflags:
- -s -w

Expand All @@ -96,37 +149,41 @@ builds:
goarch:
- amd64
- arm64
- arm
goarm:
- 7
ldflags:
- -s -w -X github.com/distribworks/dkron/v2/dkron.Version={{.Version}}
- -s -w -X github.com/distribworks/dkron/v3/dkron.Version={{.Version}} -X github.com/distribworks/dkron/v3/dkron.Codename=merichuas

nfpm:
vendor: Distributed Works
homepage: https://dkron.io
maintainer: Victor Castell <victor@distrib.works>
description: Distributed, fault tolerant job scheduling system
license: LGPL 3.0

formats:
- deb
- rpm

# Override default /usr/local/bin destination for binaries
bindir: /usr/bin

empty_folders:
- /var/log/dkron

#files:
# "builder/files/": "/etc/init.d"
# "path/**/glob": "/var/foo/glob"
config_files:
"builder/files/dkron.yml": "/etc/dkron/dkron.yml"
"builder/files/dkron.service": "/lib/systemd/system/dkron.service"

overrides:
rpm:
replacements:
amd64: x86_64
nfpms:
-
vendor: Distributed Works
homepage: https://dkron.io
maintainer: Victor Castell <victor@distrib.works>
description: Distributed, fault tolerant job scheduling system
license: LGPL 3.0

formats:
- deb
- rpm

# Override default /usr/local/bin destination for binaries
bindir: /usr/bin

empty_folders:
- /var/log/dkron

#files:
# "builder/files/": "/etc/init.d"
# "path/**/glob": "/var/foo/glob"
config_files:
"builder/files/dkron.yml": "/etc/dkron/dkron.yml"
"builder/files/dkron.service": "/lib/systemd/system/dkron.service"

overrides:
rpm:
replacements:
amd64: x86_64

snapshot:
name_template: "{{ .Tag }}-next"
Expand All @@ -138,18 +195,3 @@ changelog:
- '^docs:'
- '^test:'
- '^Merge pull request'

dockers:
-
dockerfile: Dockerfile.hub
binaries:
- dkron
- dkron-executor-http
- dkron-executor-shell
- dkron-processor-syslog
- dkron-processor-log
- dkron-processor-files
image_templates:
- "dkron/dkron:latest"
- "dkron/dkron:{{ .Tag }}"
- "dkron/dkron:v{{ .Major }}"

0 comments on commit 54c2c23

Please sign in to comment.