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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
14 changes: 7 additions & 7 deletions .agents/skills/add-to-release-please/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ The path is the package key in both config files (repo-relative directory). Conf
| Kind | Path examples |
|---|---|
| App | `apps/cogstack-cohorter` |
| Helm chart | `helm-charts/medcat-service-helm` |
| Helm chart | `deployment/charts/medcat-service-helm` |

Helm charts in this repo are top-level directories under `helm-charts/<chart>/` with a `Chart.yaml`. The package key is that directory. See [Helm charts](#helm-charts) before editing.
Helm charts in this repo are directories under `deployment/charts/<chart>/` with a `Chart.yaml`. The package key is that directory. See [Helm charts](#helm-charts) before editing.

### 2. Update `release-please-config.json`

Expand Down Expand Up @@ -61,7 +61,7 @@ Add under `packages`. Match the file's 4-space indent.
| `helm` | Chart dir with `Chart.yaml` | `version` |
| `simple` | No single root version file, or nested API + frontend | CHANGELOG only; use `extra-files` for nested bumps |

`component` is the git tag prefix: `{component}-v{version}` (e.g. `cohorter-v0.7.0`). For Helm charts in this repo, `component` is the package path (`helm-charts/<chart>`), so the tag is `helm-charts/<chart>-v<version>`.
`component` is the git tag prefix: `{component}-v{version}` (e.g. `cohorter-v0.7.0`). Helm charts retain `helm-charts/<chart>` as their component, independently of their package path under `deployment/charts/`, so the tag remains `helm-charts/<chart>-v<version>`.

**`extra-files`** (paths relative to the package directory) — e.g. python API + node frontend under `simple`:

Expand Down Expand Up @@ -102,12 +102,12 @@ This is sourced from [release-please#2561](https://github.com/googleapis/release

### Helm charts

Copy an existing chart entry such as `helm-charts/medcat-service-helm`. Charts here always use `release-type` `helm`, `component` equal to the package key, and these changelog sections. Do not add `extra-files`.
Copy an existing chart entry such as `deployment/charts/medcat-service-helm`. Charts here always use `release-type` `helm`, `component` `helm-charts/<chart>`, and these changelog sections. Do not add `extra-files`.

`<chart>` is the directory name (for example `ocr-service-helm`). It must match `name` in `Chart.yaml`, and `Chart.yaml` must sit directly under `helm-charts/` (not nested).
`<chart>` is the directory name (for example `ocr-service-helm`). It must match `name` in `Chart.yaml`, and the chart directory must sit directly under `deployment/charts/`.

```json
"helm-charts/<chart>": {
"deployment/charts/<chart>": {
"release-type": "helm",
"component": "helm-charts/<chart>",
"changelog-path": "CHANGELOG.md",
Expand All @@ -125,7 +125,7 @@ Copy an existing chart entry such as `helm-charts/medcat-service-helm`. Charts h
}
```

`.github/workflows/kubernetes-charts-build.yaml` already discovers every `helm-charts/*/Chart.yaml` and publishes tags matching `helm-charts/*-v*.*.*`. Do not add a workflow or edit `release-please.yml` for a chart that fits this layout. Release-please writes `CHANGELOG.md` on the first release.
`.github/workflows/build_helm_charts.yml` already discovers every `deployment/charts/*/Chart.yaml` and publishes tags matching `helm-charts/*-v*.*.*`. Do not add a workflow or edit `release_packages.yml` for a chart that fits this layout. Release-please writes `CHANGELOG.md` on the first release.

### 3. Update `.release-please-manifest.json`

Expand Down
8 changes: 4 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: "weekly"
interval: "monthly"
commit-message:
prefix: "build"
groups:
Expand All @@ -21,15 +21,15 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
interval: "monthly"
commit-message:
prefix: "build"

# Keep Dockerfile base images up to date
- package-ecosystem: "docker"
directory: "/apps/cogstack-jupyter-hub"
schedule:
interval: "weekly"
interval: "monthly"
registries:
- dockerhub
commit-message:
Expand All @@ -43,7 +43,7 @@ updates:
- package-ecosystem: "uv"
directory: "/apps/cogstack-jupyter-hub"
schedule:
interval: "weekly"
interval: "monthly"
commit-message:
prefix: "build(jupyter)"
groups:
Expand Down
2 changes: 1 addition & 1 deletion .github/linters/ct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
remote: origin
target-branch: main
chart-dirs:
- helm-charts
- deployment/charts
helm-extra-args: --timeout 1000s
chart-repos:
- opensearch=https://opensearch-project.github.io/helm-charts
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/helm-recursive-dependency-update.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
3. Topologically sort so dependencies come before dependents.
4. Run `helm dependency update` in that order.

Usage (cwd should be helm-charts/):
Usage (cwd should be deployment/charts/):
helm-recursive-dependency-update.py
helm-recursive-dependency-update.py CHART [CHART ...]
"""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This is a simple action to check that the documentation is building.
# Note the real documentation build is done by readthedocs externally, and none of the files created in this action are used.
name: documentation-build
name: build_docs

on:
push:
Expand All @@ -10,7 +10,7 @@ on:
- "docs-v*.*.*"
paths:
- "docs/**"
- ".github/workflows/doc-build**"
- ".github/workflows/build_docs.yml"
release:
types: [published]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Lint, test, and publish Helm charts under helm-charts/.
# Lint, test, and publish Helm charts under deployment/charts/.
#
# Triggers:
# - Pull requests touching helm-charts/ or this workflow: lint and install-test
# - Pull requests touching deployment/charts/ or this workflow: lint and install-test
# changed charts only; does not publish.
# - Push to main (helm-charts/ paths): lint/test all charts, then package and
# - Push to main (deployment/charts/ paths): lint/test all charts, then package and
# push every top-level chart to Docker Hub OCI at version 0.0.1.
# - Per-chart release tags (e.g. helm-charts/medcat-trainer-helm-v0.1.2):
# lint/test all charts, then package and push only the tagged chart at the
Expand All @@ -12,24 +12,24 @@
#
# Charts are discovered automatically from top-level Chart.yaml files. Release
# versions for tagged releases are managed by release-please.
name: Kubernetes - Lint, Test, and Publish Helm Charts
name: build_helm_charts

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

defaults:
run:
working-directory: ./helm-charts
working-directory: ./deployment/charts

jobs:
helm-lint-test:
Expand Down Expand Up @@ -83,7 +83,7 @@ jobs:
fi

- name: Recursive dependency update (all charts, including nested)
run: ../.github/scripts/helm-recursive-dependency-update.py
run: ../../.github/scripts/helm-recursive-dependency-update.py

- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
Expand Down Expand Up @@ -166,7 +166,7 @@ jobs:
- name: Recursive dependency update (all charts, including nested)
# Waiting on helm recursive feature https://github.com/helm/helm/pull/30855
# Could alternatively switch to helm "cascade" plugin
run: ../.github/scripts/helm-recursive-dependency-update.py ${{ steps.charts.outputs.charts }}
run: ../../.github/scripts/helm-recursive-dependency-update.py ${{ steps.charts.outputs.charts }}

- name: Package Helm Charts
run: |
Expand All @@ -190,4 +190,4 @@ jobs:
if: github.ref_type == 'tag'
with:
tag_name: ${{ github.ref_name }}
files: helm-charts/${{ steps.charts.outputs.chart }}-${{ steps.version.outputs.chart_version }}.tgz
files: deployment/charts/${{ steps.charts.outputs.chart }}-${{ steps.version.outputs.chart_version }}.tgz
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ci-build-cohorter
name: docker_build_cohorter

on:
push:
Expand All @@ -7,11 +7,11 @@ on:
- "cohorter-v*.*.*" # e.g., cohorter-v1.2.3
paths:
- "apps/cogstack-cohorter/**"
- ".github/workflows/cogstack-cohorter-docker**"
- ".github/workflows/docker_build_cohorter.yml"
pull_request:
paths:
- "apps/cogstack-cohorter/**"
- ".github/workflows/cogstack-cohorter-docker**"
- ".github/workflows/docker_build_cohorter.yml"

jobs:
docker-build-and-push:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: docker-jupyter-hub-all
name: docker_build_jupyterhub

permissions:
contents: read
Expand All @@ -9,11 +9,11 @@ on:
tags: ['cogstack-jupyter-hub-v*.*.*']
paths:
- "apps/cogstack-jupyter-hub/**"
- ".github/workflows/docker-build.yml"
- ".github/workflows/docker_build_jupyterhub.yml"
pull_request:
paths:
- "apps/cogstack-jupyter-hub/**"
- ".github/workflows/docker-build.yml"
- ".github/workflows/docker_build_jupyterhub.yml"
workflow_dispatch:

concurrency:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
name: ci-build
name: docker_build_observability

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

jobs:
docker:
Expand All @@ -21,24 +23,24 @@
matrix: # This should be replaced with Docker Bake instead
include:
- name: prometheus
context: observability/prometheus
dockerfile: observability/prometheus/Dockerfile.prometheus
context: apps/observability/prometheus
dockerfile: apps/observability/prometheus/Dockerfile.prometheus
image: cogstacksystems/cogstack-observability-prometheus
- name: blackbox
context: observability/prometheus
dockerfile: observability/prometheus/Dockerfile.blackbox
context: apps/observability/prometheus
dockerfile: apps/observability/prometheus/Dockerfile.blackbox
image: cogstacksystems/cogstack-observability-blackbox-exporter
- name: grafana
context: observability/grafana
dockerfile: observability/grafana/Dockerfile
context: apps/observability/grafana
dockerfile: apps/observability/grafana/Dockerfile
image: cogstacksystems/cogstack-observability-grafana
- name: traefik
context: observability/traefik
dockerfile: observability/traefik/Dockerfile
context: apps/observability/traefik
dockerfile: apps/observability/traefik/Dockerfile
image: cogstacksystems/cogstack-observability-traefik
- name: alloy
context: observability/grafana-alloy
dockerfile: observability/grafana-alloy/Dockerfile
context: apps/observability/grafana-alloy
dockerfile: apps/observability/grafana-alloy/Dockerfile
image: cogstacksystems/cogstack-observability-alloy
steps:
- name: Checkout branch
Expand Down Expand Up @@ -80,33 +82,49 @@
cache-to: type=registry,ref=${{ matrix.image}}:buildcache,mode=max

test-observability-quickstart-scripts:
needs: docker
runs-on: ubuntu-latest
name: Test observability Quickstart scripts

steps:
- name: Checkout repository
uses: actions/checkout@v7

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

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

- name: Run Simple quickstart test
run: |
echo "🧪 Running Simple quickstart test..."
bash observability/test/test-quickstart.sh
IMAGE_TAG="sha-${GITHUB_SHA::7}"
echo "Using images tagged ${IMAGE_TAG}"
export OBSERVABILITY_BASE_URL="file://${GITHUB_WORKSPACE}/deployment/examples/observability"
export COMPOSE_FILE="${GITHUB_WORKSPACE}/deployment/examples/observability/simple/observability-simple/docker-compose.yml:${RUNNER_TEMP}/observability-images.yml"
{
echo "services:"
for service in alloy prometheus grafana traefik; do
printf ' %s:\n image: cogstacksystems/cogstack-observability-%s:%s\n' \
"$service" "$service" "$IMAGE_TAG"
done
} > "${RUNNER_TEMP}/observability-images.yml"
if ! bash deployment/examples/observability/test/test-quickstart.sh; then
docker compose ps --all || true
docker compose logs --no-color --tail=100 || true
exit 1
fi

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

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
name: docker-ocr-service
name: docker_build_ocr-service

on:
push:
branches: [main]
tags: ['ocr-service-v*.*.*']
paths:
- "apps/ocr-service/**"
- ".github/workflows/docker_build.yml"
- ".github/workflows/ocr-service-**"
- ".github/workflows/docker_build_ocr-service.yml"
- ".github/workflows/test_ocr-service.yml"
- ".github/workflows/docker_template_ocr-service.yml"
- ".github/workflows/docker_smoke_ocr-service.yml"
pull_request:
paths:
- "apps/ocr-service/**"
- ".github/workflows/docker_build.yml"
- ".github/workflows/ocr-service-**"
- ".github/workflows/docker_build_ocr-service.yml"
- ".github/workflows/test_ocr-service.yml"
- ".github/workflows/docker_template_ocr-service.yml"
- ".github/workflows/docker_smoke_ocr-service.yml"
release:
types: [published]
workflow_dispatch:
Expand All @@ -23,7 +27,7 @@ permissions:
jobs:
build:
if: github.event_name != 'release' || startsWith(github.event.release.tag_name, 'ocr-service-v')
uses: ./.github/workflows/ocr-service-docker-template.yml
uses: ./.github/workflows/docker_template_ocr-service.yml
with:
image: cogstacksystems/cogstack-ocr-service
context: apps/ocr-service
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: docker-smoke-test
name: docker_smoke_jupyterhub

permissions:
contents: read
Expand All @@ -9,11 +9,11 @@ on:
tags: ['cogstack-jupyter-hub-v*.*.*']
paths:
- "apps/cogstack-jupyter-hub/**"
- ".github/workflows/docker-smoke-test.yml"
- ".github/workflows/docker_smoke_jupyterhub.yml"
pull_request:
paths:
- "apps/cogstack-jupyter-hub/**"
- ".github/workflows/docker-smoke-test.yml"
- ".github/workflows/docker_smoke_jupyterhub.yml"
workflow_dispatch:

concurrency:
Expand Down
Loading
Loading