2021-02-05 23:49:47 +01:00
|
|
|
stages:
|
|
|
|
- test
|
2021-02-07 11:51:43 +01:00
|
|
|
- build
|
2021-02-05 23:49:47 +01:00
|
|
|
|
2022-02-12 18:31:01 +01:00
|
|
|
.go_template:
|
|
|
|
image: golang:latest
|
|
|
|
|
2023-06-19 20:37:27 +02:00
|
|
|
# .docker_template:
|
|
|
|
# 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
|
2022-02-12 18:31:01 +01:00
|
|
|
|
2021-10-17 19:39:02 +02:00
|
|
|
dependencies:
|
2022-02-12 18:31:01 +01:00
|
|
|
extends: .go_template
|
2021-10-17 19:39:02 +02:00
|
|
|
stage: test
|
|
|
|
script:
|
2023-06-19 20:37:27 +02:00
|
|
|
- make check/dependencies
|
2021-10-17 19:39:02 +02:00
|
|
|
|
2021-02-05 23:49:47 +01:00
|
|
|
format:
|
2022-02-12 18:31:01 +01:00
|
|
|
extends: .go_template
|
2021-02-05 23:49:47 +01:00
|
|
|
stage: test
|
|
|
|
script:
|
2023-06-19 20:37:27 +02:00
|
|
|
- make check/fmt
|
2021-02-05 23:49:47 +01:00
|
|
|
|
|
|
|
test:
|
2022-02-12 18:31:01 +01:00
|
|
|
extends: .go_template
|
2021-02-05 23:49:47 +01:00
|
|
|
stage: test
|
|
|
|
script:
|
2023-06-19 20:37:27 +02:00
|
|
|
- make test
|
|
|
|
|
|
|
|
build:
|
|
|
|
extends: .go_template
|
|
|
|
stage: build
|
|
|
|
script:
|
|
|
|
- make build
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- fail2ban_exporter
|
|
|
|
expire_in: 1 day
|
2021-02-07 11:51:43 +01:00
|
|
|
|
2023-06-19 19:50:28 +02:00
|
|
|
# build:
|
|
|
|
# extends: .go_template
|
|
|
|
# stage: build
|
|
|
|
# only:
|
|
|
|
# - main
|
|
|
|
# - tags
|
|
|
|
# script:
|
|
|
|
# - git fetch --tags
|
|
|
|
# - make build/snapshot
|
|
|
|
# artifacts:
|
|
|
|
# paths:
|
|
|
|
# - dist/*.tar.gz
|
|
|
|
# - dist/checksums.txt
|
|
|
|
# expire_in: 1 day
|
2021-02-08 21:00:27 +01:00
|
|
|
|
2023-06-19 20:37:27 +02:00
|
|
|
# docker/gitlab:
|
|
|
|
# extends: .docker_template
|
|
|
|
# stage: build
|
|
|
|
# only:
|
|
|
|
# - tags
|
|
|
|
# script:
|
|
|
|
# - make docker/build/latest
|
|
|
|
# - make docker/build/tag
|
|
|
|
# - docker push registry.gitlab.com/hectorjsmith/fail2ban-prometheus-exporter
|
2022-02-12 18:31:01 +01:00
|
|
|
|
2023-06-19 20:37:27 +02:00
|
|
|
# docker/gitlab/nightly:
|
|
|
|
# extends: .docker_template
|
|
|
|
# stage: build
|
|
|
|
# only:
|
|
|
|
# - main
|
|
|
|
# script:
|
|
|
|
# - make docker/build/nightly
|
|
|
|
# - docker push registry.gitlab.com/hectorjsmith/fail2ban-prometheus-exporter
|