Skip to content

Commit

Permalink
Initial import after cookiecutter
Browse files Browse the repository at this point in the history
  • Loading branch information
riton committed Sep 5, 2021
0 parents commit a224b77
Show file tree
Hide file tree
Showing 7 changed files with 795 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
stages:
- build
- package

build:
image: golang:latest
stage: build
variables:
GOOS: "linux"
GOFLAGS: "-mod=vendor"
script:
- go test -v -cover -race ./...
- CGO_ENABLED=0 go build -a -ldflags "-s -w -extldflags '-static'" -o nagios-plugin-git-hosted-project-merge-requests .
artifacts:
expire_in: '1 hour'
paths:
- nagios-plugin-git-hosted-project-merge-requests

package:
image: gitlab-registry.in2p3.fr/cc-in2p3/docker-fpm:latest
stage: package
script:
- mkdir -p usr/lib64/nagios/plugins etc/nagios-plugin-git-hosted-project-merge-requests
- install -m 0755 nagios-plugin-git-hosted-project-merge-requests usr/lib64/nagios/plugins
- install -m 0644 packaging/etc/nagios-plugin-git-hosted-project-merge-requests/config.yaml etc/nagios-plugin-git-hosted-project-merge-requests/
- fpm -s dir -t rpm --license "CECILL-B" --no-rpm-autoreqprov -n "nagios-plugin-git-hosted-project-merge-requests" -v "$(git describe --always --tags HEAD | sed 's/^v//')" --url "${CI_PROJECT_URL}" --description "Checks that a github / gitlab / gitea project has opened merge requests" --maintainer "Remi Ferrand <[email protected]>" --config-files ./etc ./usr ./etc
dependencies:
- build
artifacts:
expire_in: '1 hour'
paths:
- "*.rpm"
Loading

0 comments on commit a224b77

Please sign in to comment.