Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3db668ff98 | ||
|
|
99661058bd | ||
|
|
575e2fe6ce | ||
|
|
10c5443914 | ||
|
|
058638eb83 | ||
|
|
8cb86673ed | ||
|
|
6b500de774 |
@@ -7,6 +7,7 @@ stages:
|
|||||||
- test
|
- test
|
||||||
- build
|
- build
|
||||||
- push_local
|
- push_local
|
||||||
|
- release
|
||||||
- push_dockerhub
|
- push_dockerhub
|
||||||
|
|
||||||
.docker_base:
|
.docker_base:
|
||||||
@@ -28,7 +29,13 @@ build:
|
|||||||
- .docker_base
|
- .docker_base
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
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
|
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
||||||
|
|
||||||
push local:
|
push local:
|
||||||
@@ -53,13 +60,33 @@ push dockerhub:
|
|||||||
CI_DOCKERHUB_IMAGE: index.docker.io/evanrich/py-eagle-mqtt
|
CI_DOCKERHUB_IMAGE: index.docker.io/evanrich/py-eagle-mqtt
|
||||||
CI_DOCKERHUB_REGISTRY: docker.io
|
CI_DOCKERHUB_REGISTRY: docker.io
|
||||||
only:
|
only:
|
||||||
- master
|
- tags
|
||||||
script:
|
script:
|
||||||
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
|
- 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 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 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
|
||||||
|
- npx semantic-release
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- CHANGELOG.md
|
||||||
|
|
||||||
sast:
|
sast:
|
||||||
stage: test
|
stage: test
|
||||||
include:
|
include:
|
||||||
|
|||||||
11
.releaserc.yml
Normal file
11
.releaserc.yml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
plugins:
|
||||||
|
- "@semantic-release/commit-analyzer"
|
||||||
|
- "@semantic-release/release-notes-generator"
|
||||||
|
- - "@semantic-release/changelog"
|
||||||
|
- changelogFile: CHANGELOG.md
|
||||||
|
- "@semantic-release/gitlab"
|
||||||
|
branches:
|
||||||
|
- "master"
|
||||||
|
- "+([0-9])?(.{+([0-9]),x}).x"
|
||||||
|
- name: "alpha"
|
||||||
|
prerelease: "alpha"
|
||||||
60
CHANGELOG.md
Normal file
60
CHANGELOG.md
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [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,4 +1,3 @@
|
|||||||
astral==2.2
|
|
||||||
paho-mqtt==1.5.1
|
paho-mqtt==1.5.1
|
||||||
bottle==0.12.19
|
bottle==0.12.19
|
||||||
defusedxml==0.7.1
|
defusedxml==0.7.1
|
||||||
|
|||||||
15
README.md
15
README.md
@@ -1,22 +1,11 @@
|
|||||||
# 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).
|
||||||
|
|
||||||
## UPDATES:
|
## 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.
|
2020-04-06: Moved Updates to a CHANGELOG.md file to clean this up.
|
||||||
|
|
||||||
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
|
|
||||||
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user