Compare commits

...

33 Commits

Author SHA1 Message Date
14ec31d1cc Update .gitea/workflows/semantic-release.yaml
All checks were successful
Semantic Release and Changelog / Patch (push) Successful in 7s
Semantic Release and Changelog / Build and Publish (push) Successful in 17s
2024-02-08 06:04:58 +00:00
42be3b4f0c Update .gitea/workflows/publish.yaml
Some checks failed
Semantic Release and Changelog / Patch (push) Successful in 22s
Semantic Release and Changelog / Build and Publish (push) Failing after 1m27s
2024-02-08 03:45:45 +00:00
e70036617a Merge pull request 'chore(deps): update dependency actions/checkout to v4.1.1' (#45) from renovate/actions-checkout-4.x into master
Some checks failed
Semantic Release and Changelog / Patch (push) Successful in 11s
Semantic Release and Changelog / Build and Publish (push) Failing after 48s
Reviewed-on: #45
2024-02-06 07:08:07 +00:00
78c9ae57b4 chore(deps): update dependency actions/checkout to v4.1.1
All checks were successful
Build and publish Image / build-and-push (push) Successful in 47s
2024-02-04 22:01:36 +00:00
154ccb0c91 Merge pull request 'chore(deps): update actions/checkout action to v4' (#44) from renovate/actions-checkout-4.x into master
Some checks failed
Semantic Release and Changelog / Patch (push) Successful in 5s
Semantic Release and Changelog / Build and Publish (push) Failing after 42s
Reviewed-on: #44
Reviewed-by: Evan Richardson <evanrich81@gmail.com>
2024-02-04 21:41:55 +00:00
60249b9c1e chore(deps): update actions/checkout action to v4
All checks were successful
Build and publish Image / build-and-push (push) Successful in 47s
2024-02-04 21:36:01 +00:00
a6d42086a7 change secret name
All checks were successful
Semantic Release and Changelog / Patch (push) Successful in 6s
Semantic Release and Changelog / Build and Publish (push) Successful in 42s
2024-02-04 09:27:07 +00:00
35c97c45d6 Merge pull request 'erichardson-patch-1' (#42) from erichardson-patch-1 into master
Some checks failed
Semantic Release and Changelog / Patch (push) Successful in 6s
Semantic Release and Changelog / Build and Publish (push) Failing after 39s
Reviewed-on: #42
2024-02-04 09:21:47 +00:00
ff6c893b84 erichardson-patch-1 (#41)
Some checks failed
Semantic Release and Changelog / Patch (push) Successful in 7s
Semantic Release and Changelog / Build and Publish (push) Failing after 43s
Reviewed-on: #41
2024-02-04 09:20:03 +00:00
30ab208c1b build on everything but master, also change non master build name to dev
All checks were successful
Build and publish Image / build-and-push (push) Successful in 42s
2024-02-04 09:19:28 +00:00
ac744a76e3 publish new tagged image on push to master
All checks were successful
Build and publish Image / build-and-push (push) Successful in 46s
2024-02-04 09:16:57 +00:00
582260f918 Test auto-versioning
All checks were successful
Build and publish Image / build-and-push (push) Successful in 46s
Semantic Release and Changelog / Patch (push) Successful in 18s
2024-02-04 08:49:20 +00:00
bebb06254c upgrade apk packages
All checks were successful
Build and publish Image / build-and-push (push) Successful in 1m2s
2024-02-04 07:52:17 +00:00
a151cab3a8 add docker install
All checks were successful
Build and publish Image / build-and-push (push) Successful in 1m9s
2024-02-04 07:33:59 +00:00
3f98fc33d4 change runner to ubuntu
Some checks failed
Build and publish Image / build-and-push (push) Failing after 3s
2024-02-04 06:08:23 +00:00
1bf75e3791 fix runner name
Some checks failed
Build and publish Image / build-and-push (push) Failing after 2s
2024-02-04 06:03:36 +00:00
d6f4ac9a12 add publish workflow
Some checks are pending
Build and publish Image / build-and-push (push) Waiting to run
2024-02-04 06:03:04 +00:00
423b291203 test
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2s
2024-02-04 02:34:25 +00:00
642ea750bb change label to shared
Some checks failed
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 1s
2024-02-04 02:31:35 +00:00
31f7d5aaaa add demo workflow to test actions
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
2024-02-04 02:28:26 +00:00
90cf8c55cf Update fimport.py 2023-12-22 07:35:14 +00:00
48f508dee3 Update fimport.py for importlib module syntax 2023-12-22 07:28:30 +00:00
499c6d50da Merge branch 'fix-imp' into 'master'
Update fimport.py

See merge request erichardson/py-eagle-mqtt!36
2023-12-22 07:23:16 +00:00
49e3d56b1c Update fimport.py 2023-12-22 07:21:41 +00:00
semantic-release-bot
a0ae1ab14e chore(release): 1.7.10 [skip ci]
## [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](1cf67d139b))

### CI

* add branches to refs for building ([e0da9b1](e0da9b110e))
* Add push latest tag on master ([8e6130d](8e6130d919))
* fix ordering of stages ([385c1d8](385c1d88d8))
2023-12-03 08:20:30 +00:00
068dcdb5d6 Merge branch 'fix-build-2' into 'master'
Build: fix build pipeline order

See merge request erichardson/py-eagle-mqtt!35
2023-12-03 08:19:35 +00:00
1cf67d139b Build: fix build pipeline order 2023-12-03 08:19:07 +00:00
5e1b586f01 Merge branch 'fix-build' into 'master'
CI: add branches to refs for building

See merge request erichardson/py-eagle-mqtt!34
2023-12-03 08:16:06 +00:00
e0da9b110e CI: add branches to refs for building 2023-12-03 08:15:37 +00:00
9d4a95ad6a Merge branch 'fix-ordering-of-stages' into 'master'
CI: fix ordering of stages

See merge request erichardson/py-eagle-mqtt!33
2023-12-03 08:02:23 +00:00
385c1d88d8 CI: fix ordering of stages 2023-12-03 08:02:18 +00:00
bcba93d333 Merge branch 'add-push-latest-stage' into 'master'
CI: Add push latest tag on master

See merge request erichardson/py-eagle-mqtt!32
2023-12-03 08:01:26 +00:00
8e6130d919 CI: Add push latest tag on master 2023-12-03 08:00:04 +00:00
6 changed files with 132 additions and 4 deletions

View 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

View 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

View File

@@ -6,13 +6,17 @@
stages:
#- test
- build
#- push_local
- release
#- push_dockerhub
- push_local
##- push_dockerhub
build:
image: docker:24.0.7-dind
stage: build
only:
refs:
- tags
- branches
services:
- name: docker:24.0.7-dind
command: ["--tls=false"]
@@ -51,3 +55,26 @@ release:
artifacts:
paths:
- 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

View File

@@ -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)

View File

@@ -18,6 +18,7 @@ COPY requirements.txt /app
COPY ./src/conf/logrotate/tHome /etc/logrotate.d/
ENV PYTHONPATH=/app/src/python
RUN apk --update add --no-cache logrotate \
&& apk upgrade \
&& pip3 install --no-cache-dir --upgrade pip \
&& pip3 install --no-cache-dir -r requirements.txt
COPY . /app

View File

@@ -3,8 +3,9 @@
# Arbitrary file importing utility. Does NOT modify sys.modules
#
#===========================================================================
import imp
#import importlib
import os
import types
def fimport( filePath ):
# 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 )
# Create a new module and exec the code in it's context.
m = imp.new_module( rootName )
m = types.ModuleType( rootName )
m.__file__ = absPath
exec(code, m.__dict__)