Compare commits
33 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 14ec31d1cc | |||
| 42be3b4f0c | |||
| e70036617a | |||
| 78c9ae57b4 | |||
| 154ccb0c91 | |||
| 60249b9c1e | |||
| a6d42086a7 | |||
| 35c97c45d6 | |||
| ff6c893b84 | |||
| 30ab208c1b | |||
| ac744a76e3 | |||
| 582260f918 | |||
| bebb06254c | |||
| a151cab3a8 | |||
| 3f98fc33d4 | |||
| 1bf75e3791 | |||
| d6f4ac9a12 | |||
| 423b291203 | |||
| 642ea750bb | |||
| 31f7d5aaaa | |||
| 90cf8c55cf | |||
| 48f508dee3 | |||
| 499c6d50da | |||
| 49e3d56b1c | |||
|
|
a0ae1ab14e | ||
| 068dcdb5d6 | |||
| 1cf67d139b | |||
| 5e1b586f01 | |||
| e0da9b110e | |||
| 9d4a95ad6a | |||
| 385c1d88d8 | |||
| bcba93d333 | |||
| 8e6130d919 |
27
.gitea/workflows/publish.yaml
Normal file
27
.gitea/workflows/publish.yaml
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
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
|
||||||
|
|
||||||
59
.gitea/workflows/semantic-release.yaml
Normal file
59
.gitea/workflows/semantic-release.yaml
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
name: Semantic Release and Changelog
|
||||||
|
run-name: ${{ gitea.actor }} is running Semantic Release
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'master'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
Patch:
|
||||||
|
name: Patch
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4.1.1
|
||||||
|
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
|
||||||
|
|
||||||
|
- 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 }}"
|
||||||
|
|
||||||
|
Build-and-Publish:
|
||||||
|
name: Build and Publish
|
||||||
|
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: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: 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 --all-tags harbor.evanshome.io/library/py-eagle-mqtt
|
||||||
@@ -6,13 +6,17 @@
|
|||||||
stages:
|
stages:
|
||||||
#- test
|
#- test
|
||||||
- build
|
- build
|
||||||
#- push_local
|
|
||||||
- release
|
- release
|
||||||
#- push_dockerhub
|
- push_local
|
||||||
|
##- push_dockerhub
|
||||||
|
|
||||||
build:
|
build:
|
||||||
image: docker:24.0.7-dind
|
image: docker:24.0.7-dind
|
||||||
stage: build
|
stage: build
|
||||||
|
only:
|
||||||
|
refs:
|
||||||
|
- tags
|
||||||
|
- branches
|
||||||
services:
|
services:
|
||||||
- name: docker:24.0.7-dind
|
- name: docker:24.0.7-dind
|
||||||
command: ["--tls=false"]
|
command: ["--tls=false"]
|
||||||
@@ -51,3 +55,26 @@ release:
|
|||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- CHANGELOG.md
|
- CHANGELOG.md
|
||||||
|
|
||||||
|
push local:
|
||||||
|
image: docker:24.0.7-dind
|
||||||
|
stage: push_local
|
||||||
|
services:
|
||||||
|
- name: docker:24.0.7-dind
|
||||||
|
command: ["--tls=false"]
|
||||||
|
variables:
|
||||||
|
DOCKER_DRIVER: overlay2
|
||||||
|
DOCKER_HOST: tcp://docker:2375
|
||||||
|
DOCKER_TLS_CERTDIR: ""
|
||||||
|
GIT_STRATEGY: none
|
||||||
|
FF_GITLAB_REGISTRY_HELPER_IMAGE: 1
|
||||||
|
only:
|
||||||
|
- master
|
||||||
|
script:
|
||||||
|
- echo $CI_COMMIT_TAG
|
||||||
|
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||||
|
- 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
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
13
CHANGELOG.md
13
CHANGELOG.md
@@ -1,3 +1,16 @@
|
|||||||
|
## [1.7.10](https://gitlab.evanshome.io/erichardson/py-eagle-mqtt/compare/v1.7.9...v1.7.10) (2023-12-03)
|
||||||
|
|
||||||
|
|
||||||
|
### Build
|
||||||
|
|
||||||
|
* fix build pipeline order ([1cf67d1](https://gitlab.evanshome.io/erichardson/py-eagle-mqtt/commit/1cf67d139b8ce3954a42afeeef49262c72d9b0a5))
|
||||||
|
|
||||||
|
### CI
|
||||||
|
|
||||||
|
* add branches to refs for building ([e0da9b1](https://gitlab.evanshome.io/erichardson/py-eagle-mqtt/commit/e0da9b110e69fc4f18f6588d297589ca71a27c08))
|
||||||
|
* Add push latest tag on master ([8e6130d](https://gitlab.evanshome.io/erichardson/py-eagle-mqtt/commit/8e6130d9195c19933054d9a4efbeeb3d025b5301))
|
||||||
|
* fix ordering of stages ([385c1d8](https://gitlab.evanshome.io/erichardson/py-eagle-mqtt/commit/385c1d88d85e64591fd0d3814111a7e335ea45f8))
|
||||||
|
|
||||||
## [1.7.9](https://gitlab.evanshome.io/erichardson/py-eagle-mqtt/compare/v1.7.8...v1.7.9) (2023-12-03)
|
## [1.7.9](https://gitlab.evanshome.io/erichardson/py-eagle-mqtt/compare/v1.7.8...v1.7.9) (2023-12-03)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ 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 \
|
||||||
|
&& apk upgrade \
|
||||||
&& 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
|
||||||
COPY . /app
|
COPY . /app
|
||||||
|
|||||||
@@ -3,8 +3,9 @@
|
|||||||
# Arbitrary file importing utility. Does NOT modify sys.modules
|
# Arbitrary file importing utility. Does NOT modify sys.modules
|
||||||
#
|
#
|
||||||
#===========================================================================
|
#===========================================================================
|
||||||
import imp
|
#import importlib
|
||||||
import os
|
import os
|
||||||
|
import types
|
||||||
|
|
||||||
def fimport( filePath ):
|
def fimport( filePath ):
|
||||||
# Read the file and compile the code. This will fail if the file
|
# Read the file and compile the code. This will fail if the file
|
||||||
@@ -19,7 +20,7 @@ def fimport( filePath ):
|
|||||||
rootName, ext = os.path.splitext( fileName )
|
rootName, ext = os.path.splitext( fileName )
|
||||||
|
|
||||||
# Create a new module and exec the code in it's context.
|
# Create a new module and exec the code in it's context.
|
||||||
m = imp.new_module( rootName )
|
m = types.ModuleType( rootName )
|
||||||
m.__file__ = absPath
|
m.__file__ = absPath
|
||||||
exec(code, m.__dict__)
|
exec(code, m.__dict__)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user