carconnectivity-plugin-mqtt 0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- carconnectivity_plugin_mqtt-0.1/.flake8 +2 -0
- carconnectivity_plugin_mqtt-0.1/.github/ISSUE_TEMPLATE/bug_report.md +33 -0
- carconnectivity_plugin_mqtt-0.1/.github/ISSUE_TEMPLATE/feature_request.md +20 -0
- carconnectivity_plugin_mqtt-0.1/.github/dependabot.yml +11 -0
- carconnectivity_plugin_mqtt-0.1/.github/workflows/build.yml +53 -0
- carconnectivity_plugin_mqtt-0.1/.github/workflows/build_and_publish-docker-edge.yml +145 -0
- carconnectivity_plugin_mqtt-0.1/.github/workflows/build_and_publish-docker.yml +143 -0
- carconnectivity_plugin_mqtt-0.1/.github/workflows/build_and_publish.yml +37 -0
- carconnectivity_plugin_mqtt-0.1/.github/workflows/codeql-analysis.yml +58 -0
- carconnectivity_plugin_mqtt-0.1/.github/workflows/publish_dockerhub-description.yml +24 -0
- carconnectivity_plugin_mqtt-0.1/.github/workflows/smoketest-docker-compose.yml +38 -0
- carconnectivity_plugin_mqtt-0.1/.gitignore +131 -0
- carconnectivity_plugin_mqtt-0.1/CHANGELOG.md +13 -0
- carconnectivity_plugin_mqtt-0.1/LICENSE +21 -0
- carconnectivity_plugin_mqtt-0.1/Makefile +18 -0
- carconnectivity_plugin_mqtt-0.1/PKG-INFO +203 -0
- carconnectivity_plugin_mqtt-0.1/README.md +151 -0
- carconnectivity_plugin_mqtt-0.1/doc/Config.md +91 -0
- carconnectivity_plugin_mqtt-0.1/docker/Dockerfile +55 -0
- carconnectivity_plugin_mqtt-0.1/docker/Dockerfile-edge +55 -0
- carconnectivity_plugin_mqtt-0.1/docker/README.md +118 -0
- carconnectivity_plugin_mqtt-0.1/docker/entrypoint.sh +9 -0
- carconnectivity_plugin_mqtt-0.1/docker/test/carconnectivity.json +18 -0
- carconnectivity_plugin_mqtt-0.1/docker/test/docker-compose.yml +24 -0
- carconnectivity_plugin_mqtt-0.1/pyproject.toml +61 -0
- carconnectivity_plugin_mqtt-0.1/setup.cfg +4 -0
- carconnectivity_plugin_mqtt-0.1/setup_requirements.txt +3 -0
- carconnectivity_plugin_mqtt-0.1/src/carconnectivity_mqtt/__init__.py +0 -0
- carconnectivity_plugin_mqtt-0.1/src/carconnectivity_mqtt/carconnectivity_mqtt_base.py +42 -0
- carconnectivity_plugin_mqtt-0.1/src/carconnectivity_plugin_mqtt.egg-info/PKG-INFO +203 -0
- carconnectivity_plugin_mqtt-0.1/src/carconnectivity_plugin_mqtt.egg-info/SOURCES.txt +37 -0
- carconnectivity_plugin_mqtt-0.1/src/carconnectivity_plugin_mqtt.egg-info/dependency_links.txt +1 -0
- carconnectivity_plugin_mqtt-0.1/src/carconnectivity_plugin_mqtt.egg-info/entry_points.txt +2 -0
- carconnectivity_plugin_mqtt-0.1/src/carconnectivity_plugin_mqtt.egg-info/requires.txt +11 -0
- carconnectivity_plugin_mqtt-0.1/src/carconnectivity_plugin_mqtt.egg-info/top_level.txt +2 -0
- carconnectivity_plugin_mqtt-0.1/src/carconnectivity_plugins/mqtt/__init__.py +0 -0
- carconnectivity_plugin_mqtt-0.1/src/carconnectivity_plugins/mqtt/_version.py +16 -0
- carconnectivity_plugin_mqtt-0.1/src/carconnectivity_plugins/mqtt/mqtt_client.py +660 -0
- carconnectivity_plugin_mqtt-0.1/src/carconnectivity_plugins/mqtt/plugin.py +288 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Create a report to help us improve
|
|
4
|
+
title: ''
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: tillsteinbach
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Describe the bug**
|
|
11
|
+
A clear and concise description of what the bug is.
|
|
12
|
+
|
|
13
|
+
**To Reproduce**
|
|
14
|
+
Steps to reproduce the behavior:
|
|
15
|
+
1. Go to '...'
|
|
16
|
+
2. Click on '....'
|
|
17
|
+
3. Scroll down to '....'
|
|
18
|
+
4. See error
|
|
19
|
+
|
|
20
|
+
**Expected behavior**
|
|
21
|
+
A clear and concise description of what you expected to happen.
|
|
22
|
+
|
|
23
|
+
**Screenshots**
|
|
24
|
+
If applicable, add screenshots to help explain your problem.
|
|
25
|
+
|
|
26
|
+
**Logs**
|
|
27
|
+
IF applicable logs that show the problem. Please take care to remove any confidential data from the logs (e.g. your vehicles VIN number, usernames or passwords)
|
|
28
|
+
|
|
29
|
+
- OS: [e.g. Windows, Linux, MacOS, ...]
|
|
30
|
+
- Version used [e.g. 0.6.2]
|
|
31
|
+
|
|
32
|
+
**Additional context**
|
|
33
|
+
Add any other context about the problem here.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an idea for this project
|
|
4
|
+
title: ''
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: tillsteinbach
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**Is your feature request related to a problem? Please describe.**
|
|
11
|
+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
|
12
|
+
|
|
13
|
+
**Describe the solution you'd like**
|
|
14
|
+
A clear and concise description of what you want to happen.
|
|
15
|
+
|
|
16
|
+
**Describe alternatives you've considered**
|
|
17
|
+
A clear and concise description of any alternative solutions or features you've considered.
|
|
18
|
+
|
|
19
|
+
**Additional context**
|
|
20
|
+
Add any other context or screenshots about the feature request here.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
name: Build Python Package
|
|
2
|
+
|
|
3
|
+
# Controls when the action will run.
|
|
4
|
+
on:
|
|
5
|
+
# Triggers the workflow on push or pull request events but only for the master branch
|
|
6
|
+
push:
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
tags:
|
|
9
|
+
- "v*"
|
|
10
|
+
paths:
|
|
11
|
+
- .github/workflows/build.yml
|
|
12
|
+
- '**.py'
|
|
13
|
+
- 'pyproject.toml'
|
|
14
|
+
pull_request:
|
|
15
|
+
paths:
|
|
16
|
+
- .github/workflows/build.yml
|
|
17
|
+
- '**.py'
|
|
18
|
+
- 'pyproject.toml'
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
build-python:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
strategy:
|
|
24
|
+
matrix:
|
|
25
|
+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
|
|
26
|
+
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v4
|
|
29
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
30
|
+
uses: actions/setup-python@v5
|
|
31
|
+
with:
|
|
32
|
+
python-version: ${{ matrix.python-version }}
|
|
33
|
+
- name: Install dependencies
|
|
34
|
+
run: |
|
|
35
|
+
python -m pip install --upgrade pip
|
|
36
|
+
if [ -f setup_requirements.txt ]; then pip install -r setup_requirements.txt; fi
|
|
37
|
+
python -m pip install build
|
|
38
|
+
- name: Build
|
|
39
|
+
run: |
|
|
40
|
+
python -m build
|
|
41
|
+
- name: Install built package
|
|
42
|
+
run: |
|
|
43
|
+
pip install dist/*.whl
|
|
44
|
+
- name: Lint
|
|
45
|
+
run: |
|
|
46
|
+
make lint
|
|
47
|
+
# - name: Test
|
|
48
|
+
# run: |
|
|
49
|
+
# make test
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
name: Upload Edge Docker Image
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main ]
|
|
6
|
+
paths:
|
|
7
|
+
- .github/workflows/build_and_publish-docker-edge.yml
|
|
8
|
+
- docker/Dockerfile-edge
|
|
9
|
+
- src/**
|
|
10
|
+
- 'pyproject.toml'
|
|
11
|
+
workflow_dispatch:
|
|
12
|
+
|
|
13
|
+
env:
|
|
14
|
+
DOCKERHUB_REPO: tillsteinbach/carconnectivity-mqtt
|
|
15
|
+
GHCR_REPO: ghcr.io/tillsteinbach/carconnectivity-mqtt
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
build:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
strategy:
|
|
21
|
+
fail-fast: false
|
|
22
|
+
matrix:
|
|
23
|
+
platform:
|
|
24
|
+
- linux/amd64
|
|
25
|
+
- linux/arm64
|
|
26
|
+
- linux/arm/v7
|
|
27
|
+
environment:
|
|
28
|
+
name: dockerhub
|
|
29
|
+
permissions:
|
|
30
|
+
contents: read
|
|
31
|
+
packages: write
|
|
32
|
+
attestations: write
|
|
33
|
+
id-token: write
|
|
34
|
+
steps:
|
|
35
|
+
- name: Prepare Variables
|
|
36
|
+
id: prepare
|
|
37
|
+
run: |
|
|
38
|
+
platform=${{ matrix.platform }}
|
|
39
|
+
echo "platform_pair=${platform//\//-}" >> $GITHUB_OUTPUT
|
|
40
|
+
echo "scope=${{ github.ref_name }}-${platform}" >> $GITHUB_OUTPUT
|
|
41
|
+
- name: Docker meta
|
|
42
|
+
id: meta
|
|
43
|
+
uses: docker/metadata-action@v5
|
|
44
|
+
with:
|
|
45
|
+
images: |
|
|
46
|
+
${{ env.DOCKERHUB_REPO }}
|
|
47
|
+
${{ env.GHCR_REPO }}
|
|
48
|
+
- name: Checkout
|
|
49
|
+
uses: actions/checkout@v4
|
|
50
|
+
with:
|
|
51
|
+
fetch-depth: 0
|
|
52
|
+
- name: Log in to Docker Hub
|
|
53
|
+
uses: docker/login-action@v3.3.0
|
|
54
|
+
with:
|
|
55
|
+
username: ${{ secrets.DOCKER_USERNAME }}
|
|
56
|
+
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
57
|
+
|
|
58
|
+
- name: Log in to the Container registry
|
|
59
|
+
uses: docker/login-action@v3.3.0
|
|
60
|
+
with:
|
|
61
|
+
registry: ghcr.io
|
|
62
|
+
username: ${{ github.actor }}
|
|
63
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
64
|
+
- name: Set up QEMU
|
|
65
|
+
uses: docker/setup-qemu-action@v3.2.0
|
|
66
|
+
with:
|
|
67
|
+
platforms: ${{ matrix.platform }}
|
|
68
|
+
image: ${{ matrix.platform == 'linux/arm/v7' && 'tonistiigi/binfmt:qemu-v8.1.5' || 'tonistiigi/binfmt:latest' }}
|
|
69
|
+
- name: Setup Docker Buildx
|
|
70
|
+
uses: docker/setup-buildx-action@v3.8.0
|
|
71
|
+
- name: Build and push by digest
|
|
72
|
+
id: build
|
|
73
|
+
uses: docker/build-push-action@v6
|
|
74
|
+
with:
|
|
75
|
+
context: .
|
|
76
|
+
file: docker/Dockerfile-edge
|
|
77
|
+
push: ${{ github.event_name != 'pull_request' }}
|
|
78
|
+
platforms: ${{ matrix.platform }}
|
|
79
|
+
labels: ${{ steps.meta.outputs.labels }}
|
|
80
|
+
outputs: type=image,"name=${{ env.DOCKERHUB_REPO }},${{ env.GHCR_REPO }}",push-by-digest=true,name-canonical=true,push=true
|
|
81
|
+
cache-from: type=gha,scope=${{ steps.prepare.outputs.scope }}
|
|
82
|
+
cache-to: type=gha,scope=${{ steps.prepare.outputs.scope }},mode=max
|
|
83
|
+
- name: Export digest
|
|
84
|
+
run: |
|
|
85
|
+
mkdir -p /tmp/digests
|
|
86
|
+
digest="${{ steps.build.outputs.digest }}"
|
|
87
|
+
touch "/tmp/digests/${digest#sha256:}"
|
|
88
|
+
- name: Upload digest
|
|
89
|
+
uses: actions/upload-artifact@v4
|
|
90
|
+
with:
|
|
91
|
+
name: digests-${{ steps.prepare.outputs.platform_pair }}
|
|
92
|
+
path: /tmp/digests/*
|
|
93
|
+
if-no-files-found: error
|
|
94
|
+
retention-days: 1
|
|
95
|
+
merge-and-deploy:
|
|
96
|
+
runs-on: ubuntu-latest
|
|
97
|
+
needs:
|
|
98
|
+
- build
|
|
99
|
+
environment:
|
|
100
|
+
name: dockerhub
|
|
101
|
+
permissions:
|
|
102
|
+
contents: read
|
|
103
|
+
packages: write
|
|
104
|
+
attestations: write
|
|
105
|
+
id-token: write
|
|
106
|
+
steps:
|
|
107
|
+
- name: Download digests
|
|
108
|
+
uses: actions/download-artifact@v4
|
|
109
|
+
with:
|
|
110
|
+
path: /tmp/digests
|
|
111
|
+
pattern: digests-*
|
|
112
|
+
merge-multiple: true
|
|
113
|
+
- name: Login to Docker Hub
|
|
114
|
+
uses: docker/login-action@v3
|
|
115
|
+
with:
|
|
116
|
+
username: ${{ secrets.DOCKER_USERNAME }}
|
|
117
|
+
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
118
|
+
- name: Login to GHCR
|
|
119
|
+
uses: docker/login-action@v3
|
|
120
|
+
with:
|
|
121
|
+
registry: ghcr.io
|
|
122
|
+
username: ${{ github.repository_owner }}
|
|
123
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
124
|
+
- name: Set up Docker Buildx
|
|
125
|
+
uses: docker/setup-buildx-action@v3
|
|
126
|
+
- name: Docker meta
|
|
127
|
+
id: meta
|
|
128
|
+
uses: docker/metadata-action@v5
|
|
129
|
+
with:
|
|
130
|
+
images: |
|
|
131
|
+
${{ env.DOCKERHUB_REPO }}
|
|
132
|
+
${{ env.GHCR_REPO }}
|
|
133
|
+
tags: |
|
|
134
|
+
type=edge
|
|
135
|
+
- name: Create manifest list and push
|
|
136
|
+
working-directory: /tmp/digests
|
|
137
|
+
run: |
|
|
138
|
+
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
|
139
|
+
$(printf '${{ env.DOCKERHUB_REPO }}@sha256:%s ' *)
|
|
140
|
+
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
|
141
|
+
$(printf '${{ env.GHCR_REPO }}@sha256:%s ' *)
|
|
142
|
+
- name: Inspect image
|
|
143
|
+
run: |
|
|
144
|
+
docker buildx imagetools inspect ${{ env.DOCKERHUB_REPO }}:${{ steps.meta.outputs.version }}
|
|
145
|
+
docker buildx imagetools inspect ${{ env.GHCR_REPO }}:${{ steps.meta.outputs.version }}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
name: Upload Docker Image
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
env:
|
|
10
|
+
DOCKERHUB_REPO: tillsteinbach/carconnectivity-mqtt
|
|
11
|
+
GHCR_REPO: ghcr.io/tillsteinbach/carconnectivity-mqtt
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
build:
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
strategy:
|
|
17
|
+
fail-fast: false
|
|
18
|
+
matrix:
|
|
19
|
+
platform:
|
|
20
|
+
- linux/amd64
|
|
21
|
+
- linux/arm64
|
|
22
|
+
- linux/arm/v7
|
|
23
|
+
environment:
|
|
24
|
+
name: dockerhub
|
|
25
|
+
permissions:
|
|
26
|
+
contents: read
|
|
27
|
+
packages: write
|
|
28
|
+
attestations: write
|
|
29
|
+
id-token: write
|
|
30
|
+
steps:
|
|
31
|
+
- name: Prepare Variables
|
|
32
|
+
id: prepare
|
|
33
|
+
run: |
|
|
34
|
+
platform=${{ matrix.platform }}
|
|
35
|
+
echo "platform_pair=${platform//\//-}" >> $GITHUB_OUTPUT
|
|
36
|
+
echo "scope=${{ github.ref_name }}-${platform}" >> $GITHUB_OUTPUT
|
|
37
|
+
- name: Docker meta
|
|
38
|
+
id: meta
|
|
39
|
+
uses: docker/metadata-action@v5
|
|
40
|
+
with:
|
|
41
|
+
images: |
|
|
42
|
+
${{ env.DOCKERHUB_REPO }}
|
|
43
|
+
${{ env.GHCR_REPO }}
|
|
44
|
+
- name: Checkout
|
|
45
|
+
uses: actions/checkout@v4
|
|
46
|
+
with:
|
|
47
|
+
fetch-depth: 0
|
|
48
|
+
- name: Log in to Docker Hub
|
|
49
|
+
uses: docker/login-action@v3.3.0
|
|
50
|
+
with:
|
|
51
|
+
username: ${{ secrets.DOCKER_USERNAME }}
|
|
52
|
+
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
53
|
+
|
|
54
|
+
- name: Log in to the Container registry
|
|
55
|
+
uses: docker/login-action@v3.3.0
|
|
56
|
+
with:
|
|
57
|
+
registry: ghcr.io
|
|
58
|
+
username: ${{ github.actor }}
|
|
59
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
60
|
+
- name: Set up QEMU
|
|
61
|
+
uses: docker/setup-qemu-action@v3.2.0
|
|
62
|
+
with:
|
|
63
|
+
platforms: ${{ matrix.platform }}
|
|
64
|
+
image: ${{ matrix.platform == 'linux/arm/v7' && 'tonistiigi/binfmt:qemu-v8.1.5' || 'tonistiigi/binfmt:latest' }}
|
|
65
|
+
- name: Setup Docker Buildx
|
|
66
|
+
uses: docker/setup-buildx-action@v3.8.0
|
|
67
|
+
- name: Build and push by digest
|
|
68
|
+
id: build
|
|
69
|
+
uses: docker/build-push-action@v6
|
|
70
|
+
with:
|
|
71
|
+
context: .
|
|
72
|
+
file: docker/Dockerfile-edge
|
|
73
|
+
build-args: VERSION=${{ steps.meta.outputs.version }}
|
|
74
|
+
push: ${{ github.event_name != 'pull_request' }}
|
|
75
|
+
platforms: ${{ matrix.platform }}
|
|
76
|
+
labels: ${{ steps.meta.outputs.labels }}
|
|
77
|
+
outputs: type=image,"name=${{ env.DOCKERHUB_REPO }},${{ env.GHCR_REPO }}",push-by-digest=true,name-canonical=true,push=true
|
|
78
|
+
cache-from: type=gha,scope=${{ steps.prepare.outputs.scope }}
|
|
79
|
+
cache-to: type=gha,scope=${{ steps.prepare.outputs.scope }},mode=max
|
|
80
|
+
- name: Export digest
|
|
81
|
+
run: |
|
|
82
|
+
mkdir -p /tmp/digests
|
|
83
|
+
digest="${{ steps.build.outputs.digest }}"
|
|
84
|
+
touch "/tmp/digests/${digest#sha256:}"
|
|
85
|
+
- name: Upload digest
|
|
86
|
+
uses: actions/upload-artifact@v4
|
|
87
|
+
with:
|
|
88
|
+
name: digests-${{ steps.prepare.outputs.platform_pair }}
|
|
89
|
+
path: /tmp/digests/*
|
|
90
|
+
if-no-files-found: error
|
|
91
|
+
retention-days: 1
|
|
92
|
+
merge-and-deploy:
|
|
93
|
+
runs-on: ubuntu-latest
|
|
94
|
+
needs:
|
|
95
|
+
- build
|
|
96
|
+
environment:
|
|
97
|
+
name: dockerhub
|
|
98
|
+
permissions:
|
|
99
|
+
contents: read
|
|
100
|
+
packages: write
|
|
101
|
+
attestations: write
|
|
102
|
+
id-token: write
|
|
103
|
+
steps:
|
|
104
|
+
- name: Download digests
|
|
105
|
+
uses: actions/download-artifact@v4
|
|
106
|
+
with:
|
|
107
|
+
path: /tmp/digests
|
|
108
|
+
pattern: digests-*
|
|
109
|
+
merge-multiple: true
|
|
110
|
+
- name: Login to Docker Hub
|
|
111
|
+
uses: docker/login-action@v3
|
|
112
|
+
with:
|
|
113
|
+
username: ${{ secrets.DOCKER_USERNAME }}
|
|
114
|
+
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
115
|
+
- name: Login to GHCR
|
|
116
|
+
uses: docker/login-action@v3
|
|
117
|
+
with:
|
|
118
|
+
registry: ghcr.io
|
|
119
|
+
username: ${{ github.repository_owner }}
|
|
120
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
121
|
+
- name: Set up Docker Buildx
|
|
122
|
+
uses: docker/setup-buildx-action@v3
|
|
123
|
+
- name: Docker meta
|
|
124
|
+
id: meta
|
|
125
|
+
uses: docker/metadata-action@v5
|
|
126
|
+
with:
|
|
127
|
+
images: |
|
|
128
|
+
${{ env.DOCKERHUB_REPO }}
|
|
129
|
+
${{ env.GHCR_REPO }}
|
|
130
|
+
tags: |
|
|
131
|
+
type=raw,value=edge
|
|
132
|
+
type=pep440,pattern={{version}}
|
|
133
|
+
- name: Create manifest list and push
|
|
134
|
+
working-directory: /tmp/digests
|
|
135
|
+
run: |
|
|
136
|
+
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
|
137
|
+
$(printf '${{ env.DOCKERHUB_REPO }}@sha256:%s ' *)
|
|
138
|
+
docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
|
|
139
|
+
$(printf '${{ env.GHCR_REPO }}@sha256:%s ' *)
|
|
140
|
+
- name: Inspect image
|
|
141
|
+
run: |
|
|
142
|
+
docker buildx imagetools inspect ${{ env.DOCKERHUB_REPO }}:${{ steps.meta.outputs.version }}
|
|
143
|
+
docker buildx imagetools inspect ${{ env.GHCR_REPO }}:${{ steps.meta.outputs.version }}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Build and Upload Python Package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
pypi-publish:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
environment:
|
|
12
|
+
name: pypi
|
|
13
|
+
url: https://pypi.org/p/carconnectivity-plugin-mqtt
|
|
14
|
+
permissions:
|
|
15
|
+
id-token: write
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
uses: actions/setup-python@v5
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.x"
|
|
25
|
+
- name: Install dependencies
|
|
26
|
+
run: |
|
|
27
|
+
python -m pip install --upgrade pip
|
|
28
|
+
python -m pip install build twine
|
|
29
|
+
- name: Build
|
|
30
|
+
run: |
|
|
31
|
+
python -m build
|
|
32
|
+
- name: Publish package distributions to PyPI
|
|
33
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
name: "CodeQL"
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
paths:
|
|
6
|
+
- '**.py'
|
|
7
|
+
schedule:
|
|
8
|
+
- cron: '33 5 * * 0'
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
analyze:
|
|
12
|
+
name: Analyze
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
permissions:
|
|
15
|
+
actions: read
|
|
16
|
+
contents: read
|
|
17
|
+
security-events: write
|
|
18
|
+
|
|
19
|
+
strategy:
|
|
20
|
+
fail-fast: false
|
|
21
|
+
matrix:
|
|
22
|
+
language: [ 'python' ]
|
|
23
|
+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
|
|
24
|
+
# Learn more:
|
|
25
|
+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
|
|
26
|
+
|
|
27
|
+
steps:
|
|
28
|
+
- name: Checkout repository
|
|
29
|
+
uses: actions/checkout@v4
|
|
30
|
+
|
|
31
|
+
# Initializes the CodeQL tools for scanning.
|
|
32
|
+
- name: Initialize CodeQL
|
|
33
|
+
uses: github/codeql-action/init@v3
|
|
34
|
+
with:
|
|
35
|
+
languages: ${{ matrix.language }}
|
|
36
|
+
# If you wish to specify custom queries, you can do so here or in a config file.
|
|
37
|
+
# By default, queries listed here will override any specified in a config file.
|
|
38
|
+
# Prefix the list here with "+" to use these queries and those in the config file.
|
|
39
|
+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
|
|
40
|
+
|
|
41
|
+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
|
42
|
+
# If this step fails, then you should remove it and run the build manually (see below)
|
|
43
|
+
- name: Autobuild
|
|
44
|
+
uses: github/codeql-action/autobuild@v3
|
|
45
|
+
|
|
46
|
+
# ℹ️ Command-line programs to run using the OS shell.
|
|
47
|
+
# 📚 https://git.io/JvXDl
|
|
48
|
+
|
|
49
|
+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
|
50
|
+
# and modify them (or add more) to build your code if your project
|
|
51
|
+
# uses a compiled language
|
|
52
|
+
|
|
53
|
+
#- run: |
|
|
54
|
+
# make bootstrap
|
|
55
|
+
# make release
|
|
56
|
+
|
|
57
|
+
- name: Perform CodeQL Analysis
|
|
58
|
+
uses: github/codeql-action/analyze@v3
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Update Docker Hub Description
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- main
|
|
6
|
+
paths:
|
|
7
|
+
- docker/README.md
|
|
8
|
+
- .github/workflows/publish_dockerhub-description.yml
|
|
9
|
+
jobs:
|
|
10
|
+
dockerHubDescription:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
environment:
|
|
13
|
+
name: dockerhub
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- name: Docker Hub Description
|
|
18
|
+
uses: peter-evans/dockerhub-description@v4.0.0
|
|
19
|
+
with:
|
|
20
|
+
username: ${{ secrets.DOCKER_USERNAME }}
|
|
21
|
+
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
22
|
+
repository: tillsteinbach/carconnectivity-mqtt
|
|
23
|
+
short-description: ${{ github.event.repository.description }}
|
|
24
|
+
readme-filepath: ./docker/README.md
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: Docker-Compose CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
# Triggers the workflow on push or pull request events but only for the master branch
|
|
5
|
+
push:
|
|
6
|
+
branches: [ main ]
|
|
7
|
+
paths:
|
|
8
|
+
- '.github/workflows/smoketest-docker-compose.yml'
|
|
9
|
+
- 'docker/test/docker-compose*.yml'
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
build:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
strategy:
|
|
15
|
+
matrix:
|
|
16
|
+
compose-file: [docker-compose.yml]
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- name: Build the docker-compose stack
|
|
20
|
+
run: docker compose -f docker/test/${{ matrix.compose-file }} up -d
|
|
21
|
+
- name: Container Status
|
|
22
|
+
run: docker ps -a
|
|
23
|
+
- name: Let containers run for 60s
|
|
24
|
+
uses: juliangruber/sleep-action@v2
|
|
25
|
+
with:
|
|
26
|
+
time: 60s
|
|
27
|
+
- name: Check logs for carconnectivity
|
|
28
|
+
run: |
|
|
29
|
+
docker logs test-carconnectivity-mqtt-1
|
|
30
|
+
docker logs test-carconnectivity-mqtt-1 2>&1 | grep -q 'CRITICAL:weconnect-mqtt:There was a problem when authenticating with WeConnect: Your account for test@test.de was not found. Would you like to create a new account?\|CRITICAL:weconnect-mqtt:There was a problem when authenticating with WeConnect: Login throttled, probably too many wrong logins. You have to wait some minutes until a new login attempt is possible'
|
|
31
|
+
- name: Check logs for mosquitto
|
|
32
|
+
run: docker logs docker_mosquitto_1
|
|
33
|
+
- name: Container Status
|
|
34
|
+
run: docker ps -a
|
|
35
|
+
- name: Check running containers again
|
|
36
|
+
run: |
|
|
37
|
+
docker ps -a | grep -q 'Up.*test-carconnectivity-mqtt-1'
|
|
38
|
+
docker ps -a | grep -q 'Up.*test-mosquitto-1'
|