Compare commits
96 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
adb4cb6060 | ||
| 13cb51706b | |||
| e83a7bbfae | |||
|
|
49a8693fc0 | ||
| b143379f20 | |||
|
|
534a8b805e | ||
| de1d073c6d | |||
| d3e34871aa | |||
| 3e8aead632 | |||
| 9498554758 | |||
| c2167d5d97 | |||
| 6eb2d0145e | |||
| b1ca0497b0 | |||
| 589fb4fcf7 | |||
| 51213c51e0 | |||
| da20bbe045 | |||
| bb17ad6135 | |||
| 40c7d020d2 | |||
| 9b5adba3ed | |||
|
|
73740ffa39 | ||
|
|
e513752c46 | ||
|
|
cfb392dc6a | ||
| f3f78c4ad5 | |||
| d1723db798 | |||
| ba8486017a | |||
| 37d8b17076 | |||
|
|
da83d88229 | ||
|
|
00c95c42ea | ||
|
|
a72ac7a1df | ||
|
|
ffbde1eff5 | ||
| 1e58da7572 | |||
|
|
40ac8c5ada | ||
|
|
2c49af0f32 | ||
|
|
a4c715068d | ||
| 91b6464e8c | |||
| b9ad4e8ec1 | |||
|
|
ac8c039b33 | ||
|
|
46cc86ed0b | ||
|
|
3db668ff98 | ||
|
|
99661058bd | ||
|
|
575e2fe6ce | ||
|
|
10c5443914 | ||
|
|
058638eb83 | ||
|
|
8cb86673ed | ||
|
|
6b500de774 | ||
| 6b26f12b9a | |||
| 08b304be38 | |||
|
|
e6f6342027 | ||
|
|
197c762909 | ||
| e4a88ea26b | |||
| cadbfac97e | |||
| 0f2098d884 | |||
| 8f25241cc8 | |||
| 0390fd17e7 | |||
| 11e271a368 | |||
| 30d300c7fd | |||
| 1cf7d117c7 | |||
| 7e2fd67729 | |||
| 245ebc8c2d | |||
| 119f854de5 | |||
|
|
c2925e425d | ||
|
|
b394aa9ee8 | ||
| e6231d837f | |||
|
|
dfb700aae4 | ||
|
|
e9b52ec54f | ||
|
|
695c4b3655 | ||
|
|
7b80ce48e1 | ||
|
|
ff72639dbb | ||
| 096225b537 | |||
| eb78e4bd7c | |||
| 44ff9a7c9a | |||
| 2ae6ccabb9 | |||
| df9bbd1d47 | |||
| 41c82e52b6 | |||
| 44fef1d926 | |||
| f0a1401018 | |||
| 54a838c2da | |||
| 550ba6df4a | |||
| 620ca572ff | |||
| 4674578d88 | |||
| 9913d0bcb3 | |||
| b24144cb4b | |||
| f568d5ba5b | |||
| 6e3673fced | |||
| f1a87650f0 | |||
| 29a221f449 | |||
| 2f556ceadc | |||
| 5e7d61c499 | |||
| 7f2a4e40d6 | |||
| 2052bcb96c | |||
| 9f4cfceee7 | |||
| 88ac743dda | |||
| 631ee88812 | |||
| 4565a6f7ba | |||
| ede4bb616d | |||
| f30ae06f45 |
159
.gitlab-ci.yml
159
.gitlab-ci.yml
@@ -1,36 +1,147 @@
|
|||||||
# This file is a template, and might need editing before it works on your project.
|
# You can override the included template(s) by including variable overrides
|
||||||
# Official docker image.
|
# See https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
|
||||||
image: docker:latest
|
# Note that environment variables can be set in several places
|
||||||
|
# See https://docs.gitlab.com/ee/ci/variables/#priority-of-environment-variables
|
||||||
services:
|
|
||||||
- docker:18.09-dind
|
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- build
|
- test
|
||||||
|
- build
|
||||||
|
- push_local
|
||||||
|
- release
|
||||||
|
- push_dockerhub
|
||||||
|
|
||||||
variables:
|
.docker_base:
|
||||||
DOCKER_HOST: tcp://localhost:2375
|
image: docker:20.10.6-dind
|
||||||
|
services:
|
||||||
|
- name: docker:20.10.6-dind
|
||||||
|
command: ["--tls=false"]
|
||||||
|
variables:
|
||||||
DOCKER_DRIVER: overlay2
|
DOCKER_DRIVER: overlay2
|
||||||
#IMAGE_TAG: erichardson/py-eagle-mqtt:$CI_COMMIT_TAG
|
DOCKER_HOST: tcp://127.0.0.1:2375/
|
||||||
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
DOCKER_TLS_CERTDIR: ""
|
||||||
|
IMAGE_TAG: "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
|
||||||
before_script:
|
FF_GITLAB_REGISTRY_HELPER_IMAGE: 1
|
||||||
|
before_script:
|
||||||
- docker version
|
- docker version
|
||||||
- docker info
|
- docker info
|
||||||
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
|
||||||
|
|
||||||
build:
|
build:
|
||||||
only:
|
extends:
|
||||||
- tags
|
- .docker_base
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- docker build -t $IMAGE_TAG -t $CI_COMMIT_TAG ./Docker/
|
- docker pull $CI_REGISTRY_IMAGE:latest || true
|
||||||
- docker push $IMAGE_TAG $CI_COMMIT_TAG
|
- >
|
||||||
|
docker build
|
||||||
|
--pull
|
||||||
|
--cache-from $CI_REGISTRY_IMAGE:latest
|
||||||
|
--tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
||||||
|
--build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ')
|
||||||
|
--build-arg VCS_REF=$CI_COMMIT_SHORT_SHA
|
||||||
|
./Docker/
|
||||||
|
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
||||||
|
|
||||||
#build:
|
push local:
|
||||||
# stage: build
|
extends:
|
||||||
# script:
|
- .docker_base
|
||||||
# - docker build --pull -t "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG" .
|
stage: push_local
|
||||||
# - docker push "$CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG"
|
variables:
|
||||||
# except:
|
GIT_STRATEGY: none
|
||||||
# - master
|
only:
|
||||||
|
- master
|
||||||
|
script:
|
||||||
|
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
||||||
|
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:latest
|
||||||
|
- docker push $CI_REGISTRY_IMAGE:latest
|
||||||
|
|
||||||
|
push dockerhub:
|
||||||
|
extends:
|
||||||
|
- .docker_base
|
||||||
|
stage: push_dockerhub
|
||||||
|
variables:
|
||||||
|
GIT_STRATEGY: none
|
||||||
|
CI_DOCKERHUB_IMAGE: index.docker.io/evanrich/py-eagle-mqtt
|
||||||
|
CI_DOCKERHUB_REGISTRY: docker.io
|
||||||
|
only:
|
||||||
|
- tags
|
||||||
|
script:
|
||||||
|
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
||||||
|
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_DOCKERHUB_IMAGE:$CI_COMMIT_REF_NAME
|
||||||
|
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_DOCKERHUB_IMAGE:latest
|
||||||
|
- docker login -u "$CI_DOCKERHUB_USER" -p "$CI_DOCKERHUB_PASSWORD" $CI_DOCKERHUB_REGISTRY
|
||||||
|
- docker push $CI_DOCKERHUB_IMAGE --all-tags
|
||||||
|
|
||||||
|
release:
|
||||||
|
image: node:16-alpine3.13
|
||||||
|
stage: release
|
||||||
|
only:
|
||||||
|
refs:
|
||||||
|
- master
|
||||||
|
- alpha
|
||||||
|
# This matches maintenance branches
|
||||||
|
- /^(([0-9]+)\.)?([0-9]+)\.x/
|
||||||
|
# This matches pre-releases
|
||||||
|
- /^([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?$/
|
||||||
|
except:
|
||||||
|
refs:
|
||||||
|
- tags
|
||||||
|
script:
|
||||||
|
- touch CHANGELOG.md
|
||||||
|
- apk add --no-cache git
|
||||||
|
- npm install @semantic-release/gitlab @semantic-release/changelog
|
||||||
|
@semantic-release/git conventional-changelog-eslint
|
||||||
|
- npx semantic-release
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- CHANGELOG.md
|
||||||
|
|
||||||
|
sast:
|
||||||
|
stage: test
|
||||||
|
include:
|
||||||
|
- template: Security/SAST.gitlab-ci.yml
|
||||||
|
|
||||||
|
sonarqube-check:
|
||||||
|
stage: test
|
||||||
|
image:
|
||||||
|
name: sonarsource/sonar-scanner-cli:4.6
|
||||||
|
entrypoint: [""]
|
||||||
|
variables:
|
||||||
|
SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
|
||||||
|
GIT_DEPTH: "0" # Tells git to fetch all the branches of the project, required by the analysis task
|
||||||
|
cache:
|
||||||
|
key: "${CI_JOB_NAME}"
|
||||||
|
paths:
|
||||||
|
- .sonar/cache
|
||||||
|
script:
|
||||||
|
- sonar-scanner
|
||||||
|
allow_failure: true
|
||||||
|
only:
|
||||||
|
- master # or the name of your main branch
|
||||||
|
- branches
|
||||||
|
|
||||||
|
trivy:
|
||||||
|
stage: test
|
||||||
|
extends:
|
||||||
|
- .docker_base
|
||||||
|
before_script:
|
||||||
|
- export TRIVY_VERSION=$(wget -qO - "https://api.github.com/repos/aquasecurity/trivy/releases/latest" | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/')
|
||||||
|
- echo $TRIVY_VERSION
|
||||||
|
- wget --no-verbose https://github.com/aquasecurity/trivy/releases/download/v${TRIVY_VERSION}/trivy_${TRIVY_VERSION}_Linux-64bit.tar.gz -O - | tar -zxvf -
|
||||||
|
allow_failure: true
|
||||||
|
script:
|
||||||
|
# Build image
|
||||||
|
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA ./Docker/
|
||||||
|
# Build report
|
||||||
|
- ./trivy --exit-code 0 --cache-dir .trivycache/ --no-progress --format template --template "@contrib/gitlab.tpl" -o gl-container-scanning-report.json image $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
||||||
|
# Print report
|
||||||
|
- ./trivy --exit-code 0 --cache-dir .trivycache/ --no-progress --severity HIGH image $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
||||||
|
# Fail on severe vulnerabilities
|
||||||
|
- ./trivy --exit-code 1 --cache-dir .trivycache/ --severity CRITICAL --no-progress image $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
||||||
|
cache:
|
||||||
|
paths:
|
||||||
|
- .trivycache/
|
||||||
|
# Enables https://docs.gitlab.com/ee/user/application_security/container_scanning/ (Container Scanning report is available on GitLab EE Ultimate or GitLab.com Gold)
|
||||||
|
artifacts:
|
||||||
|
reports:
|
||||||
|
container_scanning: gl-container-scanning-report.json
|
||||||
|
|||||||
6
.gitlab/sast-ruleset.toml
Normal file
6
.gitlab/sast-ruleset.toml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[bandit]
|
||||||
|
[[bandit.ruleset]]
|
||||||
|
disable = true
|
||||||
|
[bandit.ruleset.identifier]
|
||||||
|
type = "bandit_test_id"
|
||||||
|
value = "B101"
|
||||||
45
.releaserc.yml
Normal file
45
.releaserc.yml
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
plugins:
|
||||||
|
- - "@semantic-release/commit-analyzer"
|
||||||
|
- preset: eslint
|
||||||
|
releaseRules:
|
||||||
|
- tag: Breaking
|
||||||
|
release: major
|
||||||
|
- tag: Build
|
||||||
|
release: patch
|
||||||
|
- tag: Chore
|
||||||
|
release: minor
|
||||||
|
- tag: Fix
|
||||||
|
release: patch
|
||||||
|
- tag: New
|
||||||
|
release: minor
|
||||||
|
- tag: Update
|
||||||
|
release: minor
|
||||||
|
- tag: Upgrade
|
||||||
|
release: minor
|
||||||
|
- - "@semantic-release/release-notes-generator"
|
||||||
|
- preset: eslint
|
||||||
|
releaseRules:
|
||||||
|
- tag: Breaking
|
||||||
|
release: major
|
||||||
|
- tag: Build
|
||||||
|
release: patch
|
||||||
|
- tag: Chore
|
||||||
|
release: minor
|
||||||
|
- tag: Fix
|
||||||
|
release: patch
|
||||||
|
- tag: New
|
||||||
|
release: minor
|
||||||
|
- tag: Update
|
||||||
|
release: minor
|
||||||
|
- tag: Upgrade
|
||||||
|
release: minor
|
||||||
|
- - "@semantic-release/changelog"
|
||||||
|
- changelogFile: CHANGELOG.md
|
||||||
|
- "@semantic-release/gitlab"
|
||||||
|
- - "@semantic-release/git"
|
||||||
|
- assets: CHANGELOG.md
|
||||||
|
branches:
|
||||||
|
- "master"
|
||||||
|
- "+([0-9])?(.{+([0-9]),x}).x"
|
||||||
|
- name: "alpha"
|
||||||
|
prerelease: "alpha"
|
||||||
102
CHANGELOG.md
Normal file
102
CHANGELOG.md
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
## [1.7.6](https://gitlab.evanrichardsonphotography.com/erichardson/py-eagle-mqtt/compare/v1.7.5...v1.7.6) (2021-05-10)
|
||||||
|
|
||||||
|
|
||||||
|
### Build
|
||||||
|
|
||||||
|
* Change docker driver to overlay2 ([13cb517](https://gitlab.evanrichardsonphotography.com/erichardson/py-eagle-mqtt/commit/13cb51706b97f25486f62dd6985903e834d28ee2))
|
||||||
|
|
||||||
|
## [1.7.5](https://gitlab.evanrichardsonphotography.com/erichardson/py-eagle-mqtt/compare/v1.7.4...v1.7.5) (2021-05-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Build
|
||||||
|
|
||||||
|
* push all tags instead of just latest ([b143379](https://gitlab.evanrichardsonphotography.com/erichardson/py-eagle-mqtt/commit/b143379f2018f410677a9646234e7b483d9277d3))
|
||||||
|
|
||||||
|
## [1.7.4](https://gitlab.evanrichardsonphotography.com/erichardson/py-eagle-mqtt/compare/v1.7.3...v1.7.4) (2021-05-09)
|
||||||
|
|
||||||
|
|
||||||
|
### Build
|
||||||
|
|
||||||
|
* cleanup long install line ([de1d073](https://gitlab.evanrichardsonphotography.com/erichardson/py-eagle-mqtt/commit/de1d073c6daf5d43fb7d9b7dafddd3b0cbcffc9b))
|
||||||
|
|
||||||
|
### ci
|
||||||
|
|
||||||
|
* Add git to node image ([6eb2d01](https://gitlab.evanrichardsonphotography.com/erichardson/py-eagle-mqtt/commit/6eb2d0145eff50c3243a364d821e769ae2ee06c9))
|
||||||
|
* change semantic release image to alpine to save space, updated to node 16 ([b1ca049](https://gitlab.evanrichardsonphotography.com/erichardson/py-eagle-mqtt/commit/b1ca0497b0b51e0c50ca1e5f99e5c8abd4224d53))
|
||||||
|
* Update DinD base to 20.10.6 and semantic release to node:15. Also pin sonar-scanner-cli to 4.6 ([589fb4f](https://gitlab.evanrichardsonphotography.com/erichardson/py-eagle-mqtt/commit/589fb4fcf7841d3c5f08327d7fb5d5c107562ed6))
|
||||||
|
|
||||||
|
## [1.7.3](https://gitlab.evanrichardsonphotography.com/erichardson/py-eagle-mqtt/compare/v1.7.2...v1.7.3) (2021-04-12)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Empty commit to get recent changes into build (last commit should've been labeled this) ([e513752](https://gitlab.evanrichardsonphotography.com/erichardson/py-eagle-mqtt/commit/e513752c46cc0b3beb93530f6549661d67196905))
|
||||||
|
|
||||||
|
## [1.7.2](https://gitlab.evanrichardsonphotography.com/erichardson/py-eagle-mqtt/compare/v1.7.1...v1.7.2) (2021-04-08)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* Cleanup CHANGELOG.md since using new semantic-release format ([a72ac7a](https://gitlab.evanrichardsonphotography.com/erichardson/py-eagle-mqtt/commit/a72ac7a1df91cb2231e38e8bbceb5ccf9c93328a))
|
||||||
|
* fix asset info for git commit ([00c95c4](https://gitlab.evanrichardsonphotography.com/erichardson/py-eagle-mqtt/commit/00c95c42ea98921a1b2da9d2069d41e8e32f34f5))
|
||||||
|
|
||||||
|
## [1.7.1](https://gitlab.evanrichardsonphotography.com/erichardson/py-eagle-mqtt/compare/v1.7.0...v1.7.1) (2021-04-08)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* refactor Dockerfile to improve build ([40ac8c5](https://gitlab.evanrichardsonphotography.com/erichardson/py-eagle-mqtt/commit/40ac8c5ada9b993f53b72dcc14b2d9b7cd183e2f))
|
||||||
|
|
||||||
|
## [1.6.10] - 2021-04-06
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Fix docker tagging issue
|
||||||
|
|
||||||
|
## [1.6.9] - 2021-04-06
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Remove release-cli section of CI file
|
||||||
|
- Add updated README.md
|
||||||
|
|
||||||
|
## [1.6.8] - 2021-04-06
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Fixed slight issue with tagging
|
||||||
|
|
||||||
|
## [1.6.7] - 2021-04-06
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Updated base image to Python 3.9.4-alpine3.13
|
||||||
|
- Moved changes to this file
|
||||||
|
|
||||||
|
### Removed
|
||||||
|
|
||||||
|
- Changelog from README.md
|
||||||
|
|
||||||
|
## [1.6.6] - 2021-04-03
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added CI/CD pipeline to project
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Moved project to my own personal Gitlab server for CI/CD pipelines as well as to run security scans on the container image and code
|
||||||
|
|
||||||
|
- Updated base image to Python 3.9.3-alpine3.12
|
||||||
|
|
||||||
|
## [Unversioned history]
|
||||||
|
|
||||||
|
- 2019-07-24: Rebase to python 3.7.4-alpine3.10, update bottle to 0.12.17
|
||||||
|
|
||||||
|
- 2019-04-12: Rebase to python 3.7.3-alpine3.9
|
||||||
|
|
||||||
|
- 2019-03-08: Rebase to python 3.7.2-alpine3.9, update bottle and astral versions to latest
|
||||||
|
|
||||||
|
- 2019-01-03: Rebase to python 3.7.2-alpine3.8, changed logging level to Info (should output to /var/log/tHome/eagle.log)
|
||||||
|
|
||||||
|
- 2018-09-10: Ported to Python3, Added pricing info. Merged into master branch
|
||||||
@@ -1,17 +1,26 @@
|
|||||||
FROM python:3.7.4-alpine3.10
|
FROM python:3.9.4-alpine3.13
|
||||||
|
|
||||||
LABEL maintainer="Evan Richardson (evanrich81[at]gmail.com)"
|
LABEL maintainer="Evan Richardson (evanrich81[at]gmail.com)"
|
||||||
LABEL version="1.5.1"
|
|
||||||
|
ARG BUILD_DATE
|
||||||
|
ARG VCS_REF
|
||||||
|
|
||||||
|
LABEL org.label-schema.schema-version="1.0"
|
||||||
|
LABEL org.label-schema.build-date=$BUILD_DATE
|
||||||
|
LABEL org.label-schema.name="evanrich/py-eagle-mqtt"
|
||||||
|
LABEL org.label-schema.description="Python Rainforest Eagle to MQTT Application"
|
||||||
|
LABEL org.label-schema.vcs-url="https://github.com/evanrich/py-eagle-mqtt"
|
||||||
|
LABEL org.label-schema.vcs-ref=$VCS_REF
|
||||||
|
LABEL org.label-schema.vendor="Evan Richardson"
|
||||||
|
LABEL org.label-schema.docker.cmd="docker run --name=py-eagle-mqtt -e MQTT_BROKER_IP=<IP> -e MQTT_BROKER_PORT=1883 -p 22042:22042 -d evanrich/py-eagle-mqtt"
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . /app
|
COPY requirements.txt /app
|
||||||
COPY ./src/conf/logrotate/tHome /etc/logrotate.d/
|
COPY ./src/conf/logrotate/tHome /etc/logrotate.d/
|
||||||
ENV PYTHONPATH=/app/src/python
|
ENV PYTHONPATH=/app/src/python
|
||||||
RUN apk --update add --no-cache logrotate \
|
RUN apk --update add --no-cache logrotate \
|
||||||
&& pip3 install --no-cache-dir --upgrade pip \
|
&& pip3 install --no-cache-dir --upgrade pip \
|
||||||
&& pip3 install --no-cache-dir -r requirements.txt
|
&& pip3 install --no-cache-dir -r requirements.txt
|
||||||
#RUN rm -rf /var/cache/apk
|
COPY . /app
|
||||||
|
|
||||||
CMD ["/app/src/bin/tHome-eagle.py", "-c", "/app/src/conf"]
|
CMD ["/app/src/bin/tHome-eagle.py", "-c", "/app/src/conf"]
|
||||||
|
|
||||||
EXPOSE 22042
|
EXPOSE 22042
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
astral==1.10.1
|
paho-mqtt==1.5.1
|
||||||
paho-mqtt==1.4.0
|
bottle==0.12.19
|
||||||
bottle==0.12.17
|
defusedxml==0.7.1
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ keepAlive = os.getenv('KEEPALIVE', 60)
|
|||||||
#
|
#
|
||||||
#===========================================================================
|
#===========================================================================
|
||||||
user = os.getenv('MQTT_USER', None)
|
user = os.getenv('MQTT_USER', None)
|
||||||
password = os.getenv('MQTT_PASS', None)
|
password = os.getenv('MQTT_PASSWORD', None)
|
||||||
|
|
||||||
#===========================================================================
|
#===========================================================================
|
||||||
#
|
#
|
||||||
@@ -31,5 +31,3 @@ ca_certs = [
|
|||||||
|
|
||||||
certFile = None
|
certFile = None
|
||||||
keyFile = None
|
keyFile = None
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ from . import messages as msg
|
|||||||
#from .InstantDemand import InstantDemand
|
#from .InstantDemand import InstantDemand
|
||||||
#from .Reading import Reading
|
#from .Reading import Reading
|
||||||
#from .Total import Total
|
#from .Total import Total
|
||||||
import xml.etree.ElementTree as ET
|
import defusedxml.ElementTree as ET
|
||||||
import socket
|
import socket
|
||||||
|
|
||||||
#==========================================================================
|
#==========================================================================
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
# Parse XML messages into an object.
|
# Parse XML messages into an object.
|
||||||
#
|
#
|
||||||
#===========================================================================
|
#===========================================================================
|
||||||
import xml.etree.ElementTree as ET
|
import defusedxml.ElementTree as ET
|
||||||
from . import messages
|
from . import messages
|
||||||
|
|
||||||
#==========================================================================
|
#==========================================================================
|
||||||
|
|||||||
21
README.md
21
README.md
@@ -1,19 +1,20 @@
|
|||||||
# py-eagle-mqtt
|
# py-eagle-mqtt
|
||||||
|
|
||||||
Python3 based Docker for Eagle to MQTT reader
|
Python3 based Docker for Eagle to MQTT reader
|
||||||
|
|
||||||
I have only ported this into a dockerfile, All Original code (with one minor modification for XML root tag) is credit to [Ted Drain - TD22057](https://github.com/TD22057/T-Home).
|
I have only ported this into a dockerfile, as well as made some changes to code for security or other purposes. All Original code is credit to [Ted Drain - TD22057](https://github.com/TD22057/T-Home).
|
||||||
|
|
||||||
|
This project utilizes the following tools:
|
||||||
|
|
||||||
|
[](https://github.com/semantic-release/semantic-release)
|
||||||
|
[]()
|
||||||
|
[]()
|
||||||
|
[]()
|
||||||
|
[]()
|
||||||
|
|
||||||
## UPDATES:
|
## UPDATES:
|
||||||
2019-07-24: Rebase to python 3.7.4-alpine3.10, update bottle to 0.12.17
|
|
||||||
|
|
||||||
2019-04-12: Rebase to python 3.7.3-alpine3.9
|
|
||||||
|
|
||||||
2019-03-08: Rebase to python 3.7.2-alpine3.9, update bottle and astral versions to latest
|
|
||||||
|
|
||||||
2019-01-03: Rebase to python 3.7.2-alpine3.8, changed logging level to Info (should output to /var/log/tHome/eagle.log)
|
|
||||||
|
|
||||||
2018-09-10: Ported to Python3, Added pricing info. Merged into master branch
|
|
||||||
|
|
||||||
|
2020-04-06: Moved Updates to a CHANGELOG.md file to clean this up.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: extensions/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: py-eagle-mqtt
|
name: py-eagle-mqtt
|
||||||
|
|||||||
3
sonar-project.properties
Normal file
3
sonar-project.properties
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
sonar.projectKey=erichardson_py-eagle-mqtt_AXkgI9tRLcemhRz3NCjo
|
||||||
|
sonar.qualitygate.wait=true
|
||||||
|
sonar.projectBaseDir=Docker/src
|
||||||
Reference in New Issue
Block a user