Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 0 additions & 71 deletions .ansible-lint

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/container-image-build-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,30 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Test build
uses: docker/build-push-action@v4.1.0
uses: docker/build-push-action@v4
with:
push: false
load: false
context: .
platforms: linux/amd64, linux/arm64
tags: container-build:test
- name: Test build and export for further validation
uses: docker/build-push-action@v4.1.0
uses: docker/build-push-action@v4
with:
push: false
load: true
context: .
tags: container-build:test
outputs: type=docker,dest=/tmp/container.tar
- name: Upload container image as artifact
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v4
with:
name: container-build
path: /tmp/container.tar
scan:
name: Container vulnerability scan
needs: container-build
uses: cybcon/github_workflows/.github/workflows/container-vulnerability-scan.yaml@v1.1.10
uses: cybcon/github_workflows/.github/workflows/container-vulnerability-scan.yaml@v1.4.0
with:
image_name: container-build:test
image_artifact_filename: container.tar
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ on:
- main
jobs:
pre-commit:
uses: cybcon/github_workflows/.github/workflows/pre-commit.yaml@v1.1.10
uses: cybcon/github_workflows/.github/workflows/pre-commit.yaml@v1.4.0
2 changes: 1 addition & 1 deletion .github/workflows/release-from-label.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ on:
- closed
jobs:
release:
uses: cybcon/github_workflows/.github/workflows/release-from-label.yaml@v1.1.10
uses: cybcon/github_workflows/.github/workflows/release-from-label.yaml@v1.4.0
2 changes: 1 addition & 1 deletion .github/workflows/release-label-validation.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ on:
- unlabeled
jobs:
release-label-validation:
uses: cybcon/github_workflows/.github/workflows/release-label-validation.yaml@v1.1.10
uses: cybcon/github_workflows/.github/workflows/release-label-validation.yaml@v1.4.0
46 changes: 46 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Run tests

on:
pull_request:
push:
branches: [ main ]

jobs:
build:

runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff pytest
pip install -r requirements.txt
pip install beautifulsoup4 numpy packaging pandas pillow requests
- name: Overwrite dsbapi from local version
run: |
# identify site-packages directory
sitepackages_dir=$(python -c 'import site; print(site.getsitepackages()[0])')
if [ -d "${sitepackages_dir}" ]; then
cp ./src/usr/lib/python3.12/site-packages/dsbapi/__init__.py ${sitepackages_dir}/dsbapi/__init__.py
else
echo "Directory not found: ${sitepackages_dir}"
exit 1
fi
- name: Lint with ruff
run: |
# stop the build if there are Python syntax errors or undefined names
ruff check --select=E9,F63,F7,F82 --target-version=py311 .
# default set of ruff rules with GitHub Annotations
ruff check --target-version=py311 .
- name: Test with pytest
run: |
pytest
15 changes: 0 additions & 15 deletions .linter-config/.checkov.yml

This file was deleted.

42 changes: 34 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v5.0.0
hooks:
- id: fix-byte-order-marker
- id: check-json
- id: check-yaml
# args:
# - "-c __GIT_WORKING_DIR__/.linter-config/.yamllint"
- id: end-of-file-fixer
- id: trailing-whitespace
- id: mixed-line-ending
Expand All @@ -15,10 +13,38 @@ repos:
- id: detect-aws-credentials
args: ['--allow-missing-credentials']
- id: detect-private-key
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.81.0
- repo: https://github.com/myint/autoflake
rev: v2.3.1
hooks:
- id: terraform_checkov
exclude: "[examples|test]/.*$"
- id: autoflake
args:
- "--args=--config-file __GIT_WORKING_DIR__/.linter-config/.checkov.yml"
- --in-place
- --remove-unused-variables
- --remove-all-unused-imports
- repo: https://github.com/hadolint/hadolint
rev: v2.12.0
hooks:
- id: hadolint-docker
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.8.4
hooks:
- id: ruff
args:
- '--line-length=120'
- '--fix'
- '--exit-non-zero-on-fix'
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
name: isort (python)
args:
- '--profile'
- black
- '--filter-files'
- repo: https://github.com/psf/black
rev: 24.10.0
hooks:
- id: black
args:
- '--line-length=120'
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1 +1 @@
pre-commit 3.3.3
pre-commit 4.0.1
26 changes: 13 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
FROM alpine:3.19.0
FROM alpine:3.21.0

LABEL maintainer="Michael Oberdorf IT-Consulting <info@oberdorf-itc.de>"
LABEL site.local.program.version="1.0.13"
LABEL site.local.program.version="1.0.14"

# LOGLEVEL can be one of debug, info, warning , error
ENV LOGLEVEL info
ENV LOGLEVEL=info

COPY --chown=root:root /requirements.txt /

RUN apk upgrade --available --no-cache --update \
&& apk add --no-cache --update \
libcurl=8.5.0-r0 \
python3=3.11.6-r1 \
py3-beautifulsoup4=4.12.2-r1 \
py3-curl=7.45.2-r1 \
py3-numpy=1.25.2-r0 \
py3-packaging=23.2-r0 \
py3-pandas=2.0.3-r0 \
py3-pillow=10.1.0-r1 \
py3-pip=23.3.1-r0 \
py3-requests=2.31.0-r1 \
libcurl=8.11.1-r0 \
python3=3.12.8-r1 \
py3-beautifulsoup4=4.12.3-r3 \
py3-curl=7.45.3-r0 \
py3-numpy=2.1.3-r0 \
py3-packaging=24.2-r0 \
py3-pandas=2.2.3-r0 \
py3-pillow=11.0.0-r0 \
py3-pip=24.3.1-r0 \
py3-requests=2.32.3-r0\
&& pip3 install --no-cache-dir --break-system-packages -r /requirements.txt

COPY --chown=root:root /src /
Expand Down
46 changes: 45 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,27 @@ Source code: [GitHub](https://github.com/cybcon/docker.dsb2pushover)

Container image: [DockerHub](https://hub.docker.com/r/oitc/dsb2pushover)

<!-- SHIELD GROUP -->
[![][github-action-test-shield]][github-action-test-link]
[![][github-action-release-shield]][github-action-release-link]
[![][github-release-shield]][github-release-link]
[![][github-releasedate-shield]][github-releasedate-link]
[![][github-stars-shield]][github-stars-link]
[![][github-forks-shield]][github-forks-link]
[![][github-issues-shield]][github-issues-link]
[![][github-license-shield]][github-license-link]

[![][docker-release-shield]][docker-release-link]
[![][docker-pulls-shield]][docker-pulls-link]
[![][docker-stars-shield]][docker-stars-link]
[![][docker-size-shield]][docker-size-link]


# Supported tags and respective `Dockerfile` links


* [`latest`, `1.0.13`](https://github.com/cybcon/docker.dsb2pushover/blob/v1.0.13/Dockerfile)
* [`latest`, `1.0.14`](https://github.com/cybcon/docker.dsb2pushover/blob/v1.0.14/Dockerfile)
* [`1.0.13`](https://github.com/cybcon/docker.dsb2pushover/blob/v1.0.13/Dockerfile)
* [`1.0.12`](https://github.com/cybcon/docker.dsb2pushover/blob/v1.0.12/Dockerfile)
* [`1.0.9`](https://github.com/cybcon/docker.dsb2pushover/blob/v1.0.9/Dockerfile)

Expand Down Expand Up @@ -97,3 +114,30 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

<!-- LINK GROUP -->
[docker-pulls-link]: https://hub.docker.com/r/oitc/dsb2pushover
[docker-pulls-shield]: https://img.shields.io/docker/pulls/oitc/dsb2pushover?color=45cc11&labelColor=black&style=flat-square
[docker-release-link]: https://hub.docker.com/r/oitc/dsb2pushover
[docker-release-shield]: https://img.shields.io/docker/v/oitc/dsb2pushover?color=369eff&label=docker&labelColor=black&logo=docker&logoColor=white&style=flat-square
[docker-size-link]: https://hub.docker.com/r/oitc/dsb2pushover
[docker-size-shield]: https://img.shields.io/docker/image-size/oitc/dsb2pushover?color=369eff&labelColor=black&style=flat-square
[docker-stars-link]: https://hub.docker.com/r/oitc/dsb2pushover
[docker-stars-shield]: https://img.shields.io/docker/stars/oitc/dsb2pushover?color=45cc11&labelColor=black&style=flat-square
[github-action-release-link]: https://github.com/cybcon/docker.dsb2pushover/actions/workflows/release-from-label.yaml
[github-action-release-shield]: https://img.shields.io/github/actions/workflow/status/cybcon/docker.dsb2pushover/release-from-label.yaml?label=release&labelColor=black&logo=githubactions&logoColor=white&style=flat-square
[github-action-test-link]: https://github.com/cybcon/docker.dsb2pushover/actions/workflows/test.yaml
[github-action-test-shield-original]: https://github.com/cybcon/docker.dsb2pushover/actions/workflows/test.yaml/badge.svg
[github-action-test-shield]: https://img.shields.io/github/actions/workflow/status/cybcon/docker.dsb2pushover/test.yaml?label=tests&labelColor=black&logo=githubactions&logoColor=white&style=flat-square
[github-forks-link]: https://github.com/cybcon/docker.dsb2pushover/network/members
[github-forks-shield]: https://img.shields.io/github/forks/cybcon/docker.dsb2pushover?color=8ae8ff&labelColor=black&style=flat-square
[github-issues-link]: https://github.com/cybcon/docker.dsb2pushover/issues
[github-issues-shield]: https://img.shields.io/github/issues/cybcon/docker.dsb2pushover?color=ff80eb&labelColor=black&style=flat-square
[github-license-link]: https://github.com/cybcon/docker.dsb2pushover/blob/main/LICENSE
[github-license-shield]: https://img.shields.io/badge/license-MIT-blue?labelColor=black&style=flat-square
[github-release-link]: https://github.com/cybcon/docker.dsb2pushover/releases
[github-release-shield]: https://img.shields.io/github/v/release/cybcon/docker.dsb2pushover?color=369eff&labelColor=black&logo=github&style=flat-square
[github-releasedate-link]: https://github.com/cybcon/docker.dsb2pushover/releases
[github-releasedate-shield]: https://img.shields.io/github/release-date/cybcon/docker.dsb2pushover?labelColor=black&style=flat-square
[github-stars-link]: https://github.com/cybcon/docker.dsb2pushover
[github-stars-shield]: https://img.shields.io/github/stars/cybcon/docker.dsb2pushover?color=ffcb47&labelColor=black&style=flat-square
2 changes: 1 addition & 1 deletion azure-pipelines/dsb2pushover.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pool:
vmImage: ubuntu-latest

variables:
appVersion: 1.0.12
appVersion: 1.0.14
REGISTRY: Docker Hub (OITC)
REPOSITORY_NAME: oitc/dsb2pushover
containerBuildPath: $(Build.Repository.Name)/resources
Expand Down
6 changes: 3 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
datetime==5.3
datetime>=5.3,<6
# needs to be fixed to 0.0.14 and \src\usr\local\lib\python3.9\site-packages\dsbapi\__init__.py needs to be removed
dsbapipy>=0.0.13
http.client==0.1.22
pytesseract==0.3.10
http.client>=0.1.22,<1
pytesseract>=0.3.10,<1
Loading
Loading