File: .goreleaser.yml

package info (click to toggle)
prometheus-mqtt-exporter 0.1.7-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid, trixie
  • size: 460 kB
  • sloc: sh: 77; makefile: 60
file content (188 lines) | stat: -rw-r--r-- 5,482 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
  hooks:
    # You may remove this if you don't use go modules.
    - go mod download
    # you may remove this if you don't need go generate
    - go generate ./...
release:
  prerelease: auto
builds:
- env:
    - CGO_ENABLED=0
  main: cmd/mqtt2prometheus.go
  # GOOS list to build for.
  # For more info refer to: https://golang.org/doc/install/source#environment
  # Defaults are darwin and linux.
  goos:
    - linux
    - darwin
    - freebsd
    - windows

  # GOARCH to build for.
  # For more info refer to: https://golang.org/doc/install/source#environment
  # Defaults are 386 and amd64.
  goarch:
    - amd64
    - arm
    - arm64
    - 386

  # GOARM to build for when GOARCH is arm.
  # For more info refer to: https://golang.org/doc/install/source#environment
  # Default is only 6.
  goarm:
    - 5
    - 6
    - 7

  # GOMIPS and GOMIPS64 to build when GOARCH is mips, mips64, mipsle or mips64le.
  # For more info refer to: https://golang.org/doc/install/source#environment
  # Default is empty.
  gomips:
    - hardfloat
    - softfloat
archives:
- replacements:
    darwin: Darwin
    linux: Linux
    windows: Windows
    386: i386
    amd64: x86_64
checksum:
  name_template: 'checksums.txt'
snapshot:
  name_template: "{{ .Tag }}-next"
changelog:
  sort: asc
  filters:
    exclude:
    - '^docs:'
    - '^test:'
    - '^ci:'

nfpms:
  - id: default
    vendor: Christoph Petrausch
    homepage: https://github.com/hikhvar/mqtt2prometheus
    description: This exporter translates from MQTT topics to prometheus metrics.
    license: MIT License
    formats:
      - deb
      - rpm
      - apk
    conflicts:
      - prometheus-mqtt-exporter
    scripts:
      postinstall: systemd/postinstall.sh
    contents:
      # Simple config file
      - src: config.yaml.dist
        dst: /etc/mqtt2prometheus/config.yaml
        type: config
      - src: ./systemd/mqtt2prometheus.service
        dst: /etc/systemd/system/mqtt2prometheus.service
        type: config


dockers:

  - dockerfile: release/Dockerfile.scratch
    goos: linux
    goarch: amd64
    use: buildx
    build_flag_templates:
      - "--platform=linux/amd64"
    image_templates:
      - "hikhvar/mqtt2prometheus:{{ .Tag }}-amd64"
      - "hikhvar/mqtt2prometheus:latest-amd64"
      - "ghcr.io/hikhvar/mqtt2prometheus:{{ .Tag }}-amd64"
      - "ghcr.io/hikhvar/mqtt2prometheus:latest-amd64"

  - dockerfile: release/Dockerfile.scratch
    goos: linux
    goarch: arm64
    use: buildx
    build_flag_templates:
      - "--platform=linux/arm64"
    image_templates:
      - "hikhvar/mqtt2prometheus:{{ .Tag }}-arm64"
      - "hikhvar/mqtt2prometheus:latest-arm64"
      - "ghcr.io/hikhvar/mqtt2prometheus:{{ .Tag }}-arm64"
      - "ghcr.io/hikhvar/mqtt2prometheus:latest-arm64"


  - dockerfile: release/Dockerfile.scratch
    goos: linux
    goarch: arm
    goarm: 6
    use: buildx
    build_flag_templates:
      - "--platform=linux/arm/v6"
    image_templates:
      - "hikhvar/mqtt2prometheus:{{ .Tag }}-arm6"
      - "hikhvar/mqtt2prometheus:latest-arm6"
      - "ghcr.io/hikhvar/mqtt2prometheus:{{ .Tag }}-arm6"
      - "ghcr.io/hikhvar/mqtt2prometheus:latest-arm6"

  - dockerfile: release/Dockerfile.scratch
    goos: linux
    goarch: arm
    goarm: 7
    use: buildx
    build_flag_templates:
      - "--platform=linux/arm/v7"
    image_templates:
      - "hikhvar/mqtt2prometheus:{{ .Tag }}-arm7"
      - "hikhvar/mqtt2prometheus:latest-arm7"
      - "ghcr.io/hikhvar/mqtt2prometheus:{{ .Tag }}-arm7"
      - "ghcr.io/hikhvar/mqtt2prometheus:latest-arm7"

  - dockerfile: release/Dockerfile.scratch
    goos: linux
    goarch: 386
    use: buildx
    build_flag_templates:
      - "--platform=linux/386"
    image_templates:
      - "hikhvar/mqtt2prometheus:{{ .Tag }}-386"
      - "hikhvar/mqtt2prometheus:latest-386"
      - "ghcr.io/hikhvar/mqtt2prometheus:{{ .Tag }}-386"
      - "ghcr.io/hikhvar/mqtt2prometheus:latest-386"

docker_manifests:
  # Docker Registry
  - name_template: hikhvar/mqtt2prometheus:{{ .Tag }}
    image_templates:
      - "hikhvar/mqtt2prometheus:{{ .Tag }}-amd64"
      - "hikhvar/mqtt2prometheus:{{ .Tag }}-arm64"
      - "hikhvar/mqtt2prometheus:{{ .Tag }}-arm6"
      - "hikhvar/mqtt2prometheus:{{ .Tag }}-arm7"
      - "hikhvar/mqtt2prometheus:{{ .Tag }}-386"

  - name_template: hikhvar/mqtt2prometheus:latest
    image_templates:
      - "hikhvar/mqtt2prometheus:latest-amd64"
      - "hikhvar/mqtt2prometheus:latest-arm64"
      - "hikhvar/mqtt2prometheus:latest-arm6"
      - "hikhvar/mqtt2prometheus:latest-arm7"
      - "hikhvar/mqtt2prometheus:latest-386"

  # Github Registry
  - name_template: ghcr.io/hikhvar/mqtt2prometheus:{{ .Tag }}
    image_templates:
      - "ghcr.io/hikhvar/mqtt2prometheus:{{ .Tag }}-amd64"
      - "ghcr.io/hikhvar/mqtt2prometheus:{{ .Tag }}-arm64"
      - "ghcr.io/hikhvar/mqtt2prometheus:{{ .Tag }}-arm6"
      - "ghcr.io/hikhvar/mqtt2prometheus:{{ .Tag }}-arm7"
      - "ghcr.io/hikhvar/mqtt2prometheus:{{ .Tag }}-386"

  - name_template: ghcr.io/hikhvar/mqtt2prometheus:latest
    image_templates:
      - "ghcr.io/hikhvar/mqtt2prometheus:latest-amd64"
      - "ghcr.io/hikhvar/mqtt2prometheus:latest-arm64"
      - "ghcr.io/hikhvar/mqtt2prometheus:latest-arm6"
      - "ghcr.io/hikhvar/mqtt2prometheus:latest-arm7"
      - "ghcr.io/hikhvar/mqtt2prometheus:latest-386"