-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a0c1a23
commit 70ff3f7
Showing
5 changed files
with
134 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,5 +18,6 @@ jobs: | |
uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
file: "./Dockerfile.dev" | ||
tags: | | ||
odpf/columbus:dev |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*.*.*' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '^1.16' | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: docker.io | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2.6.1 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GO_RELEASER_TOKEN }} |
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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
project_name: columbus | ||
|
||
release: | ||
prerelease: auto | ||
draft: true | ||
|
||
before: | ||
hooks: | ||
- go mod tidy | ||
- make clean | ||
|
||
builds: | ||
- main: ./main.go | ||
binary: columbus | ||
flags: [-a] | ||
ldflags: | ||
- -X github.com/odpf/columbus/cmd.Version={{.Tag}} | ||
- -X github.com/odpf/columbus/cmd.BuildCommit={{.FullCommit}} | ||
- -X github.com/odpf/columbus/cmd.BuildDate={{.Date}} | ||
goos: [linux, darwin, windows] | ||
goarch: [amd64, 386, arm, arm64] # skip goarch 386 and arm due to conflicts with "github.com/blastrain/vitess-sqlparser" library | ||
env: | ||
- CGO_ENABLED=0 | ||
|
||
archives: | ||
- replacements: | ||
darwin: macos | ||
linux: linux | ||
windows: windows | ||
386: i386 | ||
amd64: x86_64 | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
|
||
checksum: | ||
name_template: 'checksums.txt' | ||
|
||
snapshot: | ||
name_template: "{{ .Tag }}-next" | ||
|
||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- '^docs:' | ||
- '^test:' | ||
- '^build:' | ||
|
||
dockers: | ||
- | ||
goos: linux | ||
goarch: amd64 | ||
ids: | ||
- linux | ||
dockerfile: Dockerfile | ||
image_templates: | ||
- 'docker.io/odpf/{{.ProjectName}}:latest' | ||
- 'docker.io/odpf/{{.ProjectName}}:{{ .Version }}' | ||
- 'docker.io/odpf/{{.ProjectName}}:{{ .Version }}-amd64' | ||
|
||
brews: | ||
- name: columbus | ||
homepage: "https://github.com/odpf/columbus" | ||
description: "Metadata Discovery and Lineage Service" | ||
tap: | ||
owner: odpf | ||
name: homebrew-taps | ||
license: "Apache 2.0" | ||
folder: Formula | ||
|
||
dependencies: | ||
- name: git | ||
install: |- | ||
bin.install "columbus" | ||
commit_author: | ||
name: Ravi Suhag | ||
email: suhag.ravi@gmail.com | ||
|
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,15 +1,7 @@ | ||
FROM golang:1.16-stretch as base | ||
WORKDIR /build/ | ||
COPY . . | ||
RUN ["make"] | ||
|
||
FROM alpine:latest | ||
WORKDIR /opt/columbus | ||
COPY --from=base /build/columbus /opt/columbus/bin/columbus | ||
RUN ["apk", "update"] | ||
EXPOSE 8080 | ||
|
||
# glibc compatibility library, since go binaries | ||
# don't work well with musl libc that alpine uses | ||
RUN ["apk", "add", "libc6-compat"] | ||
ENTRYPOINT ["/opt/columbus/bin/columbus"] | ||
COPY columbus /usr/bin/columbus | ||
RUN apk update | ||
RUN apk add ca-certificates | ||
|
||
CMD ["columbus"] |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM golang:1.16-stretch as base | ||
WORKDIR /build/ | ||
COPY . . | ||
RUN ["make"] | ||
|
||
FROM alpine:latest | ||
WORKDIR /opt/columbus | ||
COPY --from=base /build/columbus /opt/columbus/bin/columbus | ||
RUN ["apk", "update"] | ||
EXPOSE 8080 | ||
|
||
# glibc compatibility library, since go binaries | ||
# don't work well with musl libc that alpine uses | ||
RUN ["apk", "add", "libc6-compat"] | ||
ENTRYPOINT ["/opt/columbus/bin/columbus"] |