You've already forked nginx_exporter
mirror of
https://github.com/nginxinc/nginx-prometheus-exporter.git
synced 2025-08-05 06:41:09 +03:00
@@ -7,7 +7,7 @@ go:
|
|||||||
script:
|
script:
|
||||||
- echo "Nginx Prometheus Exporter - commit:${TRAVIS_COMMIT}"
|
- echo "Nginx Prometheus Exporter - commit:${TRAVIS_COMMIT}"
|
||||||
- make test
|
- make test
|
||||||
- make container
|
- make container DOCKER_BUILDKIT=0;
|
||||||
before_install:
|
before_install:
|
||||||
- echo "PR Slug:${TRAVIS_PULL_REQUEST_SLUG}"
|
- echo "PR Slug:${TRAVIS_PULL_REQUEST_SLUG}"
|
||||||
- if [[ "${TRAVIS_PULL_REQUEST_SLUG}" == "nginxinc/nginx-prometheus-exporter" || "${TRAVIS_PULL_REQUEST}" == "false" ]]; then
|
- if [[ "${TRAVIS_PULL_REQUEST_SLUG}" == "nginxinc/nginx-prometheus-exporter" || "${TRAVIS_PULL_REQUEST}" == "false" ]]; then
|
||||||
|
12
Makefile
12
Makefile
@@ -1,11 +1,17 @@
|
|||||||
VERSION = 0.5.0
|
VERSION = 0.5.0
|
||||||
PREFIX = nginx/nginx-prometheus-exporter
|
|
||||||
TAG = $(VERSION)
|
TAG = $(VERSION)
|
||||||
|
PREFIX = nginx/nginx-prometheus-exporter
|
||||||
|
|
||||||
|
DOCKERFILEPATH = build
|
||||||
|
DOCKERFILE = Dockerfile
|
||||||
|
|
||||||
GIT_COMMIT = $(shell git rev-parse --short HEAD)
|
GIT_COMMIT = $(shell git rev-parse --short HEAD)
|
||||||
|
|
||||||
BUILD_DIR = build_output
|
BUILD_DIR = build_output
|
||||||
|
|
||||||
nginx-prometheus-exporter: test
|
export DOCKER_BUILDKIT = 1
|
||||||
|
|
||||||
|
nginx-prometheus-exporter:
|
||||||
GO111MODULE=on CGO_ENABLED=0 go build -mod=vendor -installsuffix cgo -ldflags "-X main.version=$(VERSION) -X main.gitCommit=$(GIT_COMMIT)" -o nginx-prometheus-exporter
|
GO111MODULE=on CGO_ENABLED=0 go build -mod=vendor -installsuffix cgo -ldflags "-X main.version=$(VERSION) -X main.gitCommit=$(GIT_COMMIT)" -o nginx-prometheus-exporter
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
@@ -15,7 +21,7 @@ test:
|
|||||||
GO111MODULE=on go test -mod=vendor ./...
|
GO111MODULE=on go test -mod=vendor ./...
|
||||||
|
|
||||||
container:
|
container:
|
||||||
docker build --build-arg VERSION=$(VERSION) --build-arg GIT_COMMIT=$(GIT_COMMIT) -t $(PREFIX):$(TAG) .
|
docker build --build-arg VERSION=$(VERSION) --build-arg GIT_COMMIT=$(GIT_COMMIT) -f $(DOCKERFILEPATH)/$(DOCKERFILE) -t $(PREFIX):$(TAG) .
|
||||||
|
|
||||||
push: container
|
push: container
|
||||||
docker push $(PREFIX):$(TAG)
|
docker push $(PREFIX):$(TAG)
|
||||||
|
7
build/ci/Jenkinsfile
vendored
Normal file
7
build/ci/Jenkinsfile
vendored
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
node {
|
||||||
|
git(
|
||||||
|
url: "${libsLocation}",
|
||||||
|
credentialsId: "${githubCreds}"
|
||||||
|
)
|
||||||
|
load 'nginx-prometheus-exporter/Jenkinsfile'
|
||||||
|
}
|
Reference in New Issue
Block a user