-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from knadh/rebrand
This merge commit brings a series of major changes to sql-jobber. - The project is rebranded to DungBeetle. - The internals are refactored and some, fully rewritten. - The underlying distributed tasks library is switched from `machinery` to `tasqueue`. Co-authored-by: Kailash Nadh <[email protected]> Co-authored-by: Lakshay Kalbhor <[email protected]>
- Loading branch information
Showing
29 changed files
with
1,773 additions
and
1,892 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
config_test.toml | ||
# binary file produced by `make build`. | ||
sql-jobber | ||
dungbeetle |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ before: | |
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
binary: sql-jobber | ||
binary: dungbeetle | ||
goos: | ||
- windows | ||
- darwin | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
FROM golang:1.12-alpine AS builder | ||
FROM golang:1.21-alpine AS builder | ||
RUN apk update && apk add make git | ||
WORKDIR /sql-jobber/ | ||
WORKDIR /dungbeetle/ | ||
COPY ./ ./ | ||
ENV CGO_ENABLED=0 GOOS=linux | ||
RUN make build | ||
|
||
FROM alpine:latest AS deploy | ||
RUN apk --no-cache add ca-certificates | ||
COPY --from=builder /sql-jobber/sql-jobber ./ | ||
COPY --from=builder /sql-jobber/sql ./ | ||
COPY --from=builder /dungbeetle/dungbeetle ./ | ||
COPY --from=builder /dungbeetle/sql ./ | ||
RUN mkdir -p /opt/config | ||
COPY --from=builder /sql-jobber/config.toml.sample /opt/config/sql-jobber.toml | ||
COPY --from=builder /dungbeetle/config.toml.sample /opt/config/dungbeetle.toml | ||
|
||
VOLUME ["/opt/config/"] | ||
|
||
CMD ["./sql-jobber", "--config", "/opt/config/sql-jobber.toml"] | ||
CMD ["./dungbeetle", "--config", "/opt/config/dungbeetle.toml"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,36 @@ | ||
LAST_COMMIT := $(shell git rev-parse --short HEAD) | ||
LAST_COMMIT_DATE := $(shell git show -s --format=%ci ${LAST_COMMIT}) | ||
VERSION := $(shell git describe --abbrev=1) | ||
|
||
BUILDSTR := ${VERSION} (build "\\\#"${LAST_COMMIT} $(shell date '+%Y-%m-%d %H:%M:%S')) | ||
|
||
BIN := sql-jobber | ||
GOPATH ?= $(HOME)/go | ||
|
||
BIN := dungbeetle | ||
|
||
.PHONY: build | ||
build: | ||
# Compile the main application. | ||
go build -o ${BIN} -ldflags="-s -w -X 'main.buildString=${BUILDSTR}'" ./cmd/ | ||
build: $(BIN) | ||
|
||
$(BIN): $(shell find . -type f -name "*.go") | ||
CGO_ENABLED=0 go build -o ${BIN} -ldflags="-s -w -X 'main.buildString=${BUILDSTR}'" ./cmd/*.go | ||
|
||
.PHONY: run | ||
run: | ||
CGO_ENABLED=0 go run -ldflags="-s -w -X 'main.buildString=${BUILDSTR}'" ./cmd | ||
|
||
.PHONY: dist | ||
dist: build | ||
|
||
# Run tests in sequence | ||
.PHONY: test | ||
test: | ||
go test | ||
go test ./... -v -p 1 | ||
|
||
# Use goreleaser to do a dry run producing local builds. | ||
.PHONY: release-dry | ||
release-dry: | ||
goreleaser --parallelism 1 --rm-dist --snapshot --skip-validate --skip-publish | ||
|
||
.PHONY: clean | ||
clean: | ||
go clean | ||
- rm -f ${BIN} | ||
# Use goreleaser to build production releases and publish them. | ||
.PHONY: release | ||
release: | ||
goreleaser --parallelism 1 --rm-dist --skip-validate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.