e0e362d700
Deploy Docs Pages / build (push) Waiting to run
Deploy Docs Pages / deploy (push) Blocked by required conditions
Real E2E Tests / Real E2E CI (push) Blocked by required conditions
SDK Tests / SDK CI (push) Blocked by required conditions
SDK Tests / changes (push) Successful in 2m29s
Real E2E Tests / changes (push) Successful in 2m29s
Real E2E Tests / Python E2E (docker bridge) (push) Waiting to run
Real E2E Tests / C# E2E (docker bridge) (push) Waiting to run
Real E2E Tests / Go E2E (docker bridge) (push) Waiting to run
Real E2E Tests / Java E2E (docker bridge) (push) Waiting to run
Real E2E Tests / JavaScript E2E (docker bridge) (push) Waiting to run
SDK Tests / Python SDK Tests (sandbox) (push) Waiting to run
SDK Tests / CLI Quality (push) Waiting to run
SDK Tests / CLI Tests (push) Waiting to run
SDK Tests / Python SDK Quality (code-interpreter) (push) Waiting to run
SDK Tests / Python SDK Quality (sandbox) (push) Waiting to run
SDK Tests / Python SDK Tests (code-interpreter) (push) Waiting to run
SDK Tests / JavaScript SDK Quality And Tests (code-interpreter) (push) Waiting to run
SDK Tests / JavaScript SDK Quality And Tests (sandbox) (push) Waiting to run
SDK Tests / Kotlin SDK Quality And Tests (sandbox) (push) Waiting to run
SDK Tests / Kotlin SDK Quality And Tests (code-interpreter) (push) Waiting to run
SDK Tests / C# SDK Quality And Tests (code-interpreter) (push) Waiting to run
SDK Tests / C# SDK Quality And Tests (sandbox) (push) Waiting to run
SDK Tests / Go SDK Quality And Tests (push) Waiting to run
200 lines
5.9 KiB
YAML
200 lines
5.9 KiB
YAML
name: Kubernetes nightly build (Monorepo)
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read
|
|
packages: write
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "0 20 * * *"
|
|
pull_request:
|
|
branches: [ main ]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
changes:
|
|
uses: ./.github/workflows/detect-changes.yml
|
|
with:
|
|
area: kubernetes-mini-e2e
|
|
|
|
k8s-mini-e2e:
|
|
name: Kubernetes mini E2E (${{ matrix.variant }})
|
|
needs: changes
|
|
if: needs.changes.outputs.relevant == 'true'
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- variant: direct
|
|
script: scripts/python-k8s-e2e.sh
|
|
e2e_gateway_route_mode: ""
|
|
- variant: ingress-header
|
|
script: scripts/python-k8s-e2e-ingress.sh
|
|
e2e_gateway_route_mode: ""
|
|
- variant: ingress-uri
|
|
script: scripts/python-k8s-e2e-ingress.sh
|
|
e2e_gateway_route_mode: uri
|
|
env:
|
|
KIND_CLUSTER: opensandbox-e2e
|
|
KIND_K8S_VERSION: v1.30.4
|
|
KUBECONFIG_PATH: /tmp/opensandbox-kind-kubeconfig
|
|
KUBECONFIG: /tmp/opensandbox-kind-kubeconfig
|
|
OPENSANDBOX_E2E_SANDBOX_CPU: 250m
|
|
OPENSANDBOX_E2E_SANDBOX_MEMORY: 512Mi
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: "3.11"
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v6
|
|
with:
|
|
go-version: "1.24.0"
|
|
|
|
- name: Add Go bin to PATH
|
|
run: echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"
|
|
|
|
- name: Set up uv
|
|
uses: astral-sh/setup-uv@v7
|
|
with:
|
|
version: "latest"
|
|
|
|
- name: Set up kubectl
|
|
uses: azure/setup-kubectl@v4
|
|
|
|
- name: Set up Helm
|
|
uses: azure/setup-helm@v4
|
|
|
|
- name: Run Kubernetes runtime E2E
|
|
env:
|
|
E2E_GATEWAY_ROUTE_MODE: ${{ matrix.e2e_gateway_route_mode }}
|
|
run: bash "./${{ matrix.script }}"
|
|
|
|
- name: Dump kind diagnostics
|
|
if: always()
|
|
run: |
|
|
kubectl get pods -A -o wide || true
|
|
kubectl get batchsandboxes -A || true
|
|
kubectl get pv,pvc -A || true
|
|
kubectl describe deployment -n opensandbox-system opensandbox-controller-manager || true
|
|
kubectl describe deployment -n opensandbox-system opensandbox-server || true
|
|
kubectl get svc -n opensandbox-system opensandbox-server || true
|
|
|
|
- name: Eval in-cluster server logs
|
|
if: always()
|
|
run: |
|
|
kubectl logs -n opensandbox-system deployment/opensandbox-server || true
|
|
cat /tmp/opensandbox-server-port-forward.log || true
|
|
|
|
- name: Upload Python test artifacts
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: python-k8s-e2e-logs-${{ matrix.variant }}
|
|
path: |
|
|
/tmp/opensandbox-server-port-forward.log
|
|
/tmp/opensandbox-ingress-gateway-port-forward.log
|
|
if-no-files-found: ignore
|
|
retention-days: 5
|
|
|
|
- name: Clean up Kind cluster
|
|
if: always()
|
|
run: |
|
|
kind delete cluster --name "${KIND_CLUSTER}" || true
|
|
|
|
publish-nightly-latest:
|
|
name: Publish latest (${{ matrix.component }} nightly)
|
|
needs: k8s-mini-e2e
|
|
if: github.event_name != 'pull_request'
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- component: execd
|
|
workdir: components/execd
|
|
- component: ingress
|
|
workdir: components/ingress
|
|
- component: egress
|
|
workdir: components/egress
|
|
- component: controller
|
|
workdir: kubernetes
|
|
k8s_component: controller
|
|
- component: task-executor
|
|
workdir: kubernetes
|
|
k8s_component: task-executor
|
|
- component: server
|
|
workdir: server
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v6
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to DockerHub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
|
|
|
- name: Login to ACR
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: sandbox-registry.cn-zhangjiakou.cr.aliyuncs.com
|
|
username: ${{ secrets.ACR_USERNAME }}
|
|
password: ${{ secrets.ACR_PASSWORD }}
|
|
|
|
- name: Login to GHCR
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Build and push (TAG=latest)
|
|
working-directory: ${{ matrix.workdir }}
|
|
run: |
|
|
export TAG=latest
|
|
export GHCR_REPO="ghcr.io/${GITHUB_REPOSITORY_OWNER,,}/opensandbox"
|
|
if [ -n "${{ matrix.k8s_component }}" ]; then
|
|
export COMPONENT="${{ matrix.k8s_component }}"
|
|
fi
|
|
chmod +x build.sh
|
|
./build.sh
|
|
|
|
required:
|
|
name: Kubernetes Mini E2E CI
|
|
if: ${{ always() && github.event_name == 'pull_request' }}
|
|
needs: [changes, k8s-mini-e2e]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Verify required jobs
|
|
env:
|
|
RELEVANT: ${{ needs.changes.outputs.relevant }}
|
|
CHANGES_RESULT: ${{ needs.changes.result }}
|
|
E2E_RESULT: ${{ needs.k8s-mini-e2e.result }}
|
|
run: |
|
|
if [[ "$CHANGES_RESULT" != "success" ]]; then
|
|
echo "Change detection failed: $CHANGES_RESULT"
|
|
exit 1
|
|
fi
|
|
if [[ "$RELEVANT" == "true" ]]; then
|
|
[[ "$E2E_RESULT" == "success" ]]
|
|
else
|
|
[[ "$RELEVANT" == "false" && "$E2E_RESULT" == "skipped" ]]
|
|
fi
|