Skip to content

Commit cef4022

Browse files
authored
Upgrade linters and dependencies (#5)
1 parent 8fb5772 commit cef4022

12 files changed

+280
-207
lines changed

.github/workflows/build-and-push-container-image.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ jobs:
3131
fi
3232
echo "tag=${image_version}" >> $GITHUB_OUTPUT
3333
- name: Set up QEMU
34-
uses: docker/setup-qemu-action@v2
34+
uses: docker/setup-qemu-action@v3
3535
- name: Set up Docker Buildx
36-
uses: docker/setup-buildx-action@v2
36+
uses: docker/setup-buildx-action@v3
3737
- name: Login to container registry
38-
uses: docker/login-action@v2
38+
uses: docker/login-action@v3
3939
with:
4040
username: ${{ secrets.DOCKERHUB_USERNAME }}
4141
password: ${{ secrets.DOCKERHUB_PASSWORD }}
4242
- name: Build and push
43-
uses: docker/build-push-action@v4
43+
uses: docker/build-push-action@v6
4444
with:
4545
push: true
4646
context: .

.github/workflows/container-image-build-validation.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,36 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout GIT repository
15-
uses: actions/checkout@v3
15+
uses: actions/checkout@v4
1616
- name: Set up QEMU
17-
uses: docker/setup-qemu-action@v2
17+
uses: docker/setup-qemu-action@v3
1818
- name: Set up Docker Buildx
19-
uses: docker/setup-buildx-action@v2
19+
uses: docker/setup-buildx-action@v3
2020
- name: Test build
21-
uses: docker/build-push-action@v4.1.0
21+
uses: docker/build-push-action@v6
2222
with:
2323
push: false
2424
load: false
2525
context: .
2626
platforms: linux/amd64, linux/arm64
2727
tags: container-build:test
2828
- name: Test build and export for further validation
29-
uses: docker/build-push-action@v4.1.0
29+
uses: docker/build-push-action@v6
3030
with:
3131
push: false
3232
load: true
3333
context: .
3434
tags: container-build:test
3535
outputs: type=docker,dest=/tmp/container.tar
3636
- name: Upload container image as artifact
37-
uses: actions/upload-artifact@v3.1.2
37+
uses: actions/upload-artifact@v4
3838
with:
3939
name: container-build
4040
path: /tmp/container.tar
4141
scan:
4242
name: Container vulnerability scan
4343
needs: container-build
44-
uses: cybcon/github_workflows/.github/workflows/container-vulnerability-scan.yaml@v1.1.10
44+
uses: cybcon/github_workflows/.github/workflows/container-vulnerability-scan.yaml@v1.4.0
4545
with:
4646
image_name: container-build:test
4747
image_artifact_filename: container.tar

.github/workflows/pre-commit.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ on:
66
- main
77
jobs:
88
pre-commit:
9-
uses: cybcon/github_workflows/.github/workflows/pre-commit.yaml@v1.1.10
9+
uses: cybcon/github_workflows/.github/workflows/pre-commit.yaml@v1.4.0

.github/workflows/release-from-label.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ on:
55
- closed
66
jobs:
77
release:
8-
uses: cybcon/github_workflows/.github/workflows/release-from-label.yaml@v1.1.10
8+
uses: cybcon/github_workflows/.github/workflows/release-from-label.yaml@v1.4.0

.github/workflows/release-label-validation.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ on:
1010
- unlabeled
1111
jobs:
1212
release-label-validation:
13-
uses: cybcon/github_workflows/.github/workflows/release-label-validation.yaml@v1.1.10
13+
uses: cybcon/github_workflows/.github/workflows/release-label-validation.yaml@v1.4.0

.linter-config/.checkov.yml

Lines changed: 0 additions & 15 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.4.0
3+
rev: v5.0.0
44
hooks:
55
- id: fix-byte-order-marker
66
- id: check-json
77
- id: check-yaml
8-
# args:
9-
# - "-c __GIT_WORKING_DIR__/.linter-config/.yamllint"
108
- id: end-of-file-fixer
119
- id: trailing-whitespace
1210
- id: mixed-line-ending
@@ -15,10 +13,38 @@ repos:
1513
- id: detect-aws-credentials
1614
args: ['--allow-missing-credentials']
1715
- id: detect-private-key
18-
- repo: https://github.com/antonbabenko/pre-commit-terraform
19-
rev: v1.81.0
16+
- repo: https://github.com/myint/autoflake
17+
rev: v2.3.1
2018
hooks:
21-
- id: terraform_checkov
22-
exclude: "[examples|test]/.*$"
19+
- id: autoflake
2320
args:
24-
- "--args=--config-file __GIT_WORKING_DIR__/.linter-config/.checkov.yml"
21+
- --in-place
22+
- --remove-unused-variables
23+
- --remove-all-unused-imports
24+
- repo: https://github.com/hadolint/hadolint
25+
rev: v2.12.0
26+
hooks:
27+
- id: hadolint-docker
28+
- repo: https://github.com/charliermarsh/ruff-pre-commit
29+
rev: v0.8.4
30+
hooks:
31+
- id: ruff
32+
args:
33+
- '--line-length=120'
34+
- '--fix'
35+
- '--exit-non-zero-on-fix'
36+
- repo: https://github.com/pycqa/isort
37+
rev: 5.13.2
38+
hooks:
39+
- id: isort
40+
name: isort (python)
41+
args:
42+
- '--profile'
43+
- black
44+
- '--filter-files'
45+
- repo: https://github.com/psf/black
46+
rev: 24.10.0
47+
hooks:
48+
- id: black
49+
args:
50+
- '--line-length=120'

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
pre-commit 3.3.3
1+
pre-commit 4.0.1

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
FROM alpine:3.18.4
1+
FROM alpine:3.21.0
22

33
LABEL maintainer="Michael Oberdorf IT-Consulting <info@oberdorf-itc.de>"
4-
LABEL site.local.program.version="1.1.0"
4+
LABEL site.local.program.version="1.1.1"
55

66
ENV CONFIG_FILE=/app/etc/mqtt2elasticsearch.json \
77
ELASTICSEARCH_MAPPING_FILE=/app/etc/mqtt2elasticsearch-mappings.json
@@ -10,9 +10,9 @@ COPY --chown=root:root /src /
1010

1111
RUN apk upgrade --available --no-cache --update \
1212
&& apk add --no-cache --update \
13-
python3=3.11.6-r0 \
14-
py3-pip=23.1.2-r0 \
15-
&& pip3 install --no-cache-dir -r /requirements.txt
13+
python3=3.12.8-r1 \
14+
py3-pip=24.3.1-r0 \
15+
&& pip3 install --no-cache-dir -r /requirements.txt --break-system-packages
1616

1717
USER 6352:6352
1818

README.md

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,25 @@ Source code: [GitHub](https://github.com/cybcon/docker.mqtt2elasticsearch)
66

77
Container image: [DockerHub](https://hub.docker.com/repository/docker/oitc/mqtt2elasticsearch)
88

9+
<!-- SHIELD GROUP -->
10+
[![][github-action-test-shield]][github-action-test-link]
11+
[![][github-action-release-shield]][github-action-release-link]
12+
[![][github-release-shield]][github-release-link]
13+
[![][github-releasedate-shield]][github-releasedate-link]
14+
[![][github-stars-shield]][github-stars-link]
15+
[![][github-forks-shield]][github-forks-link]
16+
[![][github-issues-shield]][github-issues-link]
17+
[![][github-license-shield]][github-license-link]
18+
19+
[![][docker-release-shield]][docker-release-link]
20+
[![][docker-pulls-shield]][docker-pulls-link]
21+
[![][docker-stars-shield]][docker-stars-link]
22+
[![][docker-size-shield]][docker-size-link]
23+
924
# Supported tags and respective `Dockerfile` links
1025

11-
* [`latest`, `1.1.0`](https://github.com/cybcon/docker.mqtt2elasticsearch/blob/v1.1.0/Dockerfile)
26+
* [`latest`, `1.1.1`](https://github.com/cybcon/docker.mqtt2elasticsearch/blob/v1.1.1/Dockerfile)
27+
* [`1.1.0`](https://github.com/cybcon/docker.mqtt2elasticsearch/blob/v1.1.0/Dockerfile)
1228
* [`1.0.0`](https://github.com/cybcon/docker.mqtt2elasticsearch/blob/v1.0.0/Dockerfile)
1329

1430
# Summary
@@ -206,7 +222,7 @@ I would appreciate a small donation to support the further development of my ope
206222
207223
# License
208224
209-
Copyright (c) 2023 Michael Oberdorf IT-Consulting
225+
Copyright (c) 2023-2024 Michael Oberdorf IT-Consulting
210226
211227
Permission is hereby granted, free of charge, to any person obtaining a copy
212228
of this software and associated documentation files (the "Software"), to deal
@@ -225,3 +241,30 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
225241
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
226242
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
227243
SOFTWARE.
244+
245+
<!-- LINK GROUP -->
246+
[docker-pulls-link]: https://hub.docker.com/r/oitc/mqtt2elasticsearch
247+
[docker-pulls-shield]: https://img.shields.io/docker/pulls/oitc/mqtt2elasticsearch?color=45cc11&labelColor=black&style=flat-square
248+
[docker-release-link]: https://hub.docker.com/r/oitc/mqtt2elasticsearch
249+
[docker-release-shield]: https://img.shields.io/docker/v/oitc/mqtt2elasticsearch?color=369eff&label=docker&labelColor=black&logo=docker&logoColor=white&style=flat-square
250+
[docker-size-link]: https://hub.docker.com/r/oitc/mqtt2elasticsearch
251+
[docker-size-shield]: https://img.shields.io/docker/image-size/oitc/mqtt2elasticsearch?color=369eff&labelColor=black&style=flat-square
252+
[docker-stars-link]: https://hub.docker.com/r/oitc/mqtt2elasticsearch
253+
[docker-stars-shield]: https://img.shields.io/docker/stars/oitc/mqtt2elasticsearch?color=45cc11&labelColor=black&style=flat-square
254+
[github-action-release-link]: https://github.com/cybcon/docker.mqtt2elasticsearch/actions/workflows/release-from-label.yaml
255+
[github-action-release-shield]: https://img.shields.io/github/actions/workflow/status/cybcon/docker.mqtt2elasticsearch/release-from-label.yaml?label=release&labelColor=black&logo=githubactions&logoColor=white&style=flat-square
256+
[github-action-test-link]: https://github.com/cybcon/docker.mqtt2elasticsearch/actions/workflows/container-image-build-validation.yaml
257+
[github-action-test-shield-original]: https://github.com/cybcon/docker.mqtt2elasticsearch/actions/workflows/container-image-build-validation.yaml/badge.svg
258+
[github-action-test-shield]: https://img.shields.io/github/actions/workflow/status/cybcon/docker.mqtt2elasticsearch/test.yaml?label=tests&labelColor=black&logo=githubactions&logoColor=white&style=flat-square
259+
[github-forks-link]: https://github.com/cybcon/docker.mqtt2elasticsearch/network/members
260+
[github-forks-shield]: https://img.shields.io/github/forks/cybcon/docker.mqtt2elasticsearch?color=8ae8ff&labelColor=black&style=flat-square
261+
[github-issues-link]: https://github.com/cybcon/docker.mqtt2elasticsearch/issues
262+
[github-issues-shield]: https://img.shields.io/github/issues/cybcon/docker.mqtt2elasticsearch?color=ff80eb&labelColor=black&style=flat-square
263+
[github-license-link]: https://github.com/cybcon/docker.mqtt2elasticsearch/blob/main/LICENSE
264+
[github-license-shield]: https://img.shields.io/badge/license-MIT-blue?labelColor=black&style=flat-square
265+
[github-release-link]: https://github.com/cybcon/docker.mqtt2elasticsearch/releases
266+
[github-release-shield]: https://img.shields.io/github/v/release/cybcon/docker.mqtt2elasticsearch?color=369eff&labelColor=black&logo=github&style=flat-square
267+
[github-releasedate-link]: https://github.com/cybcon/docker.mqtt2elasticsearch/releases
268+
[github-releasedate-shield]: https://img.shields.io/github/release-date/cybcon/docker.mqtt2elasticsearch?labelColor=black&style=flat-square
269+
[github-stars-link]: https://github.com/cybcon/docker.mqtt2elasticsearch
270+
[github-stars-shield]: https://img.shields.io/github/stars/cybcon/docker.mqtt2elasticsearch?color=ffcb47&labelColor=black&style=flat-square

0 commit comments

Comments
 (0)