1
0
mirror of https://github.com/nginxinc/nginx-prometheus-exporter.git synced 2025-07-31 21:04:21 +03:00

Prometheus exporter ci (#84)

* Add CI for prometheus-exporter
This commit is contained in:
David Boenig
2020-02-18 11:54:32 +00:00
committed by GitHub
parent eb956e2ca6
commit 1f833f91ea
4 changed files with 17 additions and 4 deletions

14
build/Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM golang:1.13 as builder
ARG VERSION
ARG GIT_COMMIT
WORKDIR /go/src/github.com/nginxinc/nginx-prometheus-exporter
COPY *.go ./
COPY vendor ./vendor
COPY go.mod go.sum ./
COPY collector ./collector
COPY client ./client
RUN GO111MODULE=on CGO_ENABLED=0 GOOS=linux go build -mod=vendor -a -installsuffix cgo -ldflags "-X main.version=${VERSION} -X main.gitCommit=${GIT_COMMIT}" -o exporter .
FROM alpine:latest
COPY --from=builder /go/src/github.com/nginxinc/nginx-prometheus-exporter/exporter /usr/bin/
ENTRYPOINT [ "/usr/bin/exporter" ]

7
build/ci/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,7 @@
node {
git(
url: "${libsLocation}",
credentialsId: "${githubCreds}"
)
load 'nginx-prometheus-exporter/Jenkinsfile'
}