forked from jpillora/chisel
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(RDGRS-662): build image * feat(RDGRS-662): restore test CI and dependabot * feat(RDGRS-662): test CI only on linux * feat(RDGRS-662): add version to goreleaser
- Loading branch information
1 parent
31fe917
commit 22e6564
Showing
6 changed files
with
48 additions
and
130 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,16 +1,3 @@ | ||
# build stage | ||
FROM golang:alpine AS build | ||
RUN apk update && apk add git | ||
ADD . /src | ||
WORKDIR /src | ||
ENV CGO_ENABLED 0 | ||
RUN go build \ | ||
-ldflags "-X github.com/jpillora/chisel/share.BuildVersion=$(git describe --abbrev=0 --tags)" \ | ||
-o /tmp/bin | ||
# run stage | ||
FROM scratch | ||
LABEL maintainer="[email protected]" | ||
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | ||
WORKDIR /app | ||
COPY --from=build /tmp/bin /app/bin | ||
ENTRYPOINT ["/app/bin"] | ||
FROM alpine | ||
COPY chisel /app/ | ||
ENTRYPOINT ["/app/chisel"] |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# test this goreleaser config with: | ||
# - cd chisel | ||
# - goreleaser --clean --snapshot --config goreleaser.yml | ||
version: 2 | ||
project_name: chisel | ||
before: | ||
hooks: | ||
- go mod tidy | ||
- go generate ./... | ||
builds: | ||
- env: | ||
- CGO_ENABLED=0 | ||
ldflags: | ||
- -s -w -X github.com/outsystems/chisel/share.BuildVersion={{.Version}} | ||
flags: | ||
- -trimpath | ||
goos: | ||
- linux | ||
dockers: | ||
- image_templates: | ||
- "ghcr.io/outsystems/{{ .ProjectName }}:{{ .Version }}" | ||
- "ghcr.io/outsystems/{{ .ProjectName }}:latest" | ||
build_flag_templates: | ||
- --platform=linux/amd64 | ||
- --label=org.opencontainers.image.title=OutSystems Chisel | ||
- --label=org.opencontainers.image.description=OutSystems Chisel | ||
- --label=org.opencontainers.image.url=https://github.com/outsystems/chisel | ||
- --label=org.opencontainers.image.source=https://github.com/outsystems/chisel | ||
- --label=org.opencontainers.image.version={{ .Version }} | ||
- --label=org.opencontainers.image.created={{ .Date }} | ||
- --label=org.opencontainers.image.revision={{ .FullCommit }} | ||
checksum: | ||
name_template: 'checksums.txt' | ||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
changelog: | ||
sort: asc | ||
filters: | ||
exclude: | ||
- "^docs:" | ||
- "^test:" |