Skip to content

Commit 5100fab

Browse files
Initial commit
0 parents  commit 5100fab

39 files changed

+6798
-0
lines changed

.dockerignore

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Include any files or directories that you don't want to be copied to your
2+
# container here (e.g., local build artifacts, temporary files, etc.).
3+
#
4+
# For more help, visit the .dockerignore file reference guide at
5+
# https://docs.docker.com/go/build-context-dockerignore/
6+
7+
**/.DS_Store
8+
**/__pycache__
9+
**/.venv
10+
**/.classpath
11+
**/.dockerignore
12+
**/.env
13+
**/.git
14+
**/.gitignore
15+
**/.project
16+
**/.settings
17+
**/.toolstarget
18+
**/.vs
19+
**/.vscode
20+
**/*.*proj.user
21+
**/*.dbmdl
22+
**/*.jfm
23+
**/bin
24+
**/charts
25+
**/docker-compose*
26+
**/compose.y*ml
27+
**/Dockerfile*
28+
**/node_modules
29+
**/npm-debug.log
30+
**/obj
31+
**/secrets.dev.yaml
32+
**/values.dev.yaml
33+
LICENSE

.env.example

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
BOOTSTRAP_SERVERS=localhost:9092
2+
ELISE_SERVER_URL=http://localhost:8080
3+
CLARK_SEARCH_SERVICE_URL="http://localhost:4002"
4+
BIOLEVATE_LLM_SERVICE_URL="http://localhost:4003"
5+
HEALTHCHECK_SERVER_PORT="55002"
6+
CLARK_STORAGE_SERVICE_URL="http://localhost:4001"
7+
EXCHANGE_URL="http://localhost:9090"
8+
EXCHANGE_CLIENT_ID="biolevate-worker"
9+
EXCHANGE_CLIENT_SECRET="biolevate-worker-secret"

.github/workflows/auto_test.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Python application test
2+
3+
on:
4+
push:
5+
branches:
6+
- "release/**"
7+
- main
8+
pull_request:
9+
branches:
10+
- "**"
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v3
23+
with:
24+
# Install a specific version of uv.
25+
# version: "0.5.4"
26+
enable-cache: true
27+
cache-dependency-glob: "uv.lock"
28+
29+
- name: Set up Python
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version-file: ".python-version"
33+
34+
- name: Install the project
35+
run: uv sync --locked --all-extras --group test
36+
env:
37+
UV_INDEX_PYPI_INTERNAL_USERNAME: "bot-pypi"
38+
UV_INDEX_PYPI_INTERNAL_PASSWORD: ${{ secrets.NEXUS_BOT_PYPI_PASSWORD }}
39+
40+
- name: Run tests with coverage
41+
run: |
42+
uv run coverage run -m pytest
43+
uv run coverage report
44+
uv run coverage xml

.github/workflows/build.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build docker image
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
build_only:
7+
description: 'Run build only'
8+
required: true
9+
default: true
10+
type: boolean
11+
12+
permissions:
13+
id-token: write
14+
contents: write
15+
pull-requests: write
16+
17+
jobs:
18+
generate-version:
19+
runs-on: ubuntu-latest
20+
outputs:
21+
NEW_VERSION: ${{ steps.generate_new_version.outputs.NEW_VERSION }}
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v2
25+
- name: Extract short SHA
26+
id: vars
27+
run: echo "SHA_SHORT=$(echo $GITHUB_SHA | cut -c1-7)" >> $GITHUB_ENV
28+
- name: generate new version
29+
id: generate_new_version
30+
run: |
31+
APP_VERSION=$(jq -r .version version.json)
32+
echo "BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
33+
if [[ "$GITHUB_REF_NAME" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
34+
NEW_VERSION="${GITHUB_REF_NAME}"
35+
else
36+
NEW_VERSION=$(echo "$APP_VERSION-${{github.run_number}}-${SHA_SHORT}")
37+
fi
38+
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
39+
echo "::set-output name=NEW_VERSION::$NEW_VERSION"
40+
41+
- name: Check NEW_VERSION
42+
run: echo "NEW_VERSION is ${{ steps.generate_new_version.outputs.NEW_VERSION }} on branch ${{ steps.generate_new_version.outputs.branch }}"
43+
44+
docker-build-and-push:
45+
uses: Biolevate/biolevops-workflows/.github/workflows/docker-build-push.yml@main
46+
with:
47+
GITHUB_SHA: "${{ github.sha }}"
48+
REPOSITORY_NAME: "processor-forge"
49+
REPOSITORIES: "processor-forge,clark-protos,py-standards"
50+
BUILD_ONLY: "${{ github.event.inputs.build_only == 'true' }}"
51+
secrets: inherit
Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: CI/CD Workflow
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- release/*
8+
tags:
9+
- "[0-9]+.[0-9]+.[0-9]+"
10+
- "[0-9]+.[0-9]+"
11+
12+
permissions:
13+
id-token: write
14+
contents: write
15+
pull-requests: write
16+
17+
jobs:
18+
generate-version:
19+
runs-on: ubuntu-latest
20+
outputs:
21+
NEW_VERSION: ${{ steps.generate_new_version.outputs.NEW_VERSION }}
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v2
25+
- name: Extract short SHA
26+
id: vars
27+
run: echo "SHA_SHORT=$(echo $GITHUB_SHA | cut -c1-7)" >> $GITHUB_ENV
28+
- name: generate new version
29+
id: generate_new_version
30+
run: |
31+
APP_VERSION=$(jq -r .version version.json)
32+
echo "BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
33+
if [[ "$GITHUB_REF_NAME" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
34+
NEW_VERSION="${GITHUB_REF_NAME}"
35+
else
36+
NEW_VERSION=$(echo "$APP_VERSION-${{github.run_number}}-${SHA_SHORT}")
37+
fi
38+
echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV
39+
echo "::set-output name=NEW_VERSION::$NEW_VERSION"
40+
41+
- name: Check NEW_VERSION
42+
run: echo "NEW_VERSION is ${{ steps.generate_new_version.outputs.NEW_VERSION }} on branch ${{ steps.generate_new_version.outputs.branch }}"
43+
44+
docker-build-and-push:
45+
uses: Biolevate/biolevops-workflows/.github/workflows/docker-build-push.yml@main
46+
with:
47+
GITHUB_SHA: "${{ github.sha }}"
48+
REPOSITORY_NAME: "processor-forge"
49+
REPOSITORIES: "processor-forge,py-standards"
50+
secrets: inherit
51+
52+
helm-build-and-push:
53+
uses: Biolevate/biolevops-workflows/.github/workflows/helm-build-push.yml@main
54+
with:
55+
GITHUB_SHA: "${{ github.sha }}"
56+
REPOSITORY_NAME: "processor-forge"
57+
secrets: inherit
58+
59+
helm-deploy:
60+
needs:
61+
- generate-version
62+
- helm-build-and-push
63+
- docker-build-and-push
64+
uses: Biolevate/biolevops-workflows/.github/workflows/helm-deploy.yml@main
65+
with:
66+
REPOSITORY_NAME: "processor-forge"
67+
NEW_VERSION: ${{ needs.generate-version.outputs.NEW_VERSION }}
68+
secrets: inherit
69+
70+
manage-version:
71+
needs:
72+
- generate-version
73+
- helm-build-and-push
74+
- docker-build-and-push
75+
uses: Biolevate/biolevops-workflows/.github/workflows/version.yml@main
76+
with:
77+
APPLICATION: "processor-forge"
78+
NEW_VERSION: "${{ needs.generate-version.outputs.NEW_VERSION }}"
79+
80+
notify-slack-on-error:
81+
needs:
82+
- generate-version
83+
- helm-build-and-push
84+
- helm-deploy
85+
- docker-build-and-push
86+
if: failure()
87+
uses: Biolevate/biolevops-workflows/.github/workflows/notify-slack.yml@main
88+
with:
89+
CHANNEL: "tech-team"
90+
TITLE: "🚨 Le build *processor-forge* a échoué ! 🚨"
91+
TEXT: "Détails du build : <${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}>|Cliquez ici pour voir> <!channel> @devs"
92+
COLOR: "danger"

0 commit comments

Comments
 (0)