Skip to content

Commit

Permalink
Merge pull request #1 from innovatrics/feature/initial-implementation
Browse files Browse the repository at this point in the history
Initial implementation
  • Loading branch information
blaskoa authored Oct 9, 2023
2 parents c688645 + bce6824 commit 53b4bc2
Show file tree
Hide file tree
Showing 55 changed files with 3,057 additions and 2 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Package and lint

on:
push:
branches:
- '**'
tags-ignore:
- 'v*'
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup helm CLI
uses: azure/setup-helm@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Build helm dependencies
run: |
helm dependency build .
- name: Lint helm
run: |
helm lint .
# we package just to validate
- name: Package helm
run: |
helm package .
- uses: actions/setup-python@v3
- uses: gabe565/setup-helm-docs-action@v1
- uses: pre-commit/[email protected]
68 changes: 68 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Release helm chart

on:
push:
tags:
- 'v*'

jobs:
release:
runs-on: ubuntu-latest
env:
HELM_REGISTRY: "oci://ghcr.io/innovatrics/sf-helm"
steps:
- uses: actions/checkout@v3
- name: Install yq
run: |
sudo snap install yq
- name: Check tag against helm chart version
id: chart_info
run: |
chart_version=$(yq '.version' Chart.yaml)
chart_name=$(yq '.name' Chart.yaml)
echo "tag_version=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT
echo "chart_version=$chart_version" >> $GITHUB_OUTPUT
echo "chart_version_with_prefix=v$chart_version" >> $GITHUB_OUTPUT
echo "chart_name=$chart_name" >> $GITHUB_OUTPUT
- name: Version is incorrect
if: ${{ steps.chart_info.outputs.chart_version_with_prefix != steps.chart_info.outputs.tag_version }}
run: exit 1
- name: Setup helm CLI
uses: azure/setup-helm@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Helm login to GHCR
run: |
echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io --username ${{ github.repository_owner }} --password-stdin
- name: Build helm dependencies
run: |
helm dependency build .
- name: Lint helm
run: |
helm lint .
- name: Package chart
run: |
helm package .
- name: Helm | Push
run: helm push ${{ steps.chart_info.outputs.chart_name }}-${{ steps.chart_info.outputs.chart_version }}.tgz $HELM_REGISTRY
- name: release
uses: actions/create-release@v1
id: create_release
with:
draft: true
prerelease: false
release_name: Smartface Helm ${{ steps.chart_info.outputs.chart_version }}
tag_name: ${{ github.ref }}
# TODO somehow parse only changes relevant to current version
body_path: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Chart package as release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ${{ steps.chart_info.outputs.chart_name }}-${{ steps.chart_info.outputs.chart_version }}.tgz
asset_name: ${{ steps.chart_info.outputs.chart_name }}-${{ steps.chart_info.outputs.chart_version }}.tgz
asset_content_type: application/gzip
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.tgz
*.zip
20 changes: 20 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: check-merge-conflict
- id: detect-aws-credentials
args: ['--allow-missing-credentials']
- id: detect-private-key
- id: end-of-file-fixer

- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.22
hooks:
- id: helmlint

- repo: https://github.com/norwoodj/helm-docs
rev: v1.11.0
hooks:
- id: helm-docs
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Changelog

## [v1.0.0] - TBD

### Added

- Initial implementation
- Chart can be configured to support following scenarios:
- Lightweight Face Identification System (LFIS) - single-tenant and multi-tenant
- Edge stream processing - single tenant only
- Chart can be configured to use externally-managed rabbitmq (e.g. [AmazonMQ](https://aws.amazon.com/amazon-mq/)) or deploy a rabbitmq [subchart](https://github.com/bitnami/charts/tree/main/bitnami/rabbitmq)
9 changes: 9 additions & 0 deletions Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
dependencies:
- name: sf-tenant-operator
repository: oci://ghcr.io/innovatrics/sf-helm
version: 0.1.1
- name: rabbitmq
repository: oci://registry-1.docker.io/bitnamicharts
version: 12.0.4
digest: sha256:27524f3d7de75da9a074f0771a5c907d03c08fbf52abe4e3971c7c84f5f1be82
generated: "2023-09-26T16:28:51.468868+02:00"
33 changes: 33 additions & 0 deletions Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
apiVersion: v2
name: smartface
description: SmartFace is a Scalable Facial Recognition Server Platform Able to Process Multiple Real-Time Video Streams. Currently the helm chart supports edge stream and Lightweight Face Identification System (LFIS) deployments

dependencies:
- name: sf-tenant-operator
version: "0.1.1"
repository: "oci://ghcr.io/innovatrics/sf-helm"
condition: features.multitenancy.enabled
- name: rabbitmq
version: "12.0.4"
repository: "oci://registry-1.docker.io/bitnamicharts"
condition: rabbitmq.enabled

type: application

keywords:
- Face recognition
- Biometrics

sources:
- https://github.com/innovatrics/sf-helm
- https://github.com/innovatrics/smartface

home: https://www.innovatrics.com/face-recognition-solutions/

maintainers:
- name: Innovatrics
url: https://www.innovatrics.com/

version: 0.2.0

appVersion: "v5_4.21.0"
Loading

0 comments on commit 53b4bc2

Please sign in to comment.