Skip to content

Commit

Permalink
adjust docker build and co.
Browse files Browse the repository at this point in the history
  • Loading branch information
jkroepke committed Oct 22, 2024
1 parent d43cbab commit 5e1f849
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM golang:1.19 AS builder
FROM golang:1.23 AS builder
WORKDIR /go/src/github.com/prometheus-community/jiralert
COPY . /go/src/github.com/prometheus-community/jiralert
RUN GO111MODULE=on GOBIN=/tmp/bin make

FROM quay.io/prometheus/busybox-linux-amd64:latest
FROM gcr.io/distroless/static-debian12:nonroot

COPY --from=builder /go/src/github.com/prometheus-community/jiralert/jiralert /bin/jiralert

Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
DOCKER_REPO ?= quay.io/jiralert
DOCKER_IMAGE_NAME ?= jiralert

.PHONY: build
build:
go build -ldflags "-w -s" -a -tags netgo -o jiralert ./cmd/jiralert

.Phone: docker-build
docker-build:
docker buildx build --no-cache --push -t ghcr.io/cloudeteer/jiralert:$$(git rev-parse --short HEAD) --platform linux/arm64,linux/amd64 .

include Makefile.common
3 changes: 1 addition & 2 deletions pkg/template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/pkg/errors"
"golang.org/x/text/cases"
)

type Template struct {
Expand All @@ -34,7 +33,7 @@ type Template struct {
var funcs = template.FuncMap{
"toUpper": strings.ToUpper,
"toLower": strings.ToLower,
"title": cases.Title,
"title": strings.Title, //nolint:staticcheck // TODO(beorn7): Need to come up with a replacement using the cases package.
// join is equal to strings.Join but inverts the argument order
// for easier pipelining in templates.
"join": func(sep string, s []string) string {
Expand Down

0 comments on commit 5e1f849

Please sign in to comment.