Skip to content

Commit

Permalink
Merge branch '4.x' into light
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Castell committed Dec 12, 2023
2 parents 8b6340a + 4dcd2c7 commit 0befd66
Show file tree
Hide file tree
Showing 535 changed files with 46,386 additions and 51,195 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ website
dkron-*
main
*.data
node_modules
70 changes: 70 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '30 13 * * 2'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'go', 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.16
uses: actions/setup-go@v1
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.16
go-version: 1.21
id: go

- name: Check out code into the Go module directory
Expand Down
49 changes: 7 additions & 42 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,55 +18,20 @@ jobs:
with:
fetch-depth: 0

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

- name: Prepare
id: prepare
run: |
TAG=${GITHUB_REF#refs/tags/}
echo ::set-output name=tag_name::${TAG}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v1
with:
version: latest
args: release --rm-dist --timeout=1h
run: |
make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ steps.prepare.outputs.tag_name }}

- name: set up buildx
id: buildx
uses: docker/setup-buildx-action@v1

- 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 \
.
- name: build (and publish) light 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 }}-light \
-f Dockerfile.light.hub \
.
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
18 changes: 18 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,21 @@ node_modules
.vscode
tags
.sass-cache
.idea/

# Production
build

# Generated files
.docusaurus
.cache-loader

# Misc
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
93 changes: 79 additions & 14 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ builds:
- arm64
- arm
goarm:
- 7
- '7'
ldflags:
- -s -w

Expand Down Expand Up @@ -49,6 +49,11 @@ builds:
id: dkron-executor-gcppubsub
binary: dkron-executor-gcppubsub

- <<: *xbuild
main: ./builtin/bins/dkron-executor-grpc/
id: dkron-executor-grpc
binary: dkron-executor-grpc

- <<: *xbuild
main: ./builtin/bins/dkron-processor-files/
id: dkron-processor-files
Expand All @@ -63,7 +68,7 @@ builds:
main: ./builtin/bins/dkron-processor-syslog/
id: dkron-processor-syslog
binary: dkron-processor-syslog

- <<: *xbuild
main: ./builtin/bins/dkron-processor-fluent/
id: dkron-processor-fluent
Expand All @@ -74,7 +79,7 @@ builds:
id: dkron
binary: dkron
ldflags:
- -s -w -X github.com/distribworks/dkron/v3/dkron.Version={{.Version}} -X github.com/distribworks/dkron/v3/dkron.Codename=merichuas
- -s -w -X github.com/distribworks/dkron/v3/dkron.Version={{.Version}} -X github.com/distribworks/dkron/v3/dkron.Codename=Abaniko

nfpms:
-
Expand All @@ -88,27 +93,87 @@ nfpms:
- deb
- rpm

conflicts:
- dkron-pro
replaces:
- dkron-pro

# 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
contents:
- src: builder/files/dkron.yml
dst: /etc/dkron/dkron.yml
type: config
- src: builder/files/dkron.service
dst: /lib/systemd/system/dkron.service
type: config
- dst: /var/log/dkron
type: dir

snapshot:
name_template: "{{ .Tag }}-next"

dockers:
- image_templates:
- dkron/{{ .ProjectName }}:{{ .Version }}-amd64
dockerfile: Dockerfile.release
use: buildx
goos: linux
goarch: amd64
ids: &docker-ids
- dkron
- dkron-executor-http
- dkron-executor-shell
- dkron-executor-rabbitmq
- dkron-executor-nats
- dkron-executor-kafka
- dkron-executor-gcppubsub
- dkron-executor-grpc
- dkron-processor-files
- dkron-processor-log
- dkron-processor-syslog
- dkron-processor-fluent
build_flag_templates:
- --platform=linux/amd64

- image_templates:
- dkron/{{ .ProjectName }}:{{ .Version }}-arm64
dockerfile: Dockerfile.release
use: buildx
goos: linux
goarch: arm64
ids: *docker-ids
build_flag_templates:
- --platform=linux/arm64/v8

- image_templates:
- dkron/{{ .ProjectName }}:{{ .Version }}-armv7
dockerfile: Dockerfile.release
use: buildx
goos: linux
goarch: arm
goarm: '7'
ids: *docker-ids
build_flag_templates:
- --platform=linux/arm/v7

docker_manifests:
- name_template: dkron/{{ .ProjectName }}:{{ .Version }}
image_templates:
- dkron/{{ .ProjectName }}:{{ .Version }}-amd64
- dkron/{{ .ProjectName }}:{{ .Version }}-arm64
- dkron/{{ .ProjectName }}:{{ .Version }}-armv7

- name_template: dkron/{{ .ProjectName }}:latest
image_templates:
- dkron/{{ .ProjectName }}:{{ .Version }}-amd64
- dkron/{{ .ProjectName }}:{{ .Version }}-arm64
- dkron/{{ .ProjectName }}:{{ .Version }}-armv7

changelog:
sort: asc
filters:
Expand Down
Loading

0 comments on commit 0befd66

Please sign in to comment.