-
Notifications
You must be signed in to change notification settings - Fork 26
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
Showing
4 changed files
with
97 additions
and
10 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 |
---|---|---|
@@ -1,10 +1,23 @@ | ||
FROM python:alpine | ||
|
||
LABEL version="1.2.0" \ | ||
description="Rundeck metrics exporter to Prometheus" \ | ||
maintainer="Phillipe Smith <[email protected]>" | ||
ARG BUILD_DATE | ||
ARG VCS_REF | ||
ARG VERSION | ||
|
||
RUN pip install prometheus-client requests cachetools | ||
LABEL maintainer="Phillipe Smith <[email protected]>" \ | ||
org.label-schema.build-date=$BUILD_DATE \ | ||
org.label-schema.name="Rundeck Exporter" \ | ||
org.label-schema.description="Rundeck metrics exporter for Prometheus" \ | ||
org.label-schema.url="https://hub.docker.com/r/phsmith/rundeck-exporter" \ | ||
org.label-schema.vcs-ref=$VCS_REF \ | ||
org.label-schema.vcs-url="https://github.com/phsmith/rundeck_exporter" \ | ||
org.label-schema.version=$VERSION \ | ||
org.label-schema.schema-version="1.0" | ||
|
||
RUN pip install --no-cache-dir \ | ||
cachetools==4.1.1 \ | ||
prometheus-client==0.8.0 \ | ||
requests==2.24.0 | ||
|
||
COPY rundeck_exporter.py /usr/bin | ||
|
||
|
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,35 @@ | ||
PROJECT_NAME = $(notdir $(PWD)) | ||
|
||
.SILENT: push | ||
|
||
default: build | ||
|
||
build: | ||
docker run --rm -i hadolint/hadolint:latest < Dockerfile | ||
|
||
docker build \ | ||
--rm \ | ||
--network host \ | ||
--tag="$(PROJECT_NAME):$(VERSION)" \ | ||
--build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ | ||
--build-arg VCS_REF=`git rev-parse --short HEAD` \ | ||
--build-arg VERSION="$(VERSION)" . | ||
|
||
clean: | ||
docker rmi --force $(PROJECT_NAME):$(VERSION) | ||
|
||
push: | ||
[ -z "$(git status --short --untracked-files=no)" ] && (echo -e "\nNeed to commit changes before push.\n"; exit 1) | ||
git tag -d latest | ||
git tag latest | ||
git push origin :latest | ||
git tag "v$(VERSION)" | ||
git push --all | ||
|
||
debug: | ||
docker run --rm -it $(PROJECT_NAME):$(VERSION) /bin/sh | ||
|
||
run: | ||
docker run --rm $(PROJECT_NAME):$(VERSION) \ | ||
--host 0.0.0.0 \ | ||
--rundeck.skip_ssl |
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