Compare commits

...

11 Commits
1.0.2 ... main

Author SHA1 Message Date
6a14f2cec8 Merge pull request '⬆️ Update docker/build-push-action action to v6' (#4) from renovate/docker-build-push-action-6.x into main
All checks were successful
ci / docker (push) Successful in 19s
Reviewed-on: #4
2024-06-20 12:24:26 +02:00
085fa252f3 ⬆️ Update docker/build-push-action action to v6
Some checks failed
ci / docker (pull_request) Failing after 14m34s
2024-06-18 01:10:55 +00:00
aa23e07221 Merge pull request '⬆️ Update python Docker tag to v3.12.4' (#3) from renovate/python-3.x into main
All checks were successful
ci / docker (push) Successful in 12s
Reviewed-on: #3
2024-06-10 12:09:32 +02:00
263395c04c ⬆️ Update python Docker tag to v3.12.4
All checks were successful
ci / docker (pull_request) Successful in 25s
2024-06-10 10:08:55 +00:00
7b6023c869 Merge pull request '⬆️ Update python Docker tag to v3.12.3' (#2) from renovate/python-3.x into main
All checks were successful
ci / docker (push) Successful in 10s
Reviewed-on: #2
2024-04-10 10:21:06 +02:00
Renovate
9379e72199 ⬆️ Update python Docker tag to v3.12.3
All checks were successful
ci / docker (pull_request) Successful in 27s
2024-04-10 01:05:25 +00:00
67ed612dc9 Update Dockerfile
All checks were successful
ci / docker (push) Successful in 9s
2024-04-02 12:25:33 +02:00
3e727f0348 Add renovate.json
All checks were successful
ci / docker (push) Successful in 14s
2024-04-02 12:24:58 +02:00
dd658be7ef
Logout user
All checks were successful
ci / docker (push) Successful in 15s
2024-03-28 11:00:54 +01:00
0322030e57
Update CI 2024-03-28 11:00:41 +01:00
16d7f4b52f Update huwawei_lte_exporter 2024-03-26 15:10:03 +01:00
4 changed files with 22 additions and 14 deletions

View File

@ -3,12 +3,12 @@ name: ci
on:
push:
branches:
- 'main'
- "*"
tags:
- '*'
- "*"
pull_request:
branches:
- 'main'
- "main"
jobs:
docker:
@ -18,28 +18,31 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
git.sebclem.fr/${{ gitea.repository }}
git.sebclem.fr/${{ gitea.repository }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Login to DockerHub
if: github.event_name != 'pull_request'
type=semver,pattern={{major}}.{{minor}}
- name: Login to registry
if: github.ref_type == 'tag'
uses: docker/login-action@v3
with:
registry: git.sebclem.fr
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
push: ${{ github.ref_type == 'tag' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
labels: ${{ steps.meta.outputs.labels }}

View File

@ -1,4 +1,4 @@
FROM python:3
FROM python:3.12.4
WORKDIR /usr/src/huwawei_lte_exporter

View File

@ -54,7 +54,7 @@ def prom_exporter():
response.append('#HELP '+attribute+' '+info['help'])
response.append('#TYPE '+attribute+' '+info['type'])
response.append(attribute+'{'+info['device']+'} '+info['value'])
client.user.logout()
return '\n'.join(response)
@ -76,8 +76,6 @@ config = configparser.ConfigParser()
config.read('huwawei_lte_exporter.ini')
MANDATORY_ENV_VARS = ["ROUTER_ADDRESS", "ROUTER_USER", "ROUTER_PASS", "PROM_PORT"]
for var in MANDATORY_ENV_VARS:
if not config.has_option('DEFAULT', var):
raise EnvironmentError("Failed because {} is not set.".format(var))
if var in os.environ:
config['DEFAULT'][var] = os.environ[var]

7
renovate.json Normal file
View File

@ -0,0 +1,7 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
],
"commitMessagePrefix": ":arrow_up:"
}