Skip to content

Commit 2b774c5

Browse files
committed
feat: version 1.0.0
Signed-off-by: Martin Chodur <[email protected]>
1 parent 14114c9 commit 2b774c5

25 files changed

+344
-541
lines changed

.circleci/config.yml

-87
This file was deleted.

.github/workflows/go.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Go
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Set up Go
17+
uses: actions/setup-go@v2
18+
with:
19+
go-version: 1.17
20+
21+
- name: Build
22+
run: go build -v ./...
23+
24+
- name: Test
25+
run: go test -v ./...

.github/workflows/release.yaml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
2+
name: goreleaser
3+
4+
on:
5+
push:
6+
tags:
7+
- '*'
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
goreleaser:
14+
runs-on: ubuntu-latest
15+
steps:
16+
-
17+
name: Checkout
18+
uses: actions/checkout@v2
19+
with:
20+
fetch-depth: 0
21+
-
22+
name: Set up Go
23+
uses: actions/setup-go@v2
24+
with:
25+
go-version: 1.17
26+
27+
- name: Login to Docker Hub
28+
uses: docker/login-action@v1
29+
with:
30+
username: ${{ secrets.DOCKERHUB_USERNAME }}
31+
password: ${{ secrets.DOCKERHUB_TOKEN }}
32+
-
33+
name: Run GoReleaser
34+
uses: goreleaser/goreleaser-action@v2
35+
with:
36+
distribution: goreleaser
37+
version: latest
38+
args: release --rm-dist
39+
env:
40+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@
1313
# Output of the go coverage tool, specifically when used with LiteIDE
1414
*.out
1515
.build
16+
dist/
1617

1718
# Dependency directories (remove the comment below to include it)
1819
# vendor/
1920

2021
/conf/*.token
21-
/prometheus-gitlab-notifier
22+
/prometheus-gitlab-notifier/cmd/prometheus-gitlab-notifier
2223

.golangci.yml

-6
This file was deleted.

.goreleaser.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# This is an example .goreleaser.yml file with some sensible defaults.
2+
# Make sure to check the documentation at https://goreleaser.com
3+
project_name: prometheus-gitlab-notifier
4+
before:
5+
hooks:
6+
- go mod tidy
7+
8+
builds:
9+
- main: "./cmd/{{.ProjectName}}"
10+
env:
11+
- CGO_ENABLED=0
12+
goos:
13+
- linux
14+
15+
dockers:
16+
- image_templates:
17+
- "fusakla/{{.ProjectName}}:latest"
18+
- "fusakla/{{.ProjectName}}:{{ .Tag }}"
19+
- "fusakla/{{.ProjectName}}:v{{ .Major }}"
20+
- "fusakla/{{.ProjectName}}:v{{ .Major }}.{{ .Minor }}"
21+
22+
archives:
23+
- replacements:
24+
linux: Linux
25+
amd64: x86_64
26+
27+
checksum:
28+
name_template: 'checksums.txt'
29+
30+
snapshot:
31+
name_template: "{{ incpatch .Version }}-next"
32+
33+
changelog:
34+
sort: asc
35+
filters:
36+
exclude:
37+
- '^docs:'
38+
- '^test:'
39+
- '^chore:'

.promu.yml

-25
This file was deleted.

CHANGELOG.md

+15
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,22 @@
11

22
## Unreleased
3+
4+
## 1.0.0 / 2022-01-18
5+
6+
### Fixed
7+
- Fixed alert template loading
8+
9+
### Added
10+
- support for templating functions from [the sprig library](https://github.com/Masterminds/sprig)
11+
- default value for the gitlab.url flag pointing to `https://gtilab.com`
12+
- new flag `--log.json` to enable JSON logging
13+
314
### Changed
415
- prometheus and alertmanager dependency versions
16+
- Upgraded to Go 1.17
17+
- Migrated to goreleaser
18+
- Switched to logrus library, default log format has changed
19+
- Default issue template is now embedded in the binary
520

621
## 0.7.0 / 2019-08-13
722

Dockerfile

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,11 @@
1-
FROM quay.io/prometheus/busybox:latest
1+
FROM alpine:3.15.0
22
LABEL maintainer="FUSAKLA Martin Chodúr <[email protected]>"
33

44

5-
ARG ARCH="amd64"
6-
ARG OS="linux"
7-
COPY --chown=nobody:nogroup .build/${OS}-${ARCH}/prometheus-gitlab-notifier /bin/prometheus-gitlab-notifier
8-
COPY --chown=nobody:nogroup conf/default_issue.tmpl /prometheus-gitlab-notifier/conf/
5+
COPY --chown=nobody:nogroup prometheus-gitlab-notifier /usr/bin/
96
COPY --chown=nobody:nogroup Dockerfile /
107

118
EXPOSE 9629
12-
RUN mkdir -p /prometheus-gitlab-notifier && chown nobody:nogroup /prometheus-gitlab-notifier
13-
WORKDIR /prometheus-gitlab-notifier
14-
159
USER 65534
1610

17-
ENTRYPOINT ["/bin/prometheus-gitlab-notifier"]
11+
ENTRYPOINT ["/usr/bin/prometheus-gitlab-notifier"]

Makefile

-23
This file was deleted.

0 commit comments

Comments
 (0)