Skip to content

Commit

Permalink
feat: init acr-monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
hairmare committed Jan 9, 2024
0 parents commit 317033b
Show file tree
Hide file tree
Showing 15 changed files with 1,999 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
venv/
__pycache__/
.coverage
.github/
trivy.*
23 changes: 23 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: 2
updates:
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: "feat: "
groups:
baseimages:
patterns:
- "*"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: "chore(ci): "
open-pull-requests-limit: 10
- package-ecosystem: pip
directory: "/"
schedule:
interval: "daily"
20 changes: 20 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Release

on:
pull_request:
push:
branches:
- main
tags:
- '*'

jobs:
release-container:
uses: radiorabe/actions/.github/workflows/[email protected]
with:
image: ghcr.io/radiorabe/acrmonitoring
name: acrmonitoring
display-name: Analyse ACRCloud data dumps and generate events for Zabbix
tags: minimal rhel9 ubi9 rabe minio kafka cloudevents acrcloud
mkdocs:
uses: radiorabe/actions/.github/workflows/[email protected]
12 changes: 12 additions & 0 deletions .github/workflows/schedule.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Scheduled tasks

on:
schedule:
- cron: '13 12 * * *'
workflow_dispatch:

jobs:
call-workflow:
uses: radiorabe/actions/.github/workflows/[email protected]
with:
image-ref: 'ghcr.io/radiorabe/acrmonitoring:latest'
13 changes: 13 additions & 0 deletions .github/workflows/semantic-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Semantic Release

on:
push:
branches:
- main
- release/*

jobs:
call-workflow:
uses: radiorabe/actions/.github/workflows/[email protected]
secrets:
RABE_ITREAKTION_GITHUB_TOKEN: ${{ secrets.RABE_ITREAKTION_GITHUB_TOKEN }}
10 changes: 10 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: Lint and Test

on:
pull_request:
branches:
- main

jobs:
test-python-poetry:
uses: radiorabe/actions/.github/workflows/[email protected]
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
venv/
__pycache__/
.coverage
39 changes: 39 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v2.31.1
hooks:
- id: pyupgrade
args:
- --py311-plus
- repo: https://github.com/charliermarsh/ruff-pre-commit
# Ruff version.
rev: "v0.0.291"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: local
hooks:
- id: isort
name: isort
language: system
entry: isort
types: [python]
- id: black
name: black
language: system
entry: black
types: [python]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
exclude: ^src/api/client.js$
- id: end-of-file-fixer
exclude: ^src/api/client.js$
- id: check-symlinks
- id: check-merge-conflict
- id: check-case-conflict
- id: detect-aws-credentials
args:
- --allow-missing-credentials
- id: detect-private-key
25 changes: 25 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM ghcr.io/radiorabe/s2i-python:2.1.4 AS build

COPY --chown=1001:0 ./ /opt/app-root/src/

RUN python -mbuild


FROM ghcr.io/radiorabe/python-minimal:2.1.2 AS app

COPY --from=build /opt/app-root/src/dist/*.whl /tmp/dist/

RUN microdnf install -y \
python3.11-pip \
&& python -mpip --no-cache-dir install /tmp/dist/*.whl \
&& microdnf remove -y \
python3.11-pip \
python3.11-setuptools \
&& microdnf clean all \
&& rm -rf /tmp/dist/

COPY LICENSE /license/

USER 1001

CMD ["acrmonitor"]
Loading

0 comments on commit 317033b

Please sign in to comment.