Compare commits

...

19 Commits

Author SHA1 Message Date
semantic-release-bot
da83d88229 chore(release): 1.7.2 [skip ci]
## [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](a72ac7a1df))
* fix asset info for git commit ([00c95c4](00c95c42ea))
2021-04-08 22:17:41 +00:00
evanrich
00c95c42ea fix: fix asset info for git commit 2021-04-08 15:16:21 -07:00
evanrich
a72ac7a1df fix: Cleanup CHANGELOG.md since using new semantic-release format
fix: Remove package-lock.json file (only commit CHANGELOG.md)
2021-04-08 15:11:32 -07:00
semantic-release-bot
ffbde1eff5 chore(release): 1.7.1 [skip ci]
## [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](40ac8c5ada))
2021-04-08 22:06:11 +00:00
1e58da7572 Merge branch 'dev' into 'master'
fix: refactor Dockerfile to improve build

See merge request erichardson/py-eagle-mqtt!2
2021-04-08 22:04:41 +00:00
evanrich
40ac8c5ada fix: refactor Dockerfile to improve build 2021-04-08 14:59:58 -07:00
evanrich
2c49af0f32 Merge branch 'master' of https://gitlab.evanrichardsonphotography.com/erichardson/py-eagle-mqtt 2021-04-08 14:47:21 -07:00
evanrich
a4c715068d Fix: Commit 3.9.4-alpine3.13 base change 2021-04-08 14:44:39 -07:00
91b6464e8c build: add missing npm install for git plugin 2021-04-08 21:34:14 +00:00
b9ad4e8ec1 build: add git plugin to sematic-release config file 2021-04-08 21:31:46 +00:00
evanrich
ac8c039b33 feat: remove astral again to try and fix semver (again?) 2021-04-07 15:12:30 -07:00
Evan Richardson
46cc86ed0b revert: add astral back in due to mistake in release system 2021-04-07 15:08:19 -07:00
Evan Richardson
3db668ff98 feat: remove astral package, since it actually isn't being used 2021-04-07 15:00:27 -07:00
evanrich
99661058bd Add Semver release mechanism 2021-04-06 20:59:01 -07:00
evanrich
575e2fe6ce Fix tagging issue 2021-04-06 15:31:09 -07:00
evanrich
10c5443914 Fix dockerhub push issue 2021-04-06 15:30:14 -07:00
evanrich
058638eb83 Add README
update CHANGELOG
remove extra section of CI file
2021-04-06 15:21:31 -07:00
evanrich
8cb86673ed 1.6.8 release 2021-04-06 15:18:26 -07:00
evanrich
6b500de774 Added CHANGELOG
Refactored ci file
2021-04-06 15:17:26 -07:00
6 changed files with 118 additions and 23 deletions

View File

@@ -7,6 +7,7 @@ stages:
- test
- build
- push_local
- release
- push_dockerhub
.docker_base:
@@ -28,7 +29,13 @@ build:
- .docker_base
stage: build
script:
- docker build --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA ./Docker/
- docker pull $CI_REGISTRY_IMAGE:latest || true
- >
docker build
--pull
--cache-from $CI_REGISTRY_IMAGE:latest
--tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
./Docker/
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
push local:
@@ -53,13 +60,33 @@ push dockerhub:
CI_DOCKERHUB_IMAGE: index.docker.io/evanrich/py-eagle-mqtt
CI_DOCKERHUB_REGISTRY: docker.io
only:
- master
- 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:latest
- docker push $CI_DOCKERHUB_IMAGE
release:
image: node: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-]+)?$/
script:
- touch CHANGELOG.md
- npm install @semantic-release/gitlab @semantic-release/changelog @semantic-release/git
- npx semantic-release
artifacts:
paths:
- CHANGELOG.md
sast:
stage: test
include:

13
.releaserc.yml Normal file
View File

@@ -0,0 +1,13 @@
plugins:
- "@semantic-release/commit-analyzer"
- "@semantic-release/release-notes-generator"
- - "@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"

68
CHANGELOG.md Normal file
View File

@@ -0,0 +1,68 @@
## [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

View File

@@ -1,17 +1,16 @@
FROM python:3.9.3-alpine3.12
FROM python:3.9.4-alpine3.13
LABEL maintainer="Evan Richardson (evanrich81[at]gmail.com)"
LABEL version="1.6.6"
LABEL version="1.7.0"
WORKDIR /app
COPY . /app
COPY requirements.txt /app
COPY ./src/conf/logrotate/tHome /etc/logrotate.d/
ENV PYTHONPATH=/app/src/python
RUN apk --update add --no-cache logrotate \
&& pip3 install --no-cache-dir --upgrade pip \
&& 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"]
EXPOSE 22042

View File

@@ -1,4 +1,3 @@
astral==2.2
paho-mqtt==1.5.1
bottle==0.12.19
defusedxml==0.7.1

View File

@@ -1,22 +1,11 @@
# py-eagle-mqtt
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).
## UPDATES:
2020-04-03: I've moved the repo to my private Gitlab server, with a mirror set up to github. I did this so that I could easily integrate a CI/CD pipeline to build this image, as well as run some Security tools against the image to improve it's code quality. Please continue to open bug reports/issues/pull requests here in Github. Also swapped to defusedxml python module due to security issues around xmltree. Forgot to incrememnt the build number, but docker container latest is up-to-date.
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