-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/neezgee/apache_exporter
- Loading branch information
Showing
413 changed files
with
184,508 additions
and
47 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,13 @@ | ||
repository: | ||
path: github.com/Lusitaniae/apache_exporter | ||
build: | ||
flags: -a -tags netgo | ||
ldflags: | | ||
-X {{repoPath}}/vendor/github.com/prometheus/common/version.Version={{.Version}} | ||
-X {{repoPath}}/vendor/github.com/prometheus/common/version.Revision={{.Revision}} | ||
-X {{repoPath}}/vendor/github.com/prometheus/common/version.Branch={{.Branch}} | ||
-X {{repoPath}}/vendor/github.com/prometheus/common/version.BuildUser={{user}}@{{host}} | ||
-X {{repoPath}}/vendor/github.com/prometheus/common/version.BuildDate={{date "20060102-15:04:05"}} | ||
tarball: | ||
files: | ||
- LICENSE |
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 |
---|---|---|
@@ -1,7 +1,6 @@ | ||
FROM golang:alpine | ||
FROM quay.io/prometheus/busybox:latest | ||
|
||
RUN apk add --no-cache ca-certificates git | ||
RUN go get github.com/neezgee/apache_exporter | ||
COPY apache_exporter /bin/apache_exporter | ||
|
||
EXPOSE 9117 | ||
ENTRYPOINT ["/go/bin/apache_exporter"] | ||
ENTRYPOINT ["/bin/apache_exporter"] | ||
EXPOSE 9117 |
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,58 @@ | ||
# Copyright 2015 The Prometheus Authors | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
GO := GO15VENDOREXPERIMENT=1 go | ||
PROMU := $(GOPATH)/bin/promu | ||
pkgs = $(shell $(GO) list ./... | grep -v /vendor/) | ||
|
||
PREFIX ?= $(shell pwd) | ||
BIN_DIR ?= $(shell pwd) | ||
DOCKER_IMAGE_NAME ?= apache-exporter | ||
DOCKER_IMAGE_TAG ?= $(subst /,-,$(shell git rev-parse --abbrev-ref HEAD)) | ||
|
||
all: format build test | ||
|
||
test: | ||
@echo ">> running tests" | ||
@$(GO) test -short $(pkgs) | ||
|
||
style: | ||
@echo ">> checking code style" | ||
@! gofmt -d $(shell find . -path ./vendor -prune -o -name '*.go' -print) | grep '^' | ||
|
||
format: | ||
@echo ">> formatting code" | ||
@$(GO) fmt $(pkgs) | ||
|
||
vet: | ||
@echo ">> vetting code" | ||
@$(GO) vet $(pkgs) | ||
|
||
build: promu | ||
@echo ">> building binaries" | ||
@$(PROMU) build --prefix $(PREFIX) | ||
|
||
tarball: promu | ||
@echo ">> building release tarball" | ||
@$(PROMU) tarball --prefix $(PREFIX) $(BIN_DIR) | ||
|
||
docker: | ||
@echo ">> building docker image" | ||
@docker build -t "$(DOCKER_IMAGE_NAME):$(DOCKER_IMAGE_TAG)" . | ||
|
||
promu: | ||
@GOOS=$(shell uname -s | tr A-Z a-z) \ | ||
GOARCH=$(subst x86_64,amd64,$(patsubst i%86,386,$(shell uname -m))) \ | ||
$(GO) get -u github.com/prometheus/promu | ||
|
||
.PHONY: all style format build test vet tarball docker promu |
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
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 @@ | ||
0.4.0 |
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
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
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,62 @@ | ||
machine: | ||
environment: | ||
DOCKER_IMAGE_NAME: lusotycoon/apache-exporter | ||
QUAY_IMAGE_NAME: quay.io/lusitaniae/apache-exporter | ||
DOCKER_TEST_IMAGE_NAME: quay.io/prometheus/golang-builder:1.8-base | ||
REPO_PATH: github.com/Lusitaniae/apache_exporter | ||
pre: | ||
- sudo curl -L -o /usr/bin/docker 'https://s3-external-1.amazonaws.com/circle-downloads/docker-1.9.1-circleci' | ||
- sudo chmod 0755 /usr/bin/docker | ||
- sudo curl -L 'https://github.com/aktau/github-release/releases/download/v0.6.2/linux-amd64-github-release.tar.bz2' | tar xvjf - --strip-components 3 -C $HOME/bin | ||
services: | ||
- docker | ||
|
||
dependencies: | ||
pre: | ||
- make promu | ||
- docker info | ||
override: | ||
- promu crossbuild | ||
- ln -s .build/linux-amd64/apache_exporter apache_exporter | ||
- | | ||
if [ -n "$CIRCLE_TAG" ]; then | ||
make docker DOCKER_IMAGE_NAME=$DOCKER_IMAGE_NAME DOCKER_IMAGE_TAG=$CIRCLE_TAG | ||
make docker DOCKER_IMAGE_NAME=$QUAY_IMAGE_NAME DOCKER_IMAGE_TAG=$CIRCLE_TAG | ||
else | ||
make docker DOCKER_IMAGE_NAME=$DOCKER_IMAGE_NAME | ||
make docker DOCKER_IMAGE_NAME=$QUAY_IMAGE_NAME | ||
fi | ||
post: | ||
- mkdir $CIRCLE_ARTIFACTS/binaries/ && cp -a .build/* $CIRCLE_ARTIFACTS/binaries/ | ||
- docker images | ||
|
||
test: | ||
override: | ||
- docker run --rm -t -v "$(pwd):/app" "${DOCKER_TEST_IMAGE_NAME}" -i "${REPO_PATH}" -T | ||
|
||
deployment: | ||
hub_branch: | ||
branch: master | ||
owner: Lusitaniae | ||
commands: | ||
- docker login -e $DOCKER_EMAIL -u $DOCKER_LOGIN -p $DOCKER_PASSWORD | ||
- docker login -e $QUAY_EMAIL -u $QUAY_LOGIN -p $QUAY_PASSWORD quay.io | ||
- docker push $DOCKER_IMAGE_NAME | ||
- docker push $QUAY_IMAGE_NAME | ||
hub_tag: | ||
tag: /^v[0-9]+(\.[0-9]+){2}(-.+|[^-.]*)$/ | ||
owner: Lusitaniae | ||
commands: | ||
- promu crossbuild tarballs | ||
- promu checksum .tarballs | ||
- promu release .tarballs | ||
- mkdir $CIRCLE_ARTIFACTS/releases/ && cp -a .tarballs/* $CIRCLE_ARTIFACTS/releases/ | ||
- docker login -e $DOCKER_EMAIL -u $DOCKER_LOGIN -p $DOCKER_PASSWORD | ||
- docker login -e $QUAY_EMAIL -u $QUAY_LOGIN -p $QUAY_PASSWORD quay.io | ||
- | | ||
if [[ "$CIRCLE_TAG" =~ ^v[0-9]+(\.[0-9]+){2}$ ]]; then | ||
docker tag "$DOCKER_IMAGE_NAME:$CIRCLE_TAG" "$DOCKER_IMAGE_NAME:latest" | ||
docker tag "$QUAY_IMAGE_NAME:$CIRCLE_TAG" "$QUAY_IMAGE_NAME:latest" | ||
fi | ||
- docker push $DOCKER_IMAGE_NAME | ||
- docker push $QUAY_IMAGE_NAME |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.