Skip to content
Open
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
  •  
  •  
  •  
24 changes: 19 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"

- id: get_tag
run: |
Expand All @@ -111,14 +112,14 @@ jobs:

# Build browser JS bundle
cd packages/karriojs
npm install
npm ci
npx gulp build --output "${GITHUB_WORKSPACE}/apps/api/karrio/server/static/karrio/js/karrio.js"
cd -

- name: Build embeddable elements
run: |
cd packages/elements
npm install
npm ci
npm run build

# Copy built elements to Django static directory
Expand Down Expand Up @@ -163,15 +164,28 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- id: get_tag
run: |
cat ./apps/api/karrio/server/VERSION
echo "tag=$(cat ./apps/api/karrio/server/VERSION)" >> "$GITHUB_ENV"

- name: Build karrio dashboard image
run: |
echo 'Building karrio dashboard:${{ env.tag }}...'
./bin/build-dashboard-image ${{ env.tag }}
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/dashboard/Dockerfile
push: false
load: true
tags: karrio/dashboard:${{ env.tag }}
build-args: |
VERSION=${{ env.tag }}
NEXT_PUBLIC_DASHBOARD_VERSION=${{ env.tag }}
SOURCE=https://github.com/karrioapi/karrio
cache-from: type=gha,scope=dashboard
cache-to: type=gha,mode=max,scope=dashboard

- name: Push karrio dashboard image
run: |
Expand Down
28 changes: 21 additions & 7 deletions .github/workflows/insiders-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"

- id: get_tag
run: |
Expand All @@ -112,14 +113,14 @@ jobs:
--additional-properties=useSingleRequestParameter=true

cd packages/karriojs
npm install
npm ci
npx gulp build --output "${GITHUB_WORKSPACE}/apps/api/karrio/server/static/karrio/js/karrio.js"
cd -

- name: Build embeddable elements
run: |
cd packages/elements
npm install
npm ci
npm run build

ELEMENTS_STATIC="${GITHUB_WORKSPACE}/apps/api/karrio/server/static/karrio/elements"
Expand Down Expand Up @@ -156,14 +157,27 @@ jobs:
submodules: recursive
token: ${{ secrets.GH_PAT }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- id: get_tag
run: |
cat ./apps/api/karrio/server/VERSION
echo "tag=$(cat ./apps/api/karrio/server/VERSION)" >> "$GITHUB_ENV"

- name: Login to GHCR
run: echo ${{ secrets.GH_PAT }} | docker login ghcr.io -u USERNAME --password-stdin

- name: Build insider dashboard image
run: |
echo 'Build and push karrio-insiders dashboard:${{ env.tag }}...'
echo ${{ secrets.GH_PAT }} | docker login ghcr.io -u USERNAME --password-stdin
KARRIO_IMAGE=ghcr.io/karrioapi/dashboard SOURCE=https://github.com/karrioapi/karrio-insiders ./bin/build-dashboard-image ${{ env.tag }} &&
docker push ghcr.io/karrioapi/dashboard:${{ env.tag }} || exit 1
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/dashboard/Dockerfile
push: true
tags: ghcr.io/karrioapi/dashboard:${{ env.tag }}
build-args: |
VERSION=${{ env.tag }}
NEXT_PUBLIC_DASHBOARD_VERSION=${{ env.tag }}
SOURCE=https://github.com/karrioapi/karrio-insiders
cache-from: type=gha,scope=insiders-dashboard
cache-to: type=gha,mode=max,scope=insiders-dashboard
11 changes: 9 additions & 2 deletions .github/workflows/platform-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"

- id: get_tag
run: |
Expand All @@ -57,14 +58,14 @@ jobs:
--additional-properties=useSingleRequestParameter=true

cd packages/karriojs
npm install
npm ci
npx gulp build --output "${GITHUB_WORKSPACE}/apps/api/karrio/server/static/karrio/js/karrio.js"
cd -

- name: Build embeddable elements
run: |
cd packages/elements
npm install
npm ci
npm run build

ELEMENTS_STATIC="${GITHUB_WORKSPACE}/apps/api/karrio/server/static/karrio/elements"
Expand Down Expand Up @@ -126,6 +127,12 @@ jobs:
submodules: recursive
token: ${{ secrets.GH_PAT }}

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
Expand Down
71 changes: 70 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

name: karrio-tests

on: [push]
on:
push:
pull_request:

permissions:
contents: read
Expand Down Expand Up @@ -237,3 +239,70 @@ jobs:
- name: Build
working-directory: packages/mcp
run: npm run build

helm:
# Helm chart validation — `helm lint` + `helm template` against each
# values-examples file, then `kubeconform` to verify the rendered
# manifests against the Kubernetes OpenAPI schema. See
# charts/karrio/README.md for install instructions.
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
submodules: false

- name: Install Helm
uses: azure/setup-helm@v4
with:
version: v3.15.4

- name: Install kubeconform
run: |
curl -sSL \
https://github.com/yannh/kubeconform/releases/download/v0.6.7/kubeconform-linux-amd64.tar.gz \
| tar xz
sudo mv kubeconform /usr/local/bin/kubeconform
kubeconform -v

- name: Build chart dependencies
run: helm dependency build charts/karrio

- name: helm lint (default values)
run: helm lint charts/karrio

- name: helm lint (eks-alb)
run: helm lint charts/karrio -f charts/karrio/values-examples/eks-alb.yaml

- name: helm lint (gke)
run: helm lint charts/karrio -f charts/karrio/values-examples/gke.yaml

- name: helm lint (local)
run: helm lint charts/karrio -f charts/karrio/values-examples/local.yaml

- name: helm template + kubeconform (eks-alb)
run: |
helm template karrio charts/karrio \
-f charts/karrio/values-examples/eks-alb.yaml \
| kubeconform -strict -ignore-missing-schemas \
-kubernetes-version 1.29.0 \
-schema-location default \
-schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json'

- name: helm template + kubeconform (gke)
run: |
helm template karrio charts/karrio \
-f charts/karrio/values-examples/gke.yaml \
| kubeconform -strict -ignore-missing-schemas \
-kubernetes-version 1.29.0 \
-schema-location default \
-schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json'

- name: helm template + kubeconform (local)
run: |
helm template karrio charts/karrio \
-f charts/karrio/values-examples/local.yaml \
| kubeconform -strict -ignore-missing-schemas \
-kubernetes-version 1.29.0 \
-schema-location default \
-schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json'
Loading
Loading