* Code Cleanup (#158) * print coverage report * create sonar-project property file * install all py dependencies in one step * code cleanup * reduce cognitive complexity * do not build on *.yml changes * optimise versionstring handling (#159) - Reading the version string from the image updates it even if the image is re-pulled without re-deployment * fix linter warning * exclude *.pyi filese * ignore some rules for tests * cleanup (#160) * Sonar qube 3 (#163) fix SonarQube warnings in modbus.py * Sonar qube 3 (#164) * fix SonarQube warnings * Sonar qube 3 (#165) * cleanup * Add support for TSUN Titan inverter Fixes #161 * fix SonarQube warnings * fix error * rename field "config" * SonarQube reads flake8 output * don't stop on flake8 errors * flake8 scan only app/src for SonarQube * update flake8 run * ignore flake8 C901 * cleanup * fix linter warnings * ignore changed *.yml files * read sensor list solarman data packets * catch 'No route to' error and log only in debug mode * fix unit tests * add sensor_list configuration * adapt unit tests * fix SonarQube warnings * Sonar qube 3 (#166) * add unittests for mqtt.py * add mock * move test requirements into a file * fix unit tests * fix formating * initial version * fix SonarQube warning * Sonar qube 4 (#169) * add unit test for inverter.py * fix SonarQube warning * Sonar qube 5 (#170) * fix SonarLints warnings * use random IP adresses for unit tests * Docker: The description ist missing (#171) Fixes #167 * S allius/issue167 (#172) * cleanup * Sonar qube 6 (#174) * test class ModbusConn * Sonar qube 3 (#178) * add more unit tests * GEN3: don't crash on overwritten msg in the receive buffer * improve test coverage und reduce test delays * reduce cognitive complexity * fix merge * fix merge conflikt * fix merge conflict * S allius/issue182 (#183) * GEN3: After inverter firmware update the 'Unknown Msg Type' increases continuously Fixes #182 * add support for Controller serial no and MAC * test hardening * GEN3: add support for new messages of version 3 firmwares * bump libraries to latest versions - bump aiomqtt to version 2.3.0 - bump aiohttp to version 3.10.5 * improve test coverage * reduce cognective complexity * fix target preview * remove dubbled fixtures * increase test coverage * Update README.md (#185) update badges * S allius/issue186 (#187) * Parse more values in Server Mode Fixes #186 * read OUTPUT_COEFFICIENT and MAC_ADDR in SrvMode * fix unit test * increase test coverage * S allius/issue186 (#188) * increase test coverage * update changelog * add dokumentation * change default config * Update README.md (#189) Config file is now foldable
94 lines
2.4 KiB
HCL
94 lines
2.4 KiB
HCL
variable "IMAGE" {
|
|
default = "tsun-gen3-proxy"
|
|
}
|
|
variable "VERSION" {
|
|
default = "0.0.0"
|
|
}
|
|
variable "MAJOR" {
|
|
default = "0"
|
|
}
|
|
variable "BUILD_DATE" {
|
|
default = "dev"
|
|
}
|
|
variable "BRANCH" {
|
|
default = ""
|
|
}
|
|
variable "DESCRIPTION" {
|
|
default = "This proxy enables a reliable connection between TSUN third generation inverters (eg. TSOL MS600, MS800, MS2000) and an MQTT broker to integrate the inverter into typical home automations."
|
|
}
|
|
|
|
target "_common" {
|
|
context = "app"
|
|
dockerfile = "Dockerfile"
|
|
args = {
|
|
VERSION = "${VERSION}"
|
|
environment = "production"
|
|
}
|
|
attest = [
|
|
"type =provenance,mode=max",
|
|
"type =sbom,generator=docker/scout-sbom-indexer:latest"
|
|
]
|
|
annotations = [
|
|
"index:org.opencontainers.image.title=TSUN Gen3 Proxy",
|
|
"index:org.opencontainers.image.authors=Stefan Allius",
|
|
"index:org.opencontainers.image.created=${BUILD_DATE}",
|
|
"index:org.opencontainers.image.version=${VERSION}",
|
|
"index:org.opencontainers.image.revision=${BRANCH}",
|
|
"index:org.opencontainers.image.description=${DESCRIPTION}",
|
|
"index:org.opencontainers.image.licenses=BSD-3-Clause",
|
|
"index:org.opencontainers.image.source=https://github.com/s-allius/tsun-gen3-proxy"
|
|
]
|
|
labels = {
|
|
"org.opencontainers.image.title" = "TSUN Gen3 Proxy"
|
|
"org.opencontainers.image.authors" = "Stefan Allius"
|
|
"org.opencontainers.image.created" = "${BUILD_DATE}"
|
|
"org.opencontainers.image.version" = "${VERSION}"
|
|
"org.opencontainers.image.revision" = "${BRANCH}"
|
|
"org.opencontainers.image.description" = "${DESCRIPTION}"
|
|
"org.opencontainers.image.licenses" = "BSD-3-Clause"
|
|
"org.opencontainers.image.source" = "https://github.com/s-allius/tsun-gen3-proxy"
|
|
}
|
|
output = [
|
|
"type=image,push=true"
|
|
]
|
|
|
|
no-cache = false
|
|
platforms = ["linux/amd64", "linux/arm64", "linux/arm/v7"]
|
|
}
|
|
|
|
target "_debug" {
|
|
args = {
|
|
LOG_LVL = "DEBUG"
|
|
environment = "dev"
|
|
}
|
|
}
|
|
target "_prod" {
|
|
args = {
|
|
}
|
|
}
|
|
target "debug" {
|
|
inherits = ["_common", "_debug"]
|
|
tags = ["${IMAGE}:debug"]
|
|
}
|
|
|
|
target "dev" {
|
|
inherits = ["_common"]
|
|
tags = ["${IMAGE}:dev"]
|
|
}
|
|
|
|
target "preview" {
|
|
inherits = ["_common", "_prod"]
|
|
tags = ["${IMAGE}:preview", "${IMAGE}:${VERSION}"]
|
|
}
|
|
|
|
target "rc" {
|
|
inherits = ["_common", "_prod"]
|
|
tags = ["${IMAGE}:rc", "${IMAGE}:${VERSION}"]
|
|
}
|
|
|
|
target "rel" {
|
|
inherits = ["_common", "_prod"]
|
|
tags = ["${IMAGE}:latest", "${IMAGE}:${MAJOR}", "${IMAGE}:${VERSION}"]
|
|
no-cache = true
|
|
}
|