Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ name: documentation-build
on:
push:
branches:
- '**'
- "**"
tags:
- 'docs-v*.*.*'
- "docs-v*.*.*"
paths:
- "docs/**"
- ".github/workflows/doc-build**"
release:
types: [published]

Expand Down
109 changes: 56 additions & 53 deletions .github/workflows/kubernetes-charts-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@ name: Kubernetes - Lint, Test, and Publish Helm Charts

on:
push:
branches: [ main ]
branches: [main]
tags:
- 'helm-charts-v*.*.*' # e.g., helm-charts-v0.1.1
- "helm-charts-v*.*.*" # e.g., helm-charts-v0.1.1
paths:
- "deployment/kubernetes/charts/**"
- ".github/workflows/kubernetes-charts-build**"
pull_request:
paths:
- 'deployment/kubernetes/charts/**'
- '.github/workflows/kubernetes**'
- "deployment/kubernetes/charts/**"
- ".github/workflows/kubernetes**"

defaults:
run:
Expand All @@ -29,7 +32,7 @@ jobs:

- uses: actions/setup-python@v6.0.0
with:
python-version: '3.x'
python-version: "3.x"
check-latest: true

- name: Set up chart-testing
Expand Down Expand Up @@ -68,51 +71,51 @@ jobs:
env:
DEFAULT_CHART_VERSION: 0.0.1
steps:
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up Helm
uses: azure/setup-helm@v4.2.0
with:
version: v3.17.0

- name: Checkout
uses: actions/checkout@v5

- name: Determine version
id: version
run: |
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
# Strip the tag prefix helm-charts-v
CHART_VERSION="${GITHUB_REF_NAME#helm-charts-v}"
else
CHART_VERSION="$DEFAULT_CHART_VERSION"
fi
echo "chart_version=$CHART_VERSION" >> "$GITHUB_OUTPUT"

- name: Package Helm Charts
# TODO: List the dir instead of hardcoding each one
run: |
helm package ./charts/medcat-service-helm --version ${{ steps.version.outputs.chart_version }}
helm package ./charts/medcat-trainer-helm --version ${{ steps.version.outputs.chart_version }} --dependency-update
helm package ./charts/cogstack-helm-ce --version ${{ steps.version.outputs.chart_version }} --dependency-update

- name: Helm OCI login to Docker Hub
run: helm registry login registry-1.docker.io -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }}

- name: Push Helm Chart to Docker Hub OCI
run: |
helm push ./medcat-service-helm-${{ steps.version.outputs.chart_version }}.tgz oci://registry-1.docker.io/cogstacksystems
helm push ./medcat-trainer-helm-${{ steps.version.outputs.chart_version }}.tgz oci://registry-1.docker.io/cogstacksystems
helm push ./cogstack-helm-ce-${{ steps.version.outputs.chart_version }}.tgz oci://registry-1.docker.io/cogstacksystems

- name: Release
uses: softprops/action-gh-release@v2
if: github.ref_type == 'tag'
with:
draft: true
files: |
./deployment/kubernetes/*.tgz
- name: Log in to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up Helm
uses: azure/setup-helm@v4.2.0
with:
version: v3.17.0

- name: Checkout
uses: actions/checkout@v5

- name: Determine version
id: version
run: |
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
# Strip the tag prefix helm-charts-v
CHART_VERSION="${GITHUB_REF_NAME#helm-charts-v}"
else
CHART_VERSION="$DEFAULT_CHART_VERSION"
fi
echo "chart_version=$CHART_VERSION" >> "$GITHUB_OUTPUT"

- name: Package Helm Charts
# TODO: List the dir instead of hardcoding each one
run: |
helm package ./charts/medcat-service-helm --version ${{ steps.version.outputs.chart_version }}
helm package ./charts/medcat-trainer-helm --version ${{ steps.version.outputs.chart_version }} --dependency-update
helm package ./charts/cogstack-helm-ce --version ${{ steps.version.outputs.chart_version }} --dependency-update

- name: Helm OCI login to Docker Hub
run: helm registry login registry-1.docker.io -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_TOKEN }}

- name: Push Helm Chart to Docker Hub OCI
run: |
helm push ./medcat-service-helm-${{ steps.version.outputs.chart_version }}.tgz oci://registry-1.docker.io/cogstacksystems
helm push ./medcat-trainer-helm-${{ steps.version.outputs.chart_version }}.tgz oci://registry-1.docker.io/cogstacksystems
helm push ./cogstack-helm-ce-${{ steps.version.outputs.chart_version }}.tgz oci://registry-1.docker.io/cogstacksystems

- name: Release
uses: softprops/action-gh-release@v2
if: github.ref_type == 'tag'
with:
draft: true
files: |
./deployment/kubernetes/*.tgz
69 changes: 36 additions & 33 deletions .github/workflows/observability-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,24 @@ name: ci-build

on:
push:
branches: [ main ]
branches: [main]
tags:
- 'v*.*.*' # e.g., v0.1.1
- "v*.*.*" # e.g., v0.1.1
paths:
- "observability/**"
- ".github/workflows/observability**"
pull_request:
paths:
- 'observability/**'
- '.github/workflows/observability**'
- "observability/**"
- ".github/workflows/observability**"

jobs:
docker:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login != 'dependabot[bot]' && github.repository == 'CogStack/cogstack-platform-toolkit'
strategy:
matrix: # This should be replaced with Docker Bake instead
include:
include:
- name: prometheus
context: observability/prometheus
dockerfile: observability/prometheus/Dockerfile.prometheus
Expand All @@ -26,7 +29,7 @@ jobs:
dockerfile: observability/prometheus/Dockerfile.blackbox
image: cogstacksystems/cogstack-observability-blackbox-exporter
- name: grafana
context: observability/grafana
context: observability/grafana
dockerfile: observability/grafana/Dockerfile
image: cogstacksystems/cogstack-observability-grafana
- name: traefik
Expand Down Expand Up @@ -79,31 +82,31 @@ jobs:
test-observability-quickstart-scripts:
runs-on: ubuntu-latest
name: Test observability Quickstart scripts

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: pip
- name: Install Python dependencies
run: pip install -r observability/test/requirements.txt
- name: Run Simple quickstart test
run: |
echo "🧪 Running Simple quickstart test..."
bash observability/test/test-quickstart.sh
- name: Report test result
if: always()
run: |
if [ $? -eq 0 ]; then
echo "✅ quickstart test PASSED"
else
echo "❌ quickstart test FAILED"
exit 1
fi
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.9"
cache: pip

- name: Install Python dependencies
run: pip install -r observability/test/requirements.txt

- name: Run Simple quickstart test
run: |
echo "🧪 Running Simple quickstart test..."
bash observability/test/test-quickstart.sh

- name: Report test result
if: always()
run: |
if [ $? -eq 0 ]; then
echo "✅ quickstart test PASSED"
else
echo "❌ quickstart test FAILED"
exit 1
fi
Loading