Skip to content

Commit 7e9bb63

Browse files
committed
chore: add semantic release configuration and dependencies
- Created package.json in libs with devDependencies for semantic release tools. - Added release.config.js to configure semantic release with conventional commits preset and plugins for commit analysis, release notes generation, git, and GitHub integration.
2 parents 5a3f2e4 + c34531d commit 7e9bb63

14 files changed

+7544
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Thank you for contributing to the RAG Infrastructure!
2+
3+
- [ ] **PR title**: "type: description"
4+
consult the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) specification for more information about the title format
5+
6+
7+
- [ ] **PR message**: ***Delete this entire checklist*** and replace with
8+
- **Description:** a description of the change
9+
- **Issue:** the issue # it fixes, if applicable
10+
- **Dependencies:** any dependencies required for this change
11+
12+
13+
Additional guidelines:
14+
15+
If no one reviews your PR within a few days, please @-mention a-klos.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Semantic release workflow
2+
on:
3+
workflow_dispatch
4+
5+
permissions:
6+
contents: read # for checkout
7+
8+
jobs:
9+
semantic-release:
10+
name: semantic-release
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write # to be able to publish a GitHub release
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: "22.13.1"
23+
- name: Install dependencies
24+
run: npm clean-install
25+
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
26+
run: npm audit signatures
27+
- name: Release
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
run: npx semantic-release

infrastructure/.gitignore

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
**/cr-secret.yaml
2+
**/customer-values.yaml
3+
**/auth
4+
5+
**/*.lock.*
6+
7+
auth
8+
9+
.DS_Store
10+
11+
*-values.yaml
12+
**/mcp.json
13+
*/terraform.tfstate
14+
*/Chart.lock
15+
*.tgz
16+
*/.terraform/
17+
# Byte-compiled / optimized / DLL files
18+
__pycache__/
19+
*.py[cod]
20+
*$py.class
21+
22+
# C extensions
23+
*.so
24+
25+
*.tgz
26+
# Distribution / packaging
27+
.Python
28+
build/
29+
develop-eggs/
30+
dist/
31+
downloads/
32+
eggs/
33+
.eggs/
34+
lib/
35+
lib64/
36+
parts/
37+
sdist/
38+
var/
39+
wheels/
40+
share/python-wheels/
41+
*.egg-info/
42+
.installed.cfg
43+
*.egg
44+
MANIFEST
45+
46+
# PyInstaller
47+
# Usually these files are written by a python script from a template
48+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
49+
*.manifest
50+
*.spec
51+
52+
# Installer logs
53+
pip-log.txt
54+
pip-delete-this-directory.txt
55+
56+
# Unit test / coverage reports
57+
htmlcov/
58+
.tox/
59+
.nox/
60+
.coverage
61+
.coverage.*
62+
.cache
63+
nosetests.xml
64+
coverage.xml
65+
*.cover
66+
*.py,cover
67+
.hypothesis/
68+
.pytest_cache/
69+
cover/
70+
71+
# node modules
72+
node_modules/
73+
74+
# Translations
75+
*.mo
76+
*.pot
77+
78+
# Django stuff:
79+
*.log
80+
local_settings.py
81+
db.sqlite3
82+
db.sqlite3-journal
83+
84+
# Flask stuff:
85+
instance/
86+
.webassets-cache
87+
88+
# Scrapy stuff:
89+
.scrapy
90+
91+
# Sphinx documentation
92+
docs/_build/
93+
94+
# PyBuilder
95+
.pybuilder/
96+
target/
97+
98+
# Jupyter Notebook
99+
.ipynb_checkpoints
100+
101+
# IPython
102+
profile_default/
103+
ipython_config.py
104+
105+
# pyenv
106+
# For a library or package, you might want to ignore these files since the code is
107+
# intended to run in multiple environments; otherwise, check them in:
108+
# .python-version
109+
110+
# pipenv
111+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
112+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
113+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
114+
# install all needed dependencies.
115+
#Pipfile.lock
116+
117+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
118+
__pypackages__/
119+
120+
# Celery stuff
121+
celerybeat-schedule
122+
celerybeat.pid
123+
124+
# SageMath parsed files
125+
*.sage.py
126+
127+
# Environments
128+
.env
129+
.venv
130+
env/
131+
venv/
132+
ENV/
133+
env.bak/
134+
venv.bak/
135+
136+
# Spyder project settings
137+
.spyderproject
138+
.spyproject
139+
140+
# Rope project settings
141+
.ropeproject
142+
143+
# mkdocs documentation
144+
/site
145+
146+
# mypy
147+
.mypy_cache/
148+
.dmypy.json
149+
dmypy.json
150+
151+
# Pyre type checker
152+
.pyre/
153+
154+
# pytype static type analyzer
155+
.pytype/
156+
157+
# Cython debug symbols
158+
cython_debug/
159+
auth

libs/.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Thank you for contributing to the RAG Core Library!
2+
3+
Please ensure your PR meets the following requirements:
4+
5+
- [ ] **PR Title**: Follow the format "type: description"
6+
7+
- Refer to the [conventional commits](https://www.conventionalcommits.org/en/v1.0.0/) specification for more details.
8+
9+
- [ ] **PR Description**: Replace this checklist with:
10+
11+
- **Description:** Provide a detailed description of the changes made.
12+
- **Issue:** Mention the issue number this PR fixes, if applicable.
13+
- **Dependencies:** List any dependencies required for this change.
14+
15+
Additional Guidelines:
16+
17+
- Ensure your code follows established coding conventions
18+
- Include relevant tests and documentation updates.
19+
- If no one reviews your PR within a few days, please @-mention a-klos.
20+
21+
Thank you for your contribution!
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Lint and test workflow
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
9+
jobs:
10+
SanitizeBranchName:
11+
runs-on: ubuntu-latest
12+
outputs:
13+
sanitized_ref: ${{ steps.sanitize.outputs.sanitized_ref }}
14+
steps:
15+
- name: Sanitize Branch Name
16+
id: sanitize
17+
run: |
18+
SANITIZED_REF=$(echo "${GITHUB_HEAD_REF}" | tr '[:upper:]' '[:lower:]' | tr -c 'a-z0-9' '-')
19+
SANITIZED_REF=${SANITIZED_REF#-}
20+
SANITIZED_REF=${SANITIZED_REF%-}
21+
SANITIZED_REF=${SANITIZED_REF:0:63}
22+
if [[ -z "$SANITIZED_REF" || "$SANITIZED_REF" =~ ^-+$ ]]; then
23+
SANITIZED_REF="tmp-branch"
24+
fi
25+
echo "::set-output name=sanitized_ref::${SANITIZED_REF}"
26+
shell: bash
27+
env:
28+
GITHUB_HEAD_REF: ${{ github.head_ref }}
29+
30+
BuildAndLint:
31+
name: Build and Lint
32+
runs-on: ubuntu-latest
33+
needs: [SanitizeBranchName]
34+
steps:
35+
- name: Checkout code
36+
uses: actions/checkout@v4
37+
with:
38+
token: ${{ secrets.GITHUB_TOKEN }}
39+
repository: stackitcloud/rag-core-library
40+
- name: Set Docker Image Name
41+
run: |
42+
echo "RAG_CORE_LIBRARY_LINTING_DOCKER_IMAGE_NAME=rag-core-lib-lint:${{ needs.SanitizeBranchName.outputs.sanitized_ref }}-${{ github.run_number }}" >> $GITHUB_ENV
43+
shell: bash
44+
45+
- name: Build lint image
46+
run: |
47+
docker build -t "$RAG_CORE_LIBRARY_LINTING_DOCKER_IMAGE_NAME" --build-arg TEST=0 -f Dockerfile .
48+
49+
- name: Generate lint report
50+
run: |
51+
docker run --rm "$RAG_CORE_LIBRARY_LINTING_DOCKER_IMAGE_NAME" make lint
52+
53+
BuildAndTestMatrix:
54+
runs-on: ubuntu-latest
55+
needs: [SanitizeBranchName]
56+
strategy:
57+
fail-fast: true
58+
matrix:
59+
service: [ "rag-core-lib", "rag-core-api", "admin-api-lib", "extractor-api-lib" ]
60+
steps:
61+
- name: Checkout code
62+
uses: actions/checkout@v4
63+
with:
64+
token: ${{ secrets.GITHUB_TOKEN }}
65+
repository: stackitcloud/rag-core-library
66+
67+
- name: Set Docker Image Name
68+
run: echo "TEST_IMAGE_NAME=${{ matrix.service }}-test:${{ needs.SanitizeBranchName.outputs.sanitized_ref }}-${{ github.run_number }}" >> $GITHUB_ENV
69+
shell: bash
70+
71+
- name: Build test image
72+
run: docker build -t "$TEST_IMAGE_NAME" --build-arg TEST=1 --build-arg DIRECTORY=${{ matrix.service }} -f Dockerfile .
73+
74+
- name: Run tests
75+
run: docker run --rm "$TEST_IMAGE_NAME" make test
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Semantic release workflow
2+
on:
3+
workflow_dispatch
4+
5+
permissions:
6+
contents: read # for checkout
7+
8+
jobs:
9+
semantic-release:
10+
name: semantic-release
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write # to be able to publish a GitHub release
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: "22.13.1"
23+
- name: Install dependencies
24+
run: npm install
25+
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
26+
run: npm audit signatures
27+
- name: Release
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
run: npx semantic-release
31+

libs/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.vscode
2+
*notes.md
3+
node_modules/

0 commit comments

Comments
 (0)