.goreleaser.yml
project_name: prometheus-nginxlog-exporter
builds:
- env:
- CGO_ENABLED=0
- GO111MODULE=on
goos:
- linux
- darwin
goarch:
- amd64
- arm64
ldflags:
- >
-s
-w
-X "github.com/prometheus/common/version.Version={{.Version}}"
{{- if index .Env "GITHUB_REF_NAME" }}
-X "github.com/prometheus/common/version.Branch={{.Env.GITHUB_REF_NAME}}"
-X "github.com/prometheus/common/version.Revision={{.Env.GITHUB_SHA}}"
-X "github.com/prometheus/common/version.BuildUser={{ .Env.BUILD_USER }}"
-X "github.com/prometheus/common/version.BuildDate={{.Env.BUILD_DATE}}"
{{- end }}
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
dockers:
- dockerfile: .goreleaser.Dockerfile
image_templates:
- quay.io/martinhelmich/prometheus-nginxlog-exporter:latest-amd64
- quay.io/martinhelmich/prometheus-nginxlog-exporter:stable-amd64
- quay.io/martinhelmich/prometheus-nginxlog-exporter:v{{ .Major }}-amd64
- quay.io/martinhelmich/prometheus-nginxlog-exporter:v{{ .Major }}.{{ .Minor }}-amd64
- quay.io/martinhelmich/prometheus-nginxlog-exporter:{{ .Tag }}-amd64
- docker.pkg.github.com/martin-helmich/prometheus-nginxlog-exporter/exporter:latest-amd64
- docker.pkg.github.com/martin-helmich/prometheus-nginxlog-exporter/exporter:stable-amd64
- docker.pkg.github.com/martin-helmich/prometheus-nginxlog-exporter/exporter:v{{ .Major }}-amd64
- docker.pkg.github.com/martin-helmich/prometheus-nginxlog-exporter/exporter:v{{ .Major }}.{{ .Minor }}-amd64
- docker.pkg.github.com/martin-helmich/prometheus-nginxlog-exporter/exporter:{{ .Tag }}-amd64
use: buildx
build_flag_templates:
- "--platform=linux/amd64"
- "--build-arg=ARCH=amd64/"
ids:
- prometheus-nginxlog-exporter
goos: linux
goarch: amd64
- dockerfile: .goreleaser.Dockerfile
image_templates:
- quay.io/martinhelmich/prometheus-nginxlog-exporter:latest-arm64
- quay.io/martinhelmich/prometheus-nginxlog-exporter:stable-arm64
- quay.io/martinhelmich/prometheus-nginxlog-exporter:v{{ .Major }}-arm64
- quay.io/martinhelmich/prometheus-nginxlog-exporter:v{{ .Major }}.{{ .Minor }}-arm64
- quay.io/martinhelmich/prometheus-nginxlog-exporter:{{ .Tag }}-arm64
- docker.pkg.github.com/martin-helmich/prometheus-nginxlog-exporter/exporter:latest-arm64
- docker.pkg.github.com/martin-helmich/prometheus-nginxlog-exporter/exporter:stable-arm64
- docker.pkg.github.com/martin-helmich/prometheus-nginxlog-exporter/exporter:v{{ .Major }}-arm64
- docker.pkg.github.com/martin-helmich/prometheus-nginxlog-exporter/exporter:v{{ .Major }}.{{ .Minor }}-arm64
- docker.pkg.github.com/martin-helmich/prometheus-nginxlog-exporter/exporter:{{ .Tag }}-arm64
use: buildx
build_flag_templates:
- "--platform=linux/arm64/v8"
- "--build-arg=ARCH=arm64v8/"
ids:
- prometheus-nginxlog-exporter
goos: linux
goarch: arm64
docker_manifests:
- name_template: quay.io/martinhelmich/prometheus-nginxlog-exporter:latest
image_templates:
- quay.io/martinhelmich/prometheus-nginxlog-exporter:latest-amd64
- quay.io/martinhelmich/prometheus-nginxlog-exporter:latest-arm64
- name_template: quay.io/martinhelmich/prometheus-nginxlog-exporter:stable
image_templates:
- quay.io/martinhelmich/prometheus-nginxlog-exporter:stable-amd64
- quay.io/martinhelmich/prometheus-nginxlog-exporter:stable-arm64
- name_template: quay.io/martinhelmich/prometheus-nginxlog-exporter:v{{ .Major }}
image_templates:
- quay.io/martinhelmich/prometheus-nginxlog-exporter:v{{ .Major }}-amd64
- quay.io/martinhelmich/prometheus-nginxlog-exporter:v{{ .Major }}-arm64
- name_template: quay.io/martinhelmich/prometheus-nginxlog-exporter:v{{ .Major }}.{{ .Minor }}
image_templates:
- quay.io/martinhelmich/prometheus-nginxlog-exporter:v{{ .Major }}.{{ .Minor }}-amd64
- quay.io/martinhelmich/prometheus-nginxlog-exporter:v{{ .Major }}.{{ .Minor }}-arm64
- name_template: quay.io/martinhelmich/prometheus-nginxlog-exporter:{{ .Tag }}
image_templates:
- quay.io/martinhelmich/prometheus-nginxlog-exporter:{{ .Tag }}-amd64
- quay.io/martinhelmich/prometheus-nginxlog-exporter:{{ .Tag }}-arm64
nfpms:
- vendor: Martin Helmich
homepage: https://github.com/martin-helmich/prometheus-nginxlog-exporter
description: Export Prometheus metrics from NGINX (or compatible) log files
license: Apache 2.0
maintainer: Martin Helmich <martin@helmich.me>
formats:
- deb
- rpm
dependencies:
- systemd
bindir: /usr/sbin
contents:
- src: res/package/prometheus-nginxlog-exporter.service
dst: /lib/systemd/system/prometheus-nginxlog-exporter.service
- src: res/package/default-config.hcl
dst: /etc/prometheus-nginxlog-exporter.hcl
type: config|noreplace
scripts:
postinstall: res/package/scripts/postinstall.sh
rpm:
signature:
key_file: /tmp/signing-key
deb:
signature:
key_file: /tmp/signing-key
type: origin