diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 14eee78..b486733 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -6,11 +6,20 @@ on: branches: [ main ] jobs: - readme: + validate: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" - name: Ensure scaffold files exist run: | test -f README.md test -f LICENSE + test -f .release-versions.env + - name: Validate release versions + run: bash tests/validate-schemas.sh + - name: Validate pipeline files + run: bash tests/validate-scripts.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..8876d2a --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,51 @@ +image: ghcr.io/aurekai/aurekai:0.8.0-alpha.4 + +stages: + - validate + - audit + - pack + - gate + +doctor-deep: + stage: validate + script: + - akai doctor --deep --json + +manifest-verify: + stage: validate + script: + - akai verify --manifest artifact.json --json + +model-memory-pack: + stage: pack + script: + - akai pack --tag latest --json + artifacts: + paths: + - artifacts/ + +sae-audit: + stage: audit + script: + - akai sae audit --model default --json + +semantic-cache-bench: + stage: audit + script: + - akai cache bench --queries 100 --json + +proof-bundle-export: + stage: audit + script: + - akai proof export --output proof-bundle.tar.gz + artifacts: + paths: + - proof-bundle.tar.gz + +release-gate: + stage: gate + script: + - akai release gate --version 0.8.0-alpha.4 --json + only: + - main + - tags diff --git a/.release-versions.env b/.release-versions.env new file mode 100644 index 0000000..e8f31ad --- /dev/null +++ b/.release-versions.env @@ -0,0 +1,4 @@ +AUREKAI_VERSION=0.8.0-alpha.4 +AKAI_PACKAGE_VERSION=0.8.0-alpha.4 +AUREKAI_MANIFEST_SCHEMA=aurekai.deploy.v1 +HELM_CHART_VERSION=0.8.1 diff --git a/README.md b/README.md index 44507ba..a2cac8f 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Aurekai integration surface for Gitlab Ci. -Status: planned +Status: active Type: workflow ## Core Template Set diff --git a/docs/quickstart.md b/docs/quickstart.md new file mode 100644 index 0000000..ce212ba --- /dev/null +++ b/docs/quickstart.md @@ -0,0 +1,33 @@ +# Quickstart — aurekai-gitlab-ci + +Run Aurekai pipeline templates as GitLab CI stages. + +## Usage + +Copy `.gitlab-ci.yml` to your repo root, or include it: + +```yaml +include: + - project: 'aurekai/aurekai-gitlab-ci' + ref: main + file: '.gitlab-ci.yml' +``` + +## Stages + +| Stage | Job | Description | +|---|---|---| +| validate | doctor-deep | `akai doctor --deep` | +| validate | manifest-verify | Manifest schema check | +| pack | model-memory-pack | Pack model artifacts | +| audit | sae-audit | SAE audit | +| audit | semantic-cache-bench | Cache benchmark | +| audit | proof-bundle-export | Export proof bundle | +| gate | release-gate | Release gate check | + +## Validate Locally + +```bash +bash tests/validate-schemas.sh +bash tests/validate-scripts.sh +``` diff --git a/tests/validate-schemas.sh b/tests/validate-schemas.sh new file mode 100755 index 0000000..527694b --- /dev/null +++ b/tests/validate-schemas.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +set -euo pipefail +ENV_FILE="$(cd "$(dirname "$0")/.." && pwd)/.release-versions.env" +echo "Checking .release-versions.env..." +test -f "$ENV_FILE" || { echo "MISSING: $ENV_FILE"; exit 1; } +for key in AUREKAI_VERSION AKAI_PACKAGE_VERSION AUREKAI_MANIFEST_SCHEMA HELM_CHART_VERSION; do + if grep -q "^${key}=" "$ENV_FILE"; then + echo " v $key" + else + echo " x $key missing"; exit 1 + fi +done +echo; echo "All schema checks passed." diff --git a/tests/validate-scripts.sh b/tests/validate-scripts.sh new file mode 100755 index 0000000..c92d5bf --- /dev/null +++ b/tests/validate-scripts.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +set -euo pipefail +ROOT="$(cd "$(dirname "$0")/.." && pwd)" +echo "Validating .gitlab-ci.yml..." +python3 -c "import yaml,sys; yaml.safe_load(open(sys.argv[1]))" "$ROOT/.gitlab-ci.yml" +echo " v .gitlab-ci.yml" +echo; echo "GitLab CI validation passed."