From 9de2fe131fc5b4c4d5716ee7f992c97d186290a0 Mon Sep 17 00:00:00 2001 From: Markus Pesch Date: Sun, 9 Jul 2023 12:57:41 +0200 Subject: [PATCH] fix(ci): remove gitlab-ci --- .gitlab-ci.yml | 78 -------------------------------------------------- 1 file changed, 78 deletions(-) delete mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 33a5442..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,78 +0,0 @@ -stages: - - test - - build - - release - -.go_template: - image: golang:latest - -sast: - stage: test - -include: -- template: Security/SAST.gitlab-ci.yml -- template: Security/Dependency-Scanning.gitlab-ci.yml - -format: - extends: .go_template - stage: test - script: - - make check/fmt - -vet: - extends: .go_template - stage: test - allow_failure: true - script: - - make vet - -test: - extends: .go_template - stage: test - script: - - make test - -build: - extends: .go_template - stage: build - script: - - make build - artifacts: - paths: - - fail2ban_exporter - expire_in: 1 day - -release: - stage: release - image: docker:stable - services: - - docker:dind - variables: - DOCKER_REGISTRY: $CI_REGISTRY - DOCKER_USERNAME: $CI_REGISTRY_USER - DOCKER_PASSWORD: $CI_REGISTRY_PASSWORD - GIT_DEPTH: 0 - rules: - - if: $CI_COMMIT_TAG =~ /^v.*$/ - script: | - docker run --rm --privileged \ - -v $PWD:/go/src/gitlab.com/hectorjsmith/fail2ban-prometheus-exporter \ - -w /go/src/gitlab.com/hectorjsmith/fail2ban-prometheus-exporter \ - -v /var/run/docker.sock:/var/run/docker.sock \ - -e DOCKER_USERNAME -e DOCKER_PASSWORD -e DOCKER_REGISTRY \ - -e GITLAB_TOKEN \ - goreleaser/goreleaser release --clean - -tag images: - stage: release - image: docker:stable - services: - - docker:dind - needs: - - release - rules: - - if: $CI_COMMIT_TAG =~ /^v\d+\.\d+\.\d+$/ - variables: - IMAGE_NAME: registry.gitlab.com/hectorjsmith/fail2ban-prometheus-exporter - script: - - ./.gitlab-ci/tagLatestImage.sh