Compare commits

...

59 Commits

Author SHA1 Message Date
25ed20032e Merge pull request 'chore(deps): update dependency docker/setup-buildx-action to v3.2.0' (#63) from renovate/docker-setup-buildx-action-3.x into master
All checks were successful
ci / docker (push) Successful in 13s
Reviewed-on: #63
2024-03-18 06:06:03 +00:00
10a5e1d6fb chore(deps): update dependency docker/setup-buildx-action to v3.2.0
All checks were successful
ci / docker (push) Successful in 24s
Bump version / create_release_tag (pull_request) Successful in 44s
2024-03-15 08:17:58 +00:00
91eec28708 Merge pull request 'chore(deps): update dependency docker/login-action to v3.1.0' (#61) from renovate/docker-login-action-3.x into master
All checks were successful
ci / docker (push) Successful in 19s
Reviewed-on: #61
2024-03-15 07:39:46 +00:00
90f5a16def Merge pull request 'chore(deps): update dependency docker/build-push-action to v5.3.0' (#60) from renovate/docker-build-push-action-5.x into master
Some checks are pending
ci / docker (push) Waiting to run
Reviewed-on: #60
2024-03-15 07:39:39 +00:00
7c9b777e64 chore(deps): update dependency docker/login-action to v3.1.0
All checks were successful
ci / docker (push) Successful in 22s
Bump version / create_release_tag (pull_request) Successful in 36s
2024-03-15 07:37:46 +00:00
0b728fad30 chore(deps): update dependency docker/build-push-action to v5.3.0
All checks were successful
ci / docker (push) Successful in 16s
Bump version / create_release_tag (pull_request) Successful in 50s
2024-03-15 07:37:43 +00:00
c586229d98 Merge pull request 'remove constraint on docker login' (#59) from erichardson-patch-1 into master
All checks were successful
ci / docker (push) Successful in 37s
Reviewed-on: #59
2024-03-07 08:36:50 +00:00
8594359d52 remove constraint on docker login
All checks were successful
ci / docker (push) Successful in 17s
Bump version / create_release_tag (pull_request) Successful in 37s
2024-03-07 08:36:44 +00:00
7e06b6ee40 Merge pull request 'add push' (#58) from erichardson-patch-1 into master
All checks were successful
ci / docker (push) Successful in 17s
Reviewed-on: #58
2024-03-07 08:34:29 +00:00
6ba8a26016 add push
Some checks failed
ci / docker (push) Successful in 19s
Bump version / create_release_tag (pull_request) Failing after 34s
2024-03-07 08:34:22 +00:00
39708d18c0 Merge pull request 'add build/tag to tagging code' (#57) from erichardson-patch-1 into master
All checks were successful
ci / docker (push) Successful in 14s
Reviewed-on: #57
2024-03-07 07:48:26 +00:00
5b6286ef14 add build/tag to tagging code
All checks were successful
ci / docker (push) Successful in 17s
Bump version / create_release_tag (pull_request) Successful in 34s
2024-03-07 07:47:36 +00:00
fde3bec39e Merge pull request 'Update .gitea/workflows/tag-release.yaml' (#56) from erichardson-patch-1 into master
All checks were successful
ci / docker (push) Successful in 16s
Reviewed-on: #56
2024-03-07 07:36:51 +00:00
8241d28a33 Update .gitea/workflows/tag-release.yaml
All checks were successful
ci / docker (push) Successful in 15s
Bump version / create_release_tag (pull_request) Successful in 5s
2024-03-07 07:36:45 +00:00
b76b24277c Merge pull request 'test changing git tagging to true' (#55) from erichardson-patch-1 into master
All checks were successful
ci / docker (push) Successful in 12s
Reviewed-on: #55
2024-03-07 07:35:47 +00:00
58cf4dab0e change tagging formats
Some checks failed
ci / docker (push) Successful in 16s
Bump version / create_release_tag (pull_request) Failing after 9s
2024-03-07 07:35:16 +00:00
4e52811a9a test changing git tagging to true
All checks were successful
ci / docker (push) Successful in 12s
test
2024-03-07 07:32:56 +00:00
5c41159b09 typo
All checks were successful
ci / docker (push) Successful in 16s
2024-03-07 07:29:18 +00:00
059a3ce1db add debug step to see labels 2024-03-07 07:28:16 +00:00
babea68dd1 Merge pull request 'test using ref tag instead' (#54) from erichardson-patch-1 into master
All checks were successful
ci / docker (push) Successful in 36s
Reviewed-on: #54
2024-03-07 07:19:48 +00:00
8213007523 test using ref tag instead
All checks were successful
ci / docker (push) Successful in 36s
Bump version / create_release_tag (pull_request) Successful in 8s
2024-03-07 07:19:39 +00:00
2a3aa28dd1 Merge pull request 'Add Raw format for semver' (#53) from fix-semver-match into master
All checks were successful
ci / docker (push) Successful in 36s
Reviewed-on: #53
2024-03-07 06:40:25 +00:00
867c752d84 Add Raw format for semver
All checks were successful
Bump version / create_release_tag (pull_request) Successful in 8s
ci / docker (push) Successful in 37s
2024-03-06 22:39:20 -08:00
7903e31e4b Merge pull request 'Empty commit' (#52) from dummycommit into master
All checks were successful
ci / docker (push) Successful in 37s
Reviewed-on: #52
2024-03-07 06:31:28 +00:00
02f5ca5a13 Empty commit
All checks were successful
ci / docker (push) Successful in 35s
Bump version / create_release_tag (pull_request) Successful in 7s
2024-03-06 22:30:20 -08:00
297c03b467 remove old file
All checks were successful
ci / docker (push) Successful in 34s
2024-03-06 22:25:39 -08:00
1811bd2b75 add semver tagging workflow
All checks were successful
ci / docker (push) Successful in 37s
Bump version / create_release_tag (pull_request) Successful in 7s
2024-03-07 06:20:06 +00:00
6c2f1f26ee replace image name
All checks were successful
ci / docker (push) Successful in 38s
2024-03-07 06:07:37 +00:00
6c9e6f792e fix context path
Some checks failed
ci / docker (push) Failing after 33s
2024-03-07 06:04:50 +00:00
75152dc33b Delete .gitea/workflows/publish.yaml
Some checks failed
ci / docker (push) Failing after 21s
2024-03-07 06:04:07 +00:00
93baabb743 fix indent typo and remove qemu
Some checks failed
Build and publish Image / build-and-push (push) Successful in 14s
ci / docker (push) Failing after 17s
2024-03-07 06:01:37 +00:00
26b05b1030 Try recommended workflow
Some checks failed
Build and publish Image / build-and-push (push) Successful in 16s
ci / docker (push) Failing after 37s
2024-03-07 05:59:52 +00:00
b6f5ecda3b Update Docker/src/python/tHome/broker/connect.py
All checks were successful
Build and publish Image / build-and-push (push) Successful in 15s
2024-03-06 23:54:04 +00:00
54c2e5af98 Update Docker/src/python/tHome/broker/connect.py
All checks were successful
Build and publish Image / build-and-push (push) Successful in 12s
2024-03-06 23:51:02 +00:00
2f12de623c Update Docker/src/python/tHome/broker/connect.py
All checks were successful
Build and publish Image / build-and-push (push) Successful in 15s
2024-03-06 23:49:30 +00:00
15341383a8 Update Docker/src/python/tHome/broker/connect.py
All checks were successful
Build and publish Image / build-and-push (push) Successful in 15s
2024-03-06 23:46:14 +00:00
ad0b0e45ef try placing callback version
All checks were successful
Build and publish Image / build-and-push (push) Successful in 17s
2024-03-06 23:42:05 +00:00
b891855f16 Update .gitea/workflows/publish.yaml
All checks were successful
Build and publish Image / build-and-push (push) Successful in 15s
2024-03-06 08:26:23 +00:00
3de86aa168 Update .gitea/workflows/publish.yaml
Some checks failed
Build and publish Image / build-and-push (push) Failing after 11s
2024-03-06 08:18:01 +00:00
140d07cd7a Update .gitea/workflows/publish.yaml
Some checks failed
Build and publish Image / build-and-push (push) Failing after 11s
2024-03-06 08:15:51 +00:00
0d66761ae9 Update .gitea/workflows/publish.yaml
Some checks failed
Build and publish Image / build-and-push (push) Failing after 9s
2024-03-06 08:14:00 +00:00
84aa71aaf1 Update .gitea/workflows/publish.yaml
Some checks failed
Build and publish Image / build-and-push (push) Failing after 13s
2024-03-06 08:12:29 +00:00
0a9074c1e0 Update .gitea/workflows/publish.yaml
Some checks failed
Build and publish Image / build-and-push (push) Failing after 13s
2024-03-06 08:10:42 +00:00
64b97c0e33 Update .gitea/workflows/publish.yaml
Some checks failed
Build and publish Image / build-and-push (push) Failing after 14s
2024-03-06 08:07:50 +00:00
8faf6c9341 Update .gitea/workflows/publish.yaml
Some checks failed
Build and publish Image / build-and-push (push) Failing after 49s
2024-03-06 07:59:49 +00:00
4baa37cc6c use build and push action
Some checks failed
Build and publish Image / build-and-push (push) Failing after 25s
2024-03-06 07:54:30 +00:00
09905cf8f1 use build and push action
Some checks failed
Semantic Release and Changelog / Patch (push) Successful in 10s
Semantic Release and Changelog / Build and Publish (push) Failing after 10s
2024-03-06 07:37:46 +00:00
dddebdda7d Update .gitea/workflows/publish.yaml
Some checks failed
Build and publish Image / build-and-push (push) Failing after 17s
2024-03-06 07:33:28 +00:00
95554eadf0 use docker login action 2024-03-06 07:33:09 +00:00
335acc544b bump paho-mqtt to 2.0.0
Some checks failed
Build and publish Image / build-and-push (push) Failing after 9s
2024-03-06 07:21:03 +00:00
e8333f4df1 Prep for pahoo-mqtt 2
Some checks failed
Build and publish Image / build-and-push (push) Failing after 15s
2024-03-06 07:20:14 +00:00
dca0f07a21 revert fe727724f0
Some checks failed
Semantic Release and Changelog / Patch (push) Successful in 7s
Semantic Release and Changelog / Build and Publish (push) Failing after 13s
revert chore(deps): update docker/login-action action to v3
2024-02-20 00:24:32 +00:00
a916aea59e Merge pull request 'chore(deps): update docker/login-action action to v3' (#50) from renovate/docker-login-action-3.x into master
Some checks failed
Semantic Release and Changelog / Patch (push) Successful in 7s
Semantic Release and Changelog / Build and Publish (push) Has been cancelled
Reviewed-on: #50
2024-02-20 00:20:45 +00:00
fe727724f0 chore(deps): update docker/login-action action to v3
Some checks failed
Build and publish Image / build-and-push (push) Failing after 12s
2024-02-20 00:13:49 +00:00
e1e0cf0ff2 Merge pull request 'chore(deps): update dependency docker/login-action to v2.2.0' (#48) from renovate/docker-login-action-2.x into master
Some checks failed
Semantic Release and Changelog / Patch (push) Successful in 8s
Semantic Release and Changelog / Build and Publish (push) Failing after 58s
Reviewed-on: #48
2024-02-18 03:05:57 +00:00
62d935ba4a Merge pull request 'chore(deps): update node.js to v20.11.1' (#49) from renovate/node-20.x into master
Some checks are pending
Semantic Release and Changelog / Patch (push) Waiting to run
Semantic Release and Changelog / Build and Publish (push) Waiting to run
Reviewed-on: #49
2024-02-18 03:05:39 +00:00
e25118fc33 chore(deps): update node.js to v20.11.1
Some checks failed
Build and publish Image / build-and-push (push) Failing after 9s
2024-02-18 03:04:31 +00:00
2a33fc9302 chore(deps): update dependency docker/login-action to v2.2.0
Some checks failed
Build and publish Image / build-and-push (push) Failing after 9s
2024-02-18 03:04:28 +00:00
5b14168d6b log to screen
Some checks failed
Semantic Release and Changelog / Patch (push) Successful in 7s
Semantic Release and Changelog / Build and Publish (push) Failing after 13s
2024-02-10 21:48:04 +00:00
8 changed files with 118 additions and 84 deletions

View File

@@ -1,27 +0,0 @@
name: Build and publish Image
run-name: ${{ gitea.actor }} is building py-eagle-mqtt image
on:
push:
branches:
- '*' # matches every branch that doesn't contain a '/'
- '*/*' # matches every branch containing a single '/'
- '**' # matches every branch
- '!master' # excludes master
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
- name: Build Docker image
run: docker build -t harbor.evanshome.io/library/py-eagle-mqtt:dev ./Docker/
- name: Login to Harbor
run: docker login -u ${{ secrets.HARBOR_USERNAME }} -p ${{ secrets.HARBOR_PASSWORD }} harbor.evanshome.io
- name: Push Docker image to Harbor
run: docker push harbor.evanshome.io/library/py-eagle-mqtt:dev

View File

@@ -1,63 +1,64 @@
name: Semantic Release and Changelog
run-name: ${{ gitea.actor }} is running Semantic Release
name: ci
on:
schedule:
- cron: "0 10 * * *"
push:
branches:
- 'master'
- "**"
tags:
- "v*.*.*"
pull_request:
branches:
- "main"
jobs:
Patch:
name: Patch
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
fetch-depth: '0'
- name: Minor version for each merge
id: taggerDryRun
uses: anothrNick/github-tag-action@1.67.0
env:
GITHUB_TOKEN: ${{ secrets.REPO_PUSH_TOKEN }}
WITH_V: true
DRY_RUN: true
# list of Docker images to use as base name for tags
images: |
harbor.evanshome.io/library/py-eagle-mqtt
# generate Docker tags based on the following events/attributes
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=semver,pattern={{raw}}
type=semver,pattern={{version}}
type=sha
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.2.0
- name: Login to Harbor
if: github.event_name != 'pull_request'
uses: docker/login-action@v3.1.0
with:
registry: harbor.evanshome.io
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_PASSWORD }}
- name: echo new tag
run: |
echo "The next tag version will be: ${{ steps.taggerDryRun.outputs.new_tag }}"
- name: echo tag
run: |
echo "The current tag is: ${{ steps.taggerDryRun.outputs.tag }}"
- name: echo part
run: |
echo "The version increment was: ${{ steps.taggerDryRun.outputs.part }}"
echo "${{ steps.meta.outputs.tags }}"
# - name: Build and push
# uses: docker/build-push-action@v5.3.0
# with:
# context: ./Docker/
# push: ${{ github.event_name != 'pull_request' }}
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
Build-and-Publish:
name: Build and Publish
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
- name: Login to Harbor
uses: docker/login-action@v2
with:
registry: harbor.evanshome.io
username: "robot$registry-bot"
password: ${{ secrets.HARBOR_PASSWORD }}
- name: Build Docker image
run: docker build -t harbor.evanshome.io/library/py-eagle-mqtt:latest ./Docker/
- name: Minor version for each merge
id: taggerFinal
uses: anothrNick/github-tag-action@1.67.0
env:
GITHUB_TOKEN: ${{ secrets.REPO_PUSH_TOKEN }}
WITH_V: true
GIT_API_TAGGING: false
- name: tag with name
run: docker tag harbor.evanshome.io/library/py-eagle-mqtt:latest harbor.evanshome.io/library/py-eagle-mqtt:${{ steps.taggerFinal.outputs.new_tag }}
- name: Push Docker image to Harbor
run: docker push --all-tags harbor.evanshome.io/library/py-eagle-mqtt

View File

@@ -0,0 +1,60 @@
name: Bump version
on:
pull_request:
types:
- closed
branches:
- master
jobs:
create_release_tag:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4.1.1
with:
ref: ${{ github.event.pull_request.merge_commit_sha }}
fetch-depth: '0'
- name: Create Release Tag
id: taggerFinal
uses: anothrNick/github-tag-action@1.67.0
with:
GITHUB_TOKEN: ${{ secrets.REPO_PUSH_TOKEN }}
WITH_V: true
GIT_API_TAGGING: false
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
harbor.evanshome.io/library/py-eagle-mqtt
# generate Docker tags based on the following events/attributes
flavor: |
latest=true
tags: |
type=schedule
type=ref,event=branch
type=ref,event=pr
type=raw,value=${{ steps.taggerFinal.outputs.new_tag }}
type=semver,pattern={{raw}}
type=semver,pattern={{version}}
type=sha
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.2.0
- name: Login to Harbor
uses: docker/login-action@v3.1.0
with:
registry: harbor.evanshome.io
username: ${{ secrets.HARBOR_USERNAME }}
password: ${{ secrets.HARBOR_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5.3.0
with:
context: ./Docker/
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@@ -31,7 +31,7 @@ build:
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
release:
image: node:20.10.0-alpine3.18
image: node:20.11.1-alpine3.18
stage: release
only:
refs:

View File

@@ -28,6 +28,6 @@ RUN apk --update add --no-cache logrotate && \
COPY . /app
CMD ["python3", "-u", "/app/src/bin/tHome-eagle.py", "-c", "/app/src/conf"]
CMD ["python3", "-u", "/app/src/bin/tHome-eagle.py", "-c", "/app/src/conf", "-l", "stdout"]
EXPOSE 22042

View File

@@ -1,3 +1,3 @@
paho-mqtt==1.6.1
paho-mqtt==2.0.0
bottle==0.12.25
defusedxml==0.7.1

View File

@@ -26,7 +26,7 @@ class Client ( mqtt.Client ):
self.on_connect = Client.on_connect
self.on_message = Client.on_message
def on_connect( self, userData, flags, rc ):
def on_connect( self, userdata, flags, reason_code, properties ):
self.subscribe( '#' )
def on_message( self, userData, msg ):
@@ -62,4 +62,4 @@ client.loop_start()
while True:
pass
client.loop_stop( force=True )
client.loop_stop()

View File

@@ -11,7 +11,7 @@ class Client( mqtt.Client ):
"""Logging client
"""
def __init__( self, log=None ):
mqtt.Client.__init__( self )
mqtt.Client.__init__( self, mqtt.CallbackAPIVersion.VERSION2 )
self._logger = log
# Restore callbacks overwritten by stupid mqtt library
self.on_log = Client.on_log