fail2ban-prometheus-exporter/.gitlab-ci.yml

55 lines
868 B
YAML
Raw Normal View History

2021-02-05 23:49:47 +01:00
image: golang:latest
before_script:
- make go/dependencies
2021-02-05 23:49:47 +01:00
stages:
- test
- build
2021-02-05 23:49:47 +01:00
dependencies:
stage: test
script:
- make go/checkDependencies
2021-02-05 23:49:47 +01:00
format:
stage: test
script:
- make go/checkFmt
2021-02-05 23:49:47 +01:00
test:
stage: test
script:
- make go/test
build:
stage: build
only:
- main
- tags
script:
- git fetch --tags
- make build/snapshot
artifacts:
paths:
- dist/*.tar.gz
- dist/checksums.txt
expire_in: 1 day
docker/gitlab:
stage: build
only:
- main
- tags
image: docker:stable
services:
- docker:dind
before_script:
- apk add git
- apk add make
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
script:
- make docker/build/latest
- make docker/build/tag
- docker push registry.gitlab.com/hectorjsmith/fail2ban-prometheus-exporter