SIENTIAPDE-1352: Update deploy workflow to use reusable workflow and add permissions, update README with CI/CD details.

This commit is contained in:
Bruno Domingues
2025-12-04 12:54:03 -03:00
2 changed files with 15 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ jobs:
get-version: get-version:
name: Determine Next Version name: Determine Next Version
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: write-all
if: github.event.pull_request.merged == true if: github.event.pull_request.merged == true
outputs: outputs:
version: ${{ steps.version.outputs.next_version }} version: ${{ steps.version.outputs.next_version }}
@@ -26,6 +27,7 @@ jobs:
deploy: deploy:
name: Deploy name: Deploy
needs: [get-version] needs: [get-version]
permissions: write-all
uses: Aignosi/github_workflow_templates/.github/workflows/reusable-deploy.yml@feature/SIENTIAPDE-1352 uses: Aignosi/github_workflow_templates/.github/workflows/reusable-deploy.yml@feature/SIENTIAPDE-1352
with: with:
version: ${{ needs.get-version.outputs.version }} version: ${{ needs.get-version.outputs.version }}

View File

@@ -821,10 +821,21 @@ All tools are configured in the `pyproject.toml` file:
### CI/CD Integration ### CI/CD Integration
The `.github/workflows/quality-gate.yml` workflow automatically runs all validations on each push/PR: The project uses **reusable workflows** from `Aignosi/github_workflow_templates` for CI/CD:
#### Quality Gate (`.github/workflows/quality-gate.yml`)
Runs automatically on each Pull Request to `main`:
- ✅ Formatting and linting block merge if they fail - ✅ Formatting and linting block merge if they fail
- ⚠️ Type checking and security generate warnings but don't block - ⚠️ Type checking and security generate warnings but don't block
- ✅ Tests must pass with minimum 80% coverage - ✅ Tests must pass with minimum 80% coverage
- ✅ SonarQube analysis for code quality metrics
- ✅ Automatic version calculation based on branch pattern
#### Deploy (`.github/workflows/deploy.yml`)
Runs automatically when a PR is merged to `main`:
- ✅ Builds and pushes Docker image to Azure Container Registry
- ✅ Creates GitHub release with calculated version
- ✅ Deploys to Kubernetes using Helm
### Best Practices ### Best Practices
@@ -1367,7 +1378,7 @@ $ docker logs -f sientia-dataops-model-manager
### Login using access token ### Login using access token
```bash ```bash
$ docker login -u bruno-aignosi -p LD/IyZ4vtDI7khRYnH4HzfdTx3toorg6hlCetJM54n+ACRDim3xO aignosi.azurecr.io $ docker login -u <username> -p <access-token> aignosi.azurecr.io
``` ```
### Push image to repository ### Push image to repository