Skip to content

Commit

Permalink
add build to .goreleaser.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nautsimon committed Oct 24, 2023
1 parent 61ca558 commit 4f0ef6c
Showing 1 changed file with 57 additions and 1 deletion.
58 changes: 57 additions & 1 deletion services/sinner/.goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,28 @@ monorepo:

# for now, this is a library release
builds:
- skip: true
# Linux AMD64
- id: sinner
binary: sinner
ldflags:
# We need to build a static binary because we are building in a glibc based system and running in a musl container
- -s -w -extldflags "-static"
# required workaround for https://github.com/Shopify/sarama/issues/2206
# See: https://github.com/golang/go/issues/35067#issuecomment-544805311 because we're statically compiling,
# without forcing netgo, we use the cgo resolver which will not work for .local (a canonical tld in kubernetes)
# the other way to resolve this would be to modify the nsswitch.conf in the container, but that's a bit less clean.
# osusergo was included as a recommendation here: https://github.com/kubernetes/kubernetes/pull/114225#issuecomment-1348920040
tags:
- netgo
- osusergo
env:
- CC=gcc
- CXX=g++
main: main.go
goos:
- linux
goarch:
- amd64

# add a source archive at release time
source:
Expand Down Expand Up @@ -35,3 +56,38 @@ checksum:
# Add a changelog
changelog:
sort: asc



dockers:
# Docker AMD64
- goos: linux
goarch: amd64
image_templates:
- 'ghcr.io/synapsecns/sanguine/sinner:latest'
- 'ghcr.io/synapsecns/sanguine/sinner:{{ .FullCommit }}'
- 'ghcr.io/synapsecns/sanguine/sinner:{{ .Tag }}'
build_flag_templates:
- '--label=org.opencontainers.image.created={{.Date}}'
- '--label=org.opencontainers.image.name={{.ProjectName}}'
- '--label=org.opencontainers.image.revision={{.FullCommit}}'
- '--label=org.opencontainers.image.version={{.Version}}'
- '--label=org.opencontainers.image.source={{.GitURL}}'
dockerfile: ../../docker/sinner.Dockerfile
ids:
- sinner

# track sizes
report_sizes: true

# modified timestamps
metadata:
# Set the modified timestamp on the metadata files.
#
# Templates: allowed.
mod_timestamp: '{{ .CommitTimestamp }}'

# produce software bill of lading
sboms:
- artifacts: archive

0 comments on commit 4f0ef6c

Please sign in to comment.