Skip to content

Commit

Permalink
Merge pull request #22 from cnieg/add_dockerhub_readme
Browse files Browse the repository at this point in the history
Add a file and a job to update our docker hub description
  • Loading branch information
gcavelier authored Aug 28, 2024
2 parents 1185607 + b7e1394 commit b9fb47c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,13 @@ jobs:
with:
generateReleaseNotes: true
tag: ${{ env.semVer }}
makeLatest: "true"

- name: Docker Hub Description
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: cnieg/gitlab-tokens-exporter
readme-filepath: ./README_dockerhub.md
short-description: ${{ github.event.repository.description }}
27 changes: 27 additions & 0 deletions README_dockerhub.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Gitlab tokens prometheus exporter

Exports the number of days before expiration of gitlab tokens as Prometheus metrics

## Getting Started

The following environment variables are mandatory :

```
GITLAB_BASEURL=<gitlab hostname>
GITLAB_TOKEN=<gitlab authentication token>
```

Optional environment variables :
```
DATA_REFRESH_HOURS=6 (should be > 0 and <= 24 or else, it will be set to the default value: 6)
```

You can launch an instance using the following docker command :
```
docker run -it --rm -e "GITLAB_BASEURL=<gitlab hostname>" -e "GITLAB_TOKEN=<gitlab authentication token>" cnieg/gitlab-tokens-exporter:latest
```

## Known limitations

When launching the exporter, it will first get infos on **all** the gitlab tokens, so it can take some time depending on the number of projects to scan.
The exporter returns `204 No Content` until the first scan is done.

0 comments on commit b9fb47c

Please sign in to comment.