Skip to content

feat(observability): monitor rabbitmq and the news ingest pipeline (#… #109

feat(observability): monitor rabbitmq and the news ingest pipeline (#…

feat(observability): monitor rabbitmq and the news ingest pipeline (#… #109

Workflow file for this run

name: CI/CD
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: write
packages: write
issues: write
pull-requests: write
concurrency:
group: ci-cd-${{ github.ref }}
cancel-in-progress: false
jobs:
client-quality:
uses: ./.github/workflows/client-quality.yml
server-quality:
uses: ./.github/workflows/server-quality.yml
with:
working-directory: core
news-quality:
uses: ./.github/workflows/server-quality.yml
with:
working-directory: news
ai-quality:
uses: ./.github/workflows/ai-quality.yml
helm-quality:
uses: ./.github/workflows/helm-quality.yml
openapi-sync:
uses: ./.github/workflows/openapi-sync.yml
e2e:
needs: [client-quality, server-quality, news-quality, ai-quality, helm-quality, openapi-sync]
uses: ./.github/workflows/e2e.yml
release:
name: Semantic Release
needs: [client-quality, server-quality, news-quality, ai-quality, helm-quality, openapi-sync]
runs-on: ubuntu-latest
timeout-minutes: 3
outputs:
released: ${{ steps.semantic.outputs.new_release_published }}
version: ${{ steps.semantic.outputs.new_release_version }}
latest-version: ${{ steps.latest.outputs.version }}
sha: ${{ steps.sha.outputs.sha }}
steps:
- uses: actions/create-github-app-token@v3
id: app-token
with:
client-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@v7
with:
token: ${{ steps.app-token.outputs.token }}
- uses: astral-sh/setup-uv@v8.3.2
with:
working-directory: ai
- name: Semantic Release
id: semantic
uses: cycjimmy/semantic-release-action@v6
with:
extra_plugins: |
@semantic-release/exec
@semantic-release/git
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get post-release commit SHA
id: sha
run: |
git fetch origin main
echo "sha=$(git rev-parse origin/main)" >> "$GITHUB_OUTPUT"
- name: Resolve latest version tag
id: latest
run: |
git fetch --tags --force --quiet
tag=$(git tag --list 'v*' --sort=-v:refname | head -n1)
echo "version=${tag#v}" >> "$GITHUB_OUTPUT"
client-docker:
needs: release
uses: ./.github/workflows/docker-build-push.yml
with:
context: client
image-name: kontor-client
version: ${{ needs.release.outputs.version }}
released: ${{ needs.release.outputs.released == 'true' }}
ref: ${{ needs.release.outputs.sha }}
server-docker:
needs: release
uses: ./.github/workflows/docker-build-push.yml
with:
context: core
image-name: kontor-core
version: ${{ needs.release.outputs.version }}
released: ${{ needs.release.outputs.released == 'true' }}
ref: ${{ needs.release.outputs.sha }}
news-docker:
needs: release
uses: ./.github/workflows/docker-build-push.yml
with:
context: news
image-name: kontor-news
version: ${{ needs.release.outputs.version }}
released: ${{ needs.release.outputs.released == 'true' }}
ref: ${{ needs.release.outputs.sha }}
ai-docker:
needs: release
uses: ./.github/workflows/docker-build-push.yml
with:
context: ai
image-name: kontor-ai
version: ${{ needs.release.outputs.version }}
released: ${{ needs.release.outputs.released == 'true' }}
ref: ${{ needs.release.outputs.sha }}
keycloak-docker:
needs: release
if: ${{ !cancelled() && needs.release.result == 'success' }}
uses: ./.github/workflows/docker-build-push.yml
with:
context: infra/keycloak/theme
image-name: kontor-keycloak
version: ${{ needs.release.outputs.version }}
released: ${{ needs.release.outputs.released == 'true' }}
ref: ${{ needs.release.outputs.sha }}
deploy-prod:
needs: [release, e2e, client-docker, server-docker, news-docker, ai-docker, keycloak-docker]
if: ${{ needs.release.outputs.released == 'true' || github.event_name == 'workflow_dispatch' }}
uses: ./.github/workflows/deploy.yml
secrets: inherit
with:
environment: k8s-prod
release-name: kontor
namespace: team-3m
image-tag: ${{ needs.release.outputs.released == 'true' && needs.release.outputs.version || needs.release.outputs.latest-version }}
action: deploy