-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a224b77
Showing
7 changed files
with
795 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
Oops, something went wrong.