Skip to content

Commit

Permalink
feat: init ACRCloud Ingest Service
Browse files Browse the repository at this point in the history
  • Loading branch information
hairmare committed May 29, 2023
0 parents commit c974331
Show file tree
Hide file tree
Showing 15 changed files with 1,797 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
venv/
.github/
trivy-results.sarif
vuln.json
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 2
updates:
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
commit-message:
prefix: "feat: "
- 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"
19 changes: 19 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release

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

jobs:
release-container:
uses: radiorabe/actions/.github/workflows/release-container.yaml@v0.11.1
with:
image: ghcr.io/radiorabe/acringest
name: acringest
display-name: Ingest daily ACRCloud data dumps
tags: minimal rhel9 ubi9 rabe minio kafka cloudevents acrcloud
cosign-base-image-only: false
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/schedule-trivy.yaml@v0.11.1
with:
image-ref: 'ghcr.io/radiorabe/acringest: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/semantic-release.yaml@v0.11.1
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/test-python-poetry.yaml@v0.11.1
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
venv/
__pycache__/
.coverage
htmlcov/
acringest.conf
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.269"
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.0.0-alpha.13 AS build

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

RUN python -mbuild


FROM ghcr.io/radiorabe/python-minimal:2.0.0-alpha.19 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 ["acringest"]
Loading

0 comments on commit c974331

Please sign in to comment.