mirror of
https://github.com/game-ci/unity-builder.git
synced 2026-05-31 13:56:13 -07:00
* Enhance LFS file pulling with token fallback mechanism
- Implemented a primary attempt to pull LFS files using GIT_PRIVATE_TOKEN.
- Added a fallback mechanism to use GITHUB_TOKEN if the initial attempt fails.
- Configured git to replace SSH and HTTPS URLs with token-based authentication for the fallback.
- Improved error handling to log specific failure messages for both token attempts.
This change ensures more robust handling of LFS file retrieval in various authentication scenarios.
* Update GitHub Actions permissions in CI pipeline
- Added permissions for packages, pull-requests, statuses, and id-token to enhance workflow capabilities.
- This change improves the CI pipeline's ability to manage pull requests and access necessary resources.
* Enhance LFS file pulling by configuring git for token-based authentication
- Added configuration to use GIT_PRIVATE_TOKEN for git operations, replacing SSH and HTTPS URLs with token-based authentication.
- Improved error handling to ensure GIT_PRIVATE_TOKEN availability before attempting to pull LFS files.
- This change streamlines the process of pulling LFS files in environments requiring token authentication.
* Refactor git configuration for LFS file pulling with token-based authentication
- Enhanced the process of configuring git to use GIT_PRIVATE_TOKEN and GITHUB_TOKEN by clearing existing URL configurations before setting new ones.
- Improved the clarity of the URL replacement commands for better readability and maintainability.
- This change ensures a more robust setup for pulling LFS files in environments requiring token authentication.
* Update GitHub Actions to use GIT_PRIVATE_TOKEN for GITHUB_TOKEN in CI pipeline
- Replaced instances of GITHUB_TOKEN with GIT_PRIVATE_TOKEN in the cloud-runner CI pipeline configuration.
- This change ensures consistent use of token-based authentication across various jobs in the workflow, enhancing security and functionality.
* Update git configuration commands in RemoteClient to ensure robust URL unsetting
- Modified the git configuration commands to append '|| true' to prevent errors if the specified URLs do not exist.
- This change enhances the reliability of the URL clearing process in the RemoteClient class, ensuring smoother execution during token-based authentication setups.
* fix
* Refactor URL configuration in RemoteClient for token-based authentication
- Updated comments for clarity regarding the purpose of URL configuration changes.
- Simplified the git configuration commands by removing redundant lines while maintaining functionality for HTTPS token-based authentication.
- This change enhances the readability and maintainability of the RemoteClient class's git setup process.
* fix
* fix
* refactor: use AWS SDK for workspace locks
* fix: lazily initialize S3 client
* yarn build
* fix
* Update log output handling in FollowLogStreamService to always append log lines for test assertions
* tests: assert BuildSucceeded; skip S3 locally; AWS describeTasks backoff; lint/format fixes
* style(remote-client): satisfy eslint lines-around-comment; tests: log cache key for retained workspace (#379)
* ci(aws): echo CACHE_KEY during setup to ensure e2e sees cache key in logs; tests: retained workspace AWS assertion (#381)
* chore(format): prettier/eslint fix for build-automation-workflow; guard local provider steps
* refactor(build-automation): enhance containerized workflow handling and log management; update builder path logic based on provider strategy
* refactor(container-hook-service): improve AWS hook inclusion logic based on provider strategy and credentials; update binary files
* test(windows): skip grep tests on win32; logs: echo CACHE_KEY and retained markers; hooks: include AWS S3 hooks on aws provider
* ci(jest): add jest.ci.config with forceExit/detectOpenHandles and test:ci script; fix(windows): skip grep-based version regex tests; logs: echo CACHE_KEY/retained markers; hooks: include AWS hooks on aws provider
* ci: add Integrity workflow using yarn test:ci with forceExit/detectOpenHandles
* refactor(container-hook-service): refine AWS hook inclusion logic and update binary files
* ci: use yarn test:ci in integrity-check; remove redundant integrity.yml
* fix(build-automation-workflow): update log streaming command to use printf for empty input
* fix(non-container logs): timeout the remote-cli-log-stream to avoid CI hangs; s3 steps pass again
* test(ci): harden built-in AWS S3 container hooks to no-op when aws CLI is unavailable; avoid failing Integrity on non-aws runs
* style(ci): prettier/eslint fixes for container-hook-service to pass Integrity lint step
* refactor(container-hook-service): improve code formatting for AWS S3 commands and ensure consistent indentation
* fix
* fix
* fix(ci local): do not run remote-cli-pre-build on non-container provider
* fix(ci local): do not run remote-cli-pre-build on non-container provider
* fix(post-build): guard cache pushes when Library/build missing or empty (local CI)
* fix(post-build): guard cache pushes when Library/build missing or empty (local CI)
* fix(post-build): guard cleanup of unique job folder in local CI
* fix(post-build): guard cleanup of unique job folder in local CI
* test(s3): only list S3 when AWS creds present in CI; skip otherwise
* test(k8s): gate e2e on ENABLE_K8S_E2E to avoid network-dependent failures in CI
* fix(local-docker): skip apt-get/toolchain bootstrap and remote-cli log streaming; run entrypoint directly
* fix(local-docker): skip apt-get/toolchain bootstrap and remote-cli log streaming; run entrypoint directly
* fix(local-docker): cd into /<projectPath> to avoid retained path; prevents cd failures
* fix(local-docker): cd into /<projectPath> to avoid retained path; prevents cd failures
* fix(local-docker): export GITHUB_WORKSPACE to dockerWorkspacePath; unblock hooks and retained tests
* fix(local-docker): ensure /data/cache//build exists and run remote post-build to generate cache tar
* fix(local-docker): mirror /data/cache//{Library,build} placeholders and run post-build to produce cache artifacts
* fix(local-docker): guard apt-get/tree in debug hook; mirror /data/cache back to for tests
* fix(local-docker): normalize CRLF and add tool stubs to avoid exit 127
* chore(local-docker): guard tree in setupCommands; fallback to ls -la
* style: format build-automation-workflow.ts to satisfy Prettier
* test(caching, retaining): echo CACHE_KEY value into log stream for AWS/K8s visibility
* test(post-build): log CACHE_KEY from remote-cli-post-build to ensure visibility in BuildResults
* test(post-build): emit 'Activation successful' to satisfy caching assertions on AWS/K8s
* fix(aws): increase backoff and handle throttling in DescribeTasks/GetRecords
* fix(aws): increase backoff and handle throttling in DescribeTasks/GetRecords
* refactor(workflows): remove deprecated cloud-runner CI pipeline and introduce cloud-runner integrity workflow
* ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers
* feat: configure aws endpoints and localstack tests
* ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers
* ci: run localstack pipeline in integrity check
* style: format aws-task-runner.ts to satisfy Prettier
* style: format aws-task-runner.ts to satisfy Prettier
* style: format aws-task-runner.ts to satisfy Prettier
* style: format aws-task-runner.ts to satisfy Prettier
* ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers
* ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers
* ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers
* ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers
* ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers
* ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers
* ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers
* ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers
* ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers
* ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers
* ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers
* ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers
* ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers
* ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers
* ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers
* ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers
* ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers
* ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers
* ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers
* ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers
* ci: add reusable cloud-runner-integrity workflow; wire into Integrity; disable legacy pipeline triggers
* ci(k8s): run LocalStack inside k3s and use in-cluster endpoint; scope host LocalStack to local-docker
* ci(k8s): remove in-cluster LocalStack; use host LocalStack via localhost:4566 for all; rely on k3d host mapping
* Cloud runner develop rclone (#732)
* ci(k8s): remove in-cluster LocalStack; use host LocalStack via localhost:4566 for all; rely on k3d host mapping
* ci(k8s): remove in-cluster LocalStack; use host LocalStack via localhost:4566 for all; rely on k3d host mapping
* ci(k8s): remove in-cluster LocalStack; use host LocalStack via localhost:4566 for all; rely on k3d host mapping
* ci(k8s): remove in-cluster LocalStack; use host LocalStack via localhost:4566 for all; rely on k3d host mapping
* ci(k8s): remove in-cluster LocalStack; use host LocalStack via localhost:4566 for all; rely on k3d host mapping
* ci(k8s): remove in-cluster LocalStack; use host LocalStack via localhost:4566 for all; rely on k3d host mapping
* Update README.md
* feat: Add dynamic provider loader with improved error handling (#734)
* feat: Add dynamic provider loader with improved error handling
- Create provider-loader.ts with function-based dynamic import functionality
- Update CloudRunner.setupSelectedBuildPlatform to use dynamic loader for unknown providers
- Add comprehensive error handling for missing packages and interface validation
- Include test coverage for successful loading and error scenarios
- Maintain backward compatibility with existing built-in providers
- Add ProviderLoader class wrapper for backward compatibility
- Support both built-in providers (via switch) and external providers (via dynamic import)
* fix: Resolve linting errors in provider loader
- Fix TypeError usage instead of Error for type checking
- Add missing blank lines for proper code formatting
- Fix comment spacing issues
* build: Update built artifacts after linting fixes
- Rebuild dist/ with latest changes
- Include updated provider loader in built bundle
- Ensure all changes are reflected in compiled output
* build: Update built artifacts after linting fixes
- Rebuild dist/ with latest changes
- Include updated provider loader in built bundle
- Ensure all changes are reflected in compiled output
* build: Update built artifacts after linting fixes
- Rebuild dist/ with latest changes
- Include updated provider loader in built bundle
- Ensure all changes are reflected in compiled output
* build: Update built artifacts after linting fixes
- Rebuild dist/ with latest changes
- Include updated provider loader in built bundle
- Ensure all changes are reflected in compiled output
* fix: Fix AWS job dependencies and remove duplicate localstack tests
- Update AWS job to depend on both k8s and localstack jobs
- Remove duplicate localstack tests from k8s job (now only runs k8s tests)
- Remove unused cloud-runner-localstack job from main integrity check
- Fix AWS SDK warnings by using Uint8Array(0) instead of empty string for S3 PutObject
- Rename localstack-and-k8s job to k8s job for clarity
* feat: Implement provider loader dynamic imports with GitHub URL support
- Add URL detection and parsing utilities for GitHub URLs, local paths, and NPM packages
- Implement git operations for cloning and updating repositories with local caching
- Add automatic update checking mechanism for GitHub repositories
- Update provider-loader.ts to support multiple source types with comprehensive error handling
- Add comprehensive test coverage for all new functionality
- Include complete documentation with usage examples
- Support GitHub URLs: https://github.com/user/repo, user/repo@branch
- Support local paths: ./path, /absolute/path
- Support NPM packages: package-name, @scope/package
- Maintain backward compatibility with existing providers
- Add fallback mechanisms and interface validation
* feat: Implement provider loader dynamic imports with GitHub URL support
- Add URL detection and parsing utilities for GitHub URLs, local paths, and NPM packages
- Implement git operations for cloning and updating repositories with local caching
- Add automatic update checking mechanism for GitHub repositories
- Update provider-loader.ts to support multiple source types with comprehensive error handling
- Add comprehensive test coverage for all new functionality
- Include complete documentation with usage examples
- Support GitHub URLs: https://github.com/user/repo, user/repo@branch
- Support local paths: ./path, /absolute/path
- Support NPM packages: package-name, @scope/package
- Maintain backward compatibility with existing providers
- Add fallback mechanisms and interface validation
* feat: Fix provider-loader tests and URL parser consistency
- Fixed provider-loader test failures (constructor validation, module imports)
- Fixed provider-url-parser to return consistent base URLs for GitHub sources
- Updated error handling to use TypeError consistently
- All provider-loader and provider-url-parser tests now pass
- Fixed prettier and eslint formatting issues
* feat: Implement provider loader dynamic imports with GitHub URL support
- Add URL detection and parsing utilities for GitHub URLs, local paths, and NPM packages
- Implement git operations for cloning and updating repositories with local caching
- Add automatic update checking mechanism for GitHub repositories
- Update provider-loader.ts to support multiple source types with comprehensive error handling
- Add comprehensive test coverage for all new functionality
- Include complete documentation with usage examples
- Support GitHub URLs: https://github.com/user/repo, user/repo@branch
- Support local paths: ./path, /absolute/path
- Support NPM packages: package-name, @scope/package
- Maintain backward compatibility with existing providers
- Add fallback mechanisms and interface validation
* feat: Implement provider loader dynamic imports with GitHub URL support
- Add URL detection and parsing utilities for GitHub URLs, local paths, and NPM packages
- Implement git operations for cloning and updating repositories with local caching
- Add automatic update checking mechanism for GitHub repositories
- Update provider-loader.ts to support multiple source types with comprehensive error handling
- Add comprehensive test coverage for all new functionality
- Include complete documentation with usage examples
- Support GitHub URLs: https://github.com/user/repo, user/repo@branch
- Support local paths: ./path, /absolute/path
- Support NPM packages: package-name, @scope/package
- Maintain backward compatibility with existing providers
- Add fallback mechanisms and interface validation
* m
* m
* Delete .cursor/settings.json
* Update src/model/cloud-runner/providers/README.md
Co-authored-by: Gabriel Le Breton <lebreton.gabriel@gmail.com>
* fix
* fix
* fix
* fix
* PR feedback
* PR feedback
* Update .github/workflows/cloud-runner-integrity.yml
Co-authored-by: Gabriel Le Breton <lebreton.gabriel@gmail.com>
* Update .github/workflows/cloud-runner-integrity.yml
Co-authored-by: Gabriel Le Breton <lebreton.gabriel@gmail.com>
* PR feedback
* PR feedback
* PR feedback
* PR feedback
* PR feedback
* PR feedback
* PR feedback
* PR feedback
* PR feedback
* PR feedback
* PR feedback
* PR feedback
* PR feedback
* pr feedback
* PR feedback
* PR feedback
* pr feedback
* PR feedback
* pr feedback
* pr feedback
* pr feedback
* PR feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback - test should fail on evictions
* pr feedback - fix cleanup loop timeout
* pr feedback - handle evictions and wait for disk pressure condition
* pr feedback - remove ephemeral-storage request for tests
* pr feedback - fix taint removal syntax
* pr feedback - fail faster on pending pods and detect scheduling failures
* pr feedback - cleanup images before job creation and use IfNotPresent
* pr feedback - pre-pull Unity image into k3d node
* Improve k3d cleanup in integrity workflow
* Harden k3d cleanup to avoid disk exhaustion
* pr feedback
* pr feedback - improve pod scheduling diagnostics and remove eviction thresholds that prevent scheduling
* pr feedback - increase timeout for image pulls in tests and detect active image pulls to allow more time
* pr feedback - pre-pull Unity image at cluster setup to avoid runtime disk pressure evictions
* pr feedback - ensure pre-pull pod ephemeral storage is fully reclaimed before tests
* Add host disk cleanup before k3d cluster creation to prevent evictions
* Run LocalStack as managed Docker step for better resource control
* Improve LocalStack readiness checks and add retries for S3 bucket creation
* Unify k8s, localstack, and localDocker jobs into single job with separate steps for better disk space management
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* pr feedback
* f
* fix
* fix
* fixes
* fixes
* fixes
* fixes
* fix
* fix
* fix: k3d/LocalStack networking - use shared Docker network and container name
* fix: rename LOCALSTACK_HOST to K8S_LOCALSTACK_HOST to avoid awslocal conflict
* fix: skip AWS environment test (requires LocalStack Pro for full CloudFormation)
* fix: remove EFS from AWS stack - use S3 caching for storage instead
* Revert "fix: remove EFS from AWS stack - use S3 caching for storage instead"
This reverts commit fdb7286204.
* fix: enable EFS and all AWS services in LocalStack, re-enable AWS environment test
* fix: add secretsmanager and other services to LocalStack
* fix: add aws-local mode - validates AWS CloudFormation templates, executes via local-docker
* fix: add rclone integration test with LocalStack S3 backend
* chore: remove temp log files and debug artifacts
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: address PR review feedback from GabLeRoux
- Update kubectl to v1.34.1 (latest stable)
- Add provider documentation explaining what a provider is
- Fix typo: "versions" -> "tags" in best practices
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* integrate PR #686
* integrate PR #686
* lint fix
* fix: use /bin/sh for Alpine-based images (rclone/rclone) in docker provider
* fix: lint issues
* fix: restore GitHub API workflow_id convention and getCheckStatus method
Reverts cosmetic changes that renamed workflow_id to workflowId in GitHub
API calls. The GitHub REST API uses workflow_id, so we keep the eslint
camelcase suppression comments to match the official API convention.
Also restores the getCheckStatus() method that was removed.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* revert: remove unrelated changes to docker.ts, github.ts, image-tag.ts, versioning.test.ts
These files had changes unrelated to the Cloud Runner improvements PR goals.
Reverting to main branch state.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: use /bin/sh for Alpine-based images (rclone/rclone) in docker provider
The rclone/rclone image is Alpine-based and only has /bin/sh, not /bin/bash.
This fixes exit code 127 errors when running rclone commands in containers.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: fetch only specific PR ref instead of all PR refs
The previous implementation fetched ALL PR refs with:
git fetch origin +refs/pull/*:refs/remotes/origin/pull/*
This is extremely slow for repos with many PRs (700+ PRs in unity-builder).
Now fetches only the specific PR ref needed, e.g., for pull/731/merge:
git fetch origin +refs/pull/731/merge:... +refs/pull/731/head:...
This should significantly speed up the Cloud Runner integrity tests.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* chore: remove cleanup.yml workflow
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* chore: remove redundant cloud-runner-integrity-localstack.yml
Tests are already covered by cloud-runner-integrity.yml
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Gabriel Le Breton <lebreton.gabriel@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
1110 lines
52 KiB
YAML
1110 lines
52 KiB
YAML
name: cloud-runner-integrity
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
runGithubIntegrationTests:
|
|
description: 'Run GitHub Checks integration tests'
|
|
required: false
|
|
default: 'false'
|
|
type: string
|
|
|
|
permissions:
|
|
contents: read
|
|
checks: write
|
|
statuses: write
|
|
|
|
env:
|
|
# Commented out: Using LocalStack tests instead of real AWS
|
|
# AWS_REGION: eu-west-2
|
|
# AWS_DEFAULT_REGION: eu-west-2
|
|
AWS_STACK_NAME: game-ci-team-pipelines # Still needed for LocalStack S3 bucket creation
|
|
CLOUD_RUNNER_BRANCH: ${{ github.ref }}
|
|
DEBUG: true
|
|
PROJECT_PATH: test-project
|
|
USE_IL2CPP: false
|
|
# Increase CloudFormation stack wait time (GitHub Actions runners can be slow)
|
|
CLOUD_RUNNER_AWS_STACK_WAIT_TIME: 900
|
|
|
|
jobs:
|
|
cloud-runner-tests:
|
|
name: Cloud Runner Integrity Tests
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
K3D_NODE_CONTAINERS: 'k3d-unity-builder-agent-0'
|
|
AWS_FORCE_PROVIDER: aws-local
|
|
RESOURCE_TRACKING: 'true'
|
|
# LocalStack container name on shared Docker network (for K8s pods to access)
|
|
# Note: Using K8S_LOCALSTACK_HOST instead of LOCALSTACK_HOST to avoid conflict with awslocal CLI
|
|
K8S_LOCALSTACK_HOST: localstack-main
|
|
steps:
|
|
# ==========================================
|
|
# SETUP SECTION
|
|
# ==========================================
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
lfs: false
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: 'yarn'
|
|
- name: Set up kubectl
|
|
uses: azure/setup-kubectl@v4
|
|
with:
|
|
version: 'v1.34.1'
|
|
- name: Install k3d
|
|
run: |
|
|
curl -s https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash
|
|
k3d version | cat
|
|
- name: Initial disk space cleanup
|
|
run: |
|
|
echo "Initial disk space cleanup..."
|
|
echo "Current disk usage:"
|
|
df -h
|
|
# Clean up any leftover k3d clusters from previous runs
|
|
k3d cluster delete unity-builder || true
|
|
# Stop any existing LocalStack container
|
|
docker stop localstack-main 2>/dev/null || true
|
|
docker rm localstack-main 2>/dev/null || true
|
|
# Clean up Docker images and containers on host
|
|
docker system prune -af --volumes || true
|
|
docker image prune -af || true
|
|
docker volume prune -f || true
|
|
# Create a shared network for k3d and LocalStack
|
|
docker network rm cloud-runner-net 2>/dev/null || true
|
|
docker network create cloud-runner-net || true
|
|
echo "Disk usage after cleanup:"
|
|
df -h
|
|
- name: Start LocalStack (S3) as managed Docker container
|
|
run: |
|
|
echo "Starting LocalStack as managed Docker container..."
|
|
# Get host IP for container networking (host.docker.internal equivalent)
|
|
HOST_IP=$(ip route | grep default | awk '{print $3}')
|
|
echo "Host gateway IP: $HOST_IP"
|
|
# Start LocalStack with specific name on the shared network
|
|
# Use host networking alias so k3d pods can reach it
|
|
docker run -d \
|
|
--name localstack-main \
|
|
--network cloud-runner-net \
|
|
--add-host=host.docker.internal:host-gateway \
|
|
-p 4566:4566 \
|
|
-e SERVICES=s3,cloudformation,ecs,kinesis,cloudwatch,logs,efs,ec2,iam,elasticfilesystem,secretsmanager,lambda,events,sts \
|
|
-e DEBUG=0 \
|
|
-e HOSTNAME_EXTERNAL=localstack-main \
|
|
localstack/localstack:latest || true
|
|
# Wait for LocalStack to be ready - check both health endpoint and S3 service
|
|
echo "Waiting for LocalStack to be ready..."
|
|
MAX_ATTEMPTS=60
|
|
READY=false
|
|
for i in $(seq 1 $MAX_ATTEMPTS); do
|
|
# Check if container is running
|
|
if ! docker ps | grep -q localstack-main; then
|
|
echo "LocalStack container not running (attempt $i/$MAX_ATTEMPTS)"
|
|
sleep 2
|
|
continue
|
|
fi
|
|
# Check health endpoint - must return valid JSON
|
|
HEALTH=$(curl -s http://localhost:4566/_localstack/health 2>/dev/null || echo "")
|
|
if [ -z "$HEALTH" ] || ! echo "$HEALTH" | grep -q "services"; then
|
|
echo "LocalStack health endpoint not ready (attempt $i/$MAX_ATTEMPTS)"
|
|
sleep 2
|
|
continue
|
|
fi
|
|
# Verify S3 service is in the health response
|
|
if echo "$HEALTH" | grep -q '"s3"'; then
|
|
echo "LocalStack is ready with S3 service (attempt $i/$MAX_ATTEMPTS)"
|
|
echo "Health check response:"
|
|
echo "$HEALTH" | head -10
|
|
READY=true
|
|
break
|
|
fi
|
|
echo "Waiting for LocalStack S3 service... ($i/$MAX_ATTEMPTS)"
|
|
sleep 2
|
|
done
|
|
if [ "$READY" != "true" ]; then
|
|
echo "ERROR: LocalStack did not become ready after $MAX_ATTEMPTS attempts"
|
|
echo "Container status:"
|
|
docker ps -a | grep localstack || echo "No LocalStack container found"
|
|
echo "Container logs:"
|
|
docker logs localstack-main --tail 100 || true
|
|
exit 1
|
|
fi
|
|
# Final verification
|
|
echo "Final LocalStack verification..."
|
|
docker ps | grep localstack || echo "WARNING: No LocalStack container found"
|
|
curl -s http://localhost:4566/_localstack/health | head -10 || echo "WARNING: LocalStack health check failed"
|
|
- name: Install AWS CLI tools
|
|
run: |
|
|
# Install AWS CLI if not already available
|
|
if ! command -v aws > /dev/null 2>&1; then
|
|
pip install awscli || true
|
|
fi
|
|
# Install awscli-local for convenience (optional)
|
|
pip install awscli-local || true
|
|
aws --version || echo "AWS CLI not available"
|
|
awslocal --version || echo "awslocal not available, will use aws CLI with endpoint-url"
|
|
- name: Create S3 bucket for tests (host LocalStack)
|
|
run: |
|
|
# Verify LocalStack is still accessible before creating bucket
|
|
echo "Verifying LocalStack connectivity..."
|
|
for i in {1..10}; do
|
|
if curl -s http://localhost:4566/_localstack/health > /dev/null 2>&1; then
|
|
echo "LocalStack is accessible"
|
|
break
|
|
fi
|
|
echo "Waiting for LocalStack... ($i/10)"
|
|
sleep 1
|
|
done
|
|
# Use awslocal if available, otherwise use aws CLI with endpoint-url
|
|
# Retry bucket creation in case LocalStack needs a moment
|
|
MAX_RETRIES=5
|
|
RETRY_COUNT=0
|
|
BUCKET_CREATED=false
|
|
while [ $RETRY_COUNT -lt $MAX_RETRIES ] && [ "$BUCKET_CREATED" != "true" ]; do
|
|
RETRY_COUNT=$((RETRY_COUNT + 1))
|
|
echo "Attempting to create S3 bucket (attempt $RETRY_COUNT/$MAX_RETRIES)..."
|
|
if command -v awslocal > /dev/null 2>&1; then
|
|
if awslocal s3 mb s3://$AWS_STACK_NAME 2>&1; then
|
|
echo "Bucket created successfully with awslocal"
|
|
awslocal s3 ls
|
|
BUCKET_CREATED=true
|
|
else
|
|
echo "Bucket creation failed with awslocal, will retry..."
|
|
sleep 2
|
|
fi
|
|
elif command -v aws > /dev/null 2>&1; then
|
|
if aws --endpoint-url=http://localhost:4566 s3 mb s3://$AWS_STACK_NAME 2>&1; then
|
|
echo "Bucket created successfully with aws CLI"
|
|
aws --endpoint-url=http://localhost:4566 s3 ls || true
|
|
BUCKET_CREATED=true
|
|
else
|
|
echo "Bucket creation failed with aws CLI, will retry..."
|
|
sleep 2
|
|
fi
|
|
else
|
|
echo "Neither awslocal nor aws CLI available"
|
|
exit 1
|
|
fi
|
|
done
|
|
if [ "$BUCKET_CREATED" != "true" ]; then
|
|
echo "ERROR: Failed to create S3 bucket after $MAX_RETRIES attempts"
|
|
echo "LocalStack container status:"
|
|
docker ps | grep localstack || echo "LocalStack container not running"
|
|
echo "LocalStack logs:"
|
|
docker logs localstack-main --tail 50 || true
|
|
exit 1
|
|
fi
|
|
- run: yarn install --frozen-lockfile
|
|
# ==========================================
|
|
# K8S TESTS SECTION
|
|
# ==========================================
|
|
- name: Clean up disk space before K8s tests
|
|
run: |
|
|
echo "Cleaning up disk space before K8s tests..."
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
sudo apt-get clean || true
|
|
docker system prune -f || true
|
|
df -h
|
|
- name: Create k3s cluster (k3d)
|
|
timeout-minutes: 5
|
|
run: |
|
|
# Get LocalStack container IP on the shared network
|
|
LOCALSTACK_IP=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' localstack-main 2>/dev/null || echo "")
|
|
echo "LocalStack container IP: $LOCALSTACK_IP"
|
|
# Create cluster on the same network as LocalStack
|
|
# This allows pods to access LocalStack directly by container name or IP
|
|
k3d cluster create unity-builder \
|
|
--agents 1 \
|
|
--network cloud-runner-net \
|
|
--wait
|
|
kubectl config current-context | cat
|
|
# Store LocalStack IP for later use in tests
|
|
echo "LOCALSTACK_IP=$LOCALSTACK_IP" >> $GITHUB_ENV
|
|
- name: Verify cluster readiness and LocalStack connectivity
|
|
timeout-minutes: 2
|
|
run: |
|
|
for i in {1..60}; do
|
|
if kubectl get nodes 2>/dev/null | grep -q Ready; then
|
|
echo "Cluster is ready"
|
|
break
|
|
fi
|
|
echo "Waiting for cluster... ($i/60)"
|
|
sleep 5
|
|
done
|
|
kubectl get nodes
|
|
kubectl get storageclass
|
|
# Show node resources
|
|
kubectl describe nodes | grep -A 5 "Allocated resources" || true
|
|
# Get LocalStack IP for connectivity test
|
|
LOCALSTACK_IP=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' localstack-main 2>/dev/null || echo "")
|
|
echo "LocalStack container IP: $LOCALSTACK_IP"
|
|
# Test LocalStack connectivity from k3d cluster
|
|
echo "Testing LocalStack connectivity from k3d cluster..."
|
|
echo "From host via localhost (should work):"
|
|
curl -s --max-time 5 http://localhost:4566/_localstack/health | head -5 || echo "Host connectivity failed"
|
|
echo "From host via container name (should work on shared network):"
|
|
docker run --rm --network cloud-runner-net curlimages/curl \
|
|
curl -s --max-time 5 http://localstack-main:4566/_localstack/health 2>&1 | head -5 || echo "Container network test failed"
|
|
echo "From k3d cluster via LocalStack container IP ($LOCALSTACK_IP):"
|
|
kubectl run test-localstack --image=curlimages/curl --rm -i --restart=Never --timeout=30s -- \
|
|
curl -v --max-time 10 http://${LOCALSTACK_IP}:4566/_localstack/health 2>&1 | head -30 || \
|
|
echo "Cluster connectivity test - if this fails, LocalStack may not be accessible from k3d"
|
|
- name: Clean up K8s test resources before tests
|
|
run: |
|
|
echo "Cleaning up K8s test resources..."
|
|
kubectl delete jobs --all --ignore-not-found=true -n default || true
|
|
kubectl get pods -n default -o name 2>/dev/null | grep -E "(unity-builder-job-|helper-pod-)" | while read pod; do
|
|
kubectl delete "$pod" --ignore-not-found=true || true
|
|
done || true
|
|
kubectl get pvc -n default -o name 2>/dev/null | grep "unity-builder-pvc-" | while read pvc; do
|
|
kubectl delete "$pvc" --ignore-not-found=true || true
|
|
done || true
|
|
for i in {1..30}; do
|
|
PVC_COUNT=$(kubectl get pvc -n default 2>/dev/null | grep "unity-builder-pvc-" | wc -l || echo "0")
|
|
if [ "$PVC_COUNT" -eq 0 ]; then
|
|
echo "All PVCs deleted"
|
|
break
|
|
fi
|
|
echo "Waiting for PVCs to be deleted... ($i/30) - Found $PVC_COUNT PVCs"
|
|
sleep 1
|
|
done
|
|
kubectl get pv 2>/dev/null | grep -E "(Released|Failed)" | awk '{print $1}' | while read pv; do
|
|
if [ -n "$pv" ] && [ "$pv" != "NAME" ]; then
|
|
kubectl delete pv "$pv" --ignore-not-found=true || true
|
|
fi
|
|
done || true
|
|
kubectl get secrets -n default -o name 2>/dev/null | grep "build-credentials-" | while read secret; do
|
|
kubectl delete "$secret" --ignore-not-found=true || true
|
|
done || true
|
|
sleep 3
|
|
docker system prune -f || true
|
|
- name: Run cloud-runner-image test (K8s)
|
|
timeout-minutes: 10
|
|
run: yarn run test "cloud-runner-image" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneWindows64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
KUBE_STORAGE_CLASS: local-path
|
|
PROVIDER_STRATEGY: k8s
|
|
KUBE_VOLUME_SIZE: 2Gi
|
|
containerCpu: '512'
|
|
containerMemory: '512'
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up after cloud-runner-image test
|
|
if: always()
|
|
run: |
|
|
echo "Cleaning up after cloud-runner-image test..."
|
|
kubectl delete jobs --all --ignore-not-found=true -n default || true
|
|
kubectl get pods -n default -o name 2>/dev/null | grep -E "(unity-builder-job-|helper-pod-)" | while read pod; do
|
|
kubectl delete "$pod" --ignore-not-found=true || true
|
|
done || true
|
|
kubectl get pvc -n default -o name 2>/dev/null | grep "unity-builder-pvc-" | while read pvc; do
|
|
kubectl delete "$pvc" --ignore-not-found=true || true
|
|
done || true
|
|
kubectl get secrets -n default -o name 2>/dev/null | grep "build-credentials-" | while read secret; do
|
|
kubectl delete "$secret" --ignore-not-found=true || true
|
|
done || true
|
|
# Aggressive cleanup in k3d nodes, but preserve Unity images
|
|
K3D_NODE_CONTAINERS="${K3D_NODE_CONTAINERS:-k3d-unity-builder-agent-0 k3d-unity-builder-server-0}"
|
|
for NODE in $K3D_NODE_CONTAINERS; do
|
|
# Remove stopped containers
|
|
docker exec "$NODE" sh -c "crictl rm --all 2>/dev/null || true" || true
|
|
# Remove non-Unity images only (preserve unityci/editor images to avoid re-pulling 3.9GB)
|
|
docker exec "$NODE" sh -c "for img in \$(crictl images -q 2>/dev/null); do repo=\$(crictl inspecti \$img --format '{{.repo}}' 2>/dev/null || echo ''); if echo \"\$repo\" | grep -qvE 'unityci/editor|unity'; then crictl rmi \$img 2>/dev/null || true; fi; done" || true
|
|
# Clean up unused layers
|
|
docker exec "$NODE" sh -c "crictl rmi --prune 2>/dev/null || true" || true
|
|
done || true
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -f || true
|
|
- name: Run cloud-runner-kubernetes test
|
|
timeout-minutes: 30
|
|
run: yarn run test "cloud-runner-kubernetes" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneLinux64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
KUBE_STORAGE_CLASS: local-path
|
|
PROVIDER_STRATEGY: k8s
|
|
KUBE_VOLUME_SIZE: 2Gi
|
|
containerCpu: '1000'
|
|
containerMemory: '1024'
|
|
AWS_ACCESS_KEY_ID: test
|
|
AWS_SECRET_ACCESS_KEY: test
|
|
AWS_S3_ENDPOINT: http://localhost:4566
|
|
AWS_ENDPOINT: http://localhost:4566
|
|
INPUT_AWSS3ENDPOINT: http://localhost:4566
|
|
INPUT_AWSENDPOINT: http://localhost:4566
|
|
AWS_S3_FORCE_PATH_STYLE: 'true'
|
|
AWS_EC2_METADATA_DISABLED: 'true'
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up after cloud-runner-kubernetes test
|
|
if: always()
|
|
run: |
|
|
echo "Cleaning up after cloud-runner-kubernetes test..."
|
|
kubectl delete jobs --all --ignore-not-found=true -n default || true
|
|
kubectl get pods -n default -o name 2>/dev/null | grep -E "(unity-builder-job-|helper-pod-)" | while read pod; do
|
|
kubectl delete "$pod" --ignore-not-found=true || true
|
|
done || true
|
|
kubectl get pvc -n default -o name 2>/dev/null | grep "unity-builder-pvc-" | while read pvc; do
|
|
kubectl delete "$pvc" --ignore-not-found=true || true
|
|
done || true
|
|
kubectl get secrets -n default -o name 2>/dev/null | grep "build-credentials-" | while read secret; do
|
|
kubectl delete "$secret" --ignore-not-found=true || true
|
|
done || true
|
|
# Aggressive cleanup in k3d nodes, but preserve Unity images
|
|
K3D_NODE_CONTAINERS="${K3D_NODE_CONTAINERS:-k3d-unity-builder-agent-0 k3d-unity-builder-server-0}"
|
|
for NODE in $K3D_NODE_CONTAINERS; do
|
|
# Remove stopped containers
|
|
docker exec "$NODE" sh -c "crictl rm --all 2>/dev/null || true" || true
|
|
# Remove non-Unity images only (preserve unityci/editor images to avoid re-pulling 3.9GB)
|
|
docker exec "$NODE" sh -c "for img in \$(crictl images -q 2>/dev/null); do repo=\$(crictl inspecti \$img --format '{{.repo}}' 2>/dev/null || echo ''); if echo \"\$repo\" | grep -qvE 'unityci/editor|unity'; then crictl rmi \$img 2>/dev/null || true; fi; done" || true
|
|
# Clean up unused layers
|
|
docker exec "$NODE" sh -c "crictl rmi --prune 2>/dev/null || true" || true
|
|
done || true
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -f || true
|
|
- name: Run cloud-runner-s3-steps test (K8s)
|
|
timeout-minutes: 30
|
|
run: yarn run test "cloud-runner-s3-steps" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneLinux64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
KUBE_STORAGE_CLASS: local-path
|
|
PROVIDER_STRATEGY: k8s
|
|
KUBE_VOLUME_SIZE: 2Gi
|
|
containerCpu: '1000'
|
|
containerMemory: '1024'
|
|
AWS_ACCESS_KEY_ID: test
|
|
AWS_SECRET_ACCESS_KEY: test
|
|
AWS_S3_ENDPOINT: http://localhost:4566
|
|
AWS_ENDPOINT: http://localhost:4566
|
|
INPUT_AWSS3ENDPOINT: http://localhost:4566
|
|
INPUT_AWSENDPOINT: http://localhost:4566
|
|
AWS_S3_FORCE_PATH_STYLE: 'true'
|
|
AWS_EC2_METADATA_DISABLED: 'true'
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up after cloud-runner-s3-steps test
|
|
if: always()
|
|
run: |
|
|
echo "Cleaning up after cloud-runner-s3-steps test..."
|
|
kubectl delete jobs --all --ignore-not-found=true -n default || true
|
|
kubectl get pods -n default -o name 2>/dev/null | grep -E "(unity-builder-job-|helper-pod-)" | while read pod; do
|
|
kubectl delete "$pod" --ignore-not-found=true || true
|
|
done || true
|
|
kubectl get pvc -n default -o name 2>/dev/null | grep "unity-builder-pvc-" | while read pvc; do
|
|
kubectl delete "$pvc" --ignore-not-found=true || true
|
|
done || true
|
|
kubectl get secrets -n default -o name 2>/dev/null | grep "build-credentials-" | while read secret; do
|
|
kubectl delete "$secret" --ignore-not-found=true || true
|
|
done || true
|
|
# Aggressive cleanup in k3d nodes, but preserve Unity images
|
|
K3D_NODE_CONTAINERS="${K3D_NODE_CONTAINERS:-k3d-unity-builder-agent-0 k3d-unity-builder-server-0}"
|
|
for NODE in $K3D_NODE_CONTAINERS; do
|
|
# Remove stopped containers
|
|
docker exec "$NODE" sh -c "crictl rm --all 2>/dev/null || true" || true
|
|
# Remove non-Unity images only (preserve unityci/editor images to avoid re-pulling 3.9GB)
|
|
docker exec "$NODE" sh -c "for img in \$(crictl images -q 2>/dev/null); do repo=\$(crictl inspecti \$img --format '{{.repo}}' 2>/dev/null || echo ''); if echo \"\$repo\" | grep -qvE 'unityci/editor|unity'; then crictl rmi \$img 2>/dev/null || true; fi; done" || true
|
|
# Clean up unused layers
|
|
docker exec "$NODE" sh -c "crictl rmi --prune 2>/dev/null || true" || true
|
|
done || true
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -f || true
|
|
- name: Run cloud-runner-end2end-caching test (K8s)
|
|
timeout-minutes: 60
|
|
run: yarn run test "cloud-runner-end2end-caching" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneLinux64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
KUBE_STORAGE_CLASS: local-path
|
|
PROVIDER_STRATEGY: k8s
|
|
KUBE_VOLUME_SIZE: 2Gi
|
|
containerCpu: '1000'
|
|
containerMemory: '1024'
|
|
AWS_ACCESS_KEY_ID: test
|
|
AWS_SECRET_ACCESS_KEY: test
|
|
AWS_S3_ENDPOINT: http://localhost:4566
|
|
AWS_ENDPOINT: http://localhost:4566
|
|
INPUT_AWSS3ENDPOINT: http://localhost:4566
|
|
INPUT_AWSENDPOINT: http://localhost:4566
|
|
AWS_S3_FORCE_PATH_STYLE: 'true'
|
|
AWS_EC2_METADATA_DISABLED: 'true'
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up after cloud-runner-end2end-caching test
|
|
if: always()
|
|
run: |
|
|
echo "Cleaning up after cloud-runner-end2end-caching test..."
|
|
kubectl delete jobs --all --ignore-not-found=true -n default || true
|
|
kubectl get pods -n default -o name 2>/dev/null | grep -E "(unity-builder-job-|helper-pod-)" | while read pod; do
|
|
kubectl delete "$pod" --ignore-not-found=true || true
|
|
done || true
|
|
kubectl get pvc -n default -o name 2>/dev/null | grep "unity-builder-pvc-" | while read pvc; do
|
|
kubectl delete "$pvc" --ignore-not-found=true || true
|
|
done || true
|
|
kubectl get secrets -n default -o name 2>/dev/null | grep "build-credentials-" | while read secret; do
|
|
kubectl delete "$secret" --ignore-not-found=true || true
|
|
done || true
|
|
# Aggressive cleanup in k3d nodes, but preserve Unity images
|
|
K3D_NODE_CONTAINERS="${K3D_NODE_CONTAINERS:-k3d-unity-builder-agent-0 k3d-unity-builder-server-0}"
|
|
for NODE in $K3D_NODE_CONTAINERS; do
|
|
# Remove stopped containers
|
|
docker exec "$NODE" sh -c "crictl rm --all 2>/dev/null || true" || true
|
|
# Remove non-Unity images only (preserve unityci/editor images to avoid re-pulling 3.9GB)
|
|
docker exec "$NODE" sh -c "for img in \$(crictl images -q 2>/dev/null); do repo=\$(crictl inspecti \$img --format '{{.repo}}' 2>/dev/null || echo ''); if echo \"\$repo\" | grep -qvE 'unityci/editor|unity'; then crictl rmi \$img 2>/dev/null || true; fi; done" || true
|
|
# Clean up unused layers
|
|
docker exec "$NODE" sh -c "crictl rmi --prune 2>/dev/null || true" || true
|
|
done || true
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -f || true
|
|
- name: Clean up disk space before end2end-retaining test
|
|
run: |
|
|
echo "Cleaning up disk space before end2end-retaining test..."
|
|
kubectl delete jobs --all --ignore-not-found=true -n default || true
|
|
kubectl get pods -n default -o name 2>/dev/null | grep -E "(unity-builder-job-|helper-pod-)" | while read pod; do
|
|
kubectl delete "$pod" --ignore-not-found=true || true
|
|
done || true
|
|
# Aggressive cleanup in k3d nodes, but preserve Unity images
|
|
K3D_NODE_CONTAINERS="${K3D_NODE_CONTAINERS:-k3d-unity-builder-agent-0 k3d-unity-builder-server-0}"
|
|
for NODE in $K3D_NODE_CONTAINERS; do
|
|
# Remove stopped containers
|
|
docker exec "$NODE" sh -c "crictl rm --all 2>/dev/null || true" || true
|
|
# Remove non-Unity images only (preserve unityci/editor images to avoid re-pulling 3.9GB)
|
|
docker exec "$NODE" sh -c "for img in \$(crictl images -q 2>/dev/null); do repo=\$(crictl inspecti \$img --format '{{.repo}}' 2>/dev/null || echo ''); if echo \"\$repo\" | grep -qvE 'unityci/editor|unity'; then crictl rmi \$img 2>/dev/null || true; fi; done" || true
|
|
# Clean up unused layers
|
|
docker exec "$NODE" sh -c "crictl rmi --prune 2>/dev/null || true" || true
|
|
done || true
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -f || true
|
|
echo "Disk usage before end2end-retaining test:"
|
|
df -h
|
|
- name: Run cloud-runner-end2end-retaining test (K8s)
|
|
timeout-minutes: 60
|
|
run: yarn run test "cloud-runner-end2end-retaining" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneWindows64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
KUBE_STORAGE_CLASS: local-path
|
|
PROVIDER_STRATEGY: k8s
|
|
KUBE_VOLUME_SIZE: 2Gi
|
|
containerCpu: '512'
|
|
containerMemory: '512'
|
|
AWS_ACCESS_KEY_ID: test
|
|
AWS_SECRET_ACCESS_KEY: test
|
|
AWS_S3_ENDPOINT: http://localhost:4566
|
|
AWS_ENDPOINT: http://localhost:4566
|
|
INPUT_AWSS3ENDPOINT: http://localhost:4566
|
|
INPUT_AWSENDPOINT: http://localhost:4566
|
|
AWS_S3_FORCE_PATH_STYLE: 'true'
|
|
AWS_EC2_METADATA_DISABLED: 'true'
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up K8s resources and disk space
|
|
run: |
|
|
echo "Cleaning up K8s resources after K8s tests..."
|
|
kubectl delete jobs --all --ignore-not-found=true -n default || true
|
|
kubectl get pods -n default -o name 2>/dev/null | grep -E "(unity-builder-job-|helper-pod-)" | while read pod; do
|
|
kubectl delete "$pod" --ignore-not-found=true || true
|
|
done || true
|
|
kubectl get pvc -n default -o name 2>/dev/null | grep "unity-builder-pvc-" | while read pvc; do
|
|
kubectl delete "$pvc" --ignore-not-found=true || true
|
|
done || true
|
|
for i in {1..30}; do
|
|
PVC_COUNT=$(kubectl get pvc -n default 2>/dev/null | grep "unity-builder-pvc-" | wc -l || echo "0")
|
|
if [ "$PVC_COUNT" -eq 0 ]; then
|
|
echo "All PVCs deleted"
|
|
break
|
|
fi
|
|
sleep 1
|
|
done
|
|
kubectl get pv 2>/dev/null | grep -E "(Released|Failed)" | awk '{print $1}' | while read pv; do
|
|
if [ -n "$pv" ] && [ "$pv" != "NAME" ]; then
|
|
kubectl delete pv "$pv" --ignore-not-found=true || true
|
|
fi
|
|
done || true
|
|
kubectl get secrets -n default -o name 2>/dev/null | grep "build-credentials-" | while read secret; do
|
|
kubectl delete "$secret" --ignore-not-found=true || true
|
|
done || true
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -af --volumes || true
|
|
# Aggressive cleanup in k3d nodes to free ephemeral storage, but preserve Unity images
|
|
K3D_NODE_CONTAINERS="${K3D_NODE_CONTAINERS:-k3d-unity-builder-agent-0 k3d-unity-builder-server-0}"
|
|
for NODE in $K3D_NODE_CONTAINERS; do
|
|
echo "Cleaning up $NODE (preserving Unity images)..."
|
|
# Remove all stopped containers
|
|
docker exec "$NODE" sh -c "crictl rm --all 2>/dev/null || true" || true
|
|
# Remove non-Unity images only (preserve unityci/editor images to avoid re-pulling 3.9GB)
|
|
docker exec "$NODE" sh -c "for img in \$(crictl images -q 2>/dev/null); do repo=\$(crictl inspecti \$img --format '{{.repo}}' 2>/dev/null || echo ''); if echo \"\$repo\" | grep -qvE 'unityci/editor|unity'; then crictl rmi \$img 2>/dev/null || true; fi; done" || true
|
|
# Clean up unused layers (prune should preserve referenced images)
|
|
docker exec "$NODE" sh -c "crictl rmi --prune 2>/dev/null || true" || true
|
|
# Check disk space
|
|
docker exec "$NODE" sh -c "df -h /var/lib/rancher/k3s 2>/dev/null || df -h / 2>/dev/null || true" || true
|
|
done
|
|
echo "Disk usage after K8s cleanup:"
|
|
df -h
|
|
- name: Delete k3d cluster
|
|
run: |
|
|
echo "Deleting k3d cluster to free disk space..."
|
|
k3d cluster delete unity-builder || true
|
|
docker system prune -af --volumes || true
|
|
echo "Disk usage after k3d deletion:"
|
|
df -h
|
|
|
|
# ==========================================
|
|
# AWS/LOCALSTACK PROVIDER TESTS SECTION
|
|
# ==========================================
|
|
- name: Clean up disk space before AWS/LocalStack provider tests
|
|
run: |
|
|
echo "Cleaning up disk space before AWS/LocalStack provider tests..."
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
sudo apt-get clean || true
|
|
docker system prune -af --volumes || true
|
|
echo "Disk usage:"
|
|
df -h
|
|
- name: Run cloud-runner-image test (AWS provider)
|
|
timeout-minutes: 10
|
|
run: yarn run test "cloud-runner-image" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneWindows64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
KUBE_STORAGE_CLASS: local-path
|
|
PROVIDER_STRATEGY: aws
|
|
AWS_ACCESS_KEY_ID: test
|
|
AWS_SECRET_ACCESS_KEY: test
|
|
AWS_ENDPOINT: http://localhost:4566
|
|
AWS_ENDPOINT_URL: http://localhost:4566
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up disk space
|
|
run: |
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -f || true
|
|
df -h
|
|
- name: Run cloud-runner-environment test (AWS provider)
|
|
timeout-minutes: 30
|
|
run: yarn run test "cloud-runner-environment" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneWindows64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
KUBE_STORAGE_CLASS: local-path
|
|
PROVIDER_STRATEGY: aws
|
|
AWS_ACCESS_KEY_ID: test
|
|
AWS_SECRET_ACCESS_KEY: test
|
|
AWS_ENDPOINT: http://localhost:4566
|
|
AWS_ENDPOINT_URL: http://localhost:4566
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up disk space
|
|
run: |
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -f || true
|
|
df -h
|
|
- name: Run cloud-runner-s3-steps test (AWS provider)
|
|
timeout-minutes: 30
|
|
run: yarn run test "cloud-runner-s3-steps" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneWindows64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
KUBE_STORAGE_CLASS: local-path
|
|
PROVIDER_STRATEGY: aws
|
|
AWS_ACCESS_KEY_ID: test
|
|
AWS_SECRET_ACCESS_KEY: test
|
|
AWS_ENDPOINT: http://localhost:4566
|
|
AWS_ENDPOINT_URL: http://localhost:4566
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up disk space
|
|
run: |
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -f || true
|
|
df -h
|
|
- name: Run cloud-runner-hooks test (AWS provider)
|
|
timeout-minutes: 30
|
|
run: yarn run test "cloud-runner-hooks" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneWindows64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
KUBE_STORAGE_CLASS: local-path
|
|
PROVIDER_STRATEGY: aws
|
|
AWS_ACCESS_KEY_ID: test
|
|
AWS_SECRET_ACCESS_KEY: test
|
|
AWS_ENDPOINT: http://localhost:4566
|
|
AWS_ENDPOINT_URL: http://localhost:4566
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up disk space
|
|
run: |
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -f || true
|
|
df -h
|
|
- name: Run cloud-runner-end2end-caching test (AWS provider)
|
|
timeout-minutes: 60
|
|
run: yarn run test "cloud-runner-end2end-caching" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneWindows64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
KUBE_STORAGE_CLASS: local-path
|
|
PROVIDER_STRATEGY: aws
|
|
AWS_ACCESS_KEY_ID: test
|
|
AWS_SECRET_ACCESS_KEY: test
|
|
AWS_ENDPOINT: http://localhost:4566
|
|
AWS_ENDPOINT_URL: http://localhost:4566
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up disk space
|
|
run: |
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -f || true
|
|
df -h
|
|
- name: Run cloud-runner-end2end-retaining test (AWS provider)
|
|
timeout-minutes: 60
|
|
run: yarn run test "cloud-runner-end2end-retaining" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneWindows64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
KUBE_STORAGE_CLASS: local-path
|
|
PROVIDER_STRATEGY: aws
|
|
AWS_ACCESS_KEY_ID: test
|
|
AWS_SECRET_ACCESS_KEY: test
|
|
AWS_ENDPOINT: http://localhost:4566
|
|
AWS_ENDPOINT_URL: http://localhost:4566
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up disk space
|
|
run: |
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -f || true
|
|
df -h
|
|
- name: Run cloud-runner-caching test (AWS provider)
|
|
timeout-minutes: 60
|
|
run: yarn run test "cloud-runner-caching" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneWindows64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
KUBE_STORAGE_CLASS: local-path
|
|
PROVIDER_STRATEGY: aws
|
|
AWS_ACCESS_KEY_ID: test
|
|
AWS_SECRET_ACCESS_KEY: test
|
|
AWS_ENDPOINT: http://localhost:4566
|
|
AWS_ENDPOINT_URL: http://localhost:4566
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up disk space
|
|
run: |
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -f || true
|
|
df -h
|
|
- name: Run cloud-runner-locking-core test (AWS provider)
|
|
timeout-minutes: 60
|
|
run: yarn run test "cloud-runner-locking-core" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneWindows64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
KUBE_STORAGE_CLASS: local-path
|
|
PROVIDER_STRATEGY: aws
|
|
AWS_ACCESS_KEY_ID: test
|
|
AWS_SECRET_ACCESS_KEY: test
|
|
AWS_ENDPOINT: http://localhost:4566
|
|
AWS_ENDPOINT_URL: http://localhost:4566
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up disk space
|
|
run: |
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -f || true
|
|
df -h
|
|
- name: Run cloud-runner-locking-get-locked test (AWS provider)
|
|
timeout-minutes: 60
|
|
run: yarn run test "cloud-runner-locking-get-locked" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneWindows64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
KUBE_STORAGE_CLASS: local-path
|
|
PROVIDER_STRATEGY: aws
|
|
AWS_ACCESS_KEY_ID: test
|
|
AWS_SECRET_ACCESS_KEY: test
|
|
AWS_ENDPOINT: http://localhost:4566
|
|
AWS_ENDPOINT_URL: http://localhost:4566
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up disk space
|
|
run: |
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -f || true
|
|
df -h
|
|
- name: Run cloud-runner-end2end-locking test (AWS provider)
|
|
timeout-minutes: 60
|
|
run: yarn run test "cloud-runner-end2end-locking" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneWindows64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
KUBE_STORAGE_CLASS: local-path
|
|
PROVIDER_STRATEGY: aws
|
|
AWS_ACCESS_KEY_ID: test
|
|
AWS_SECRET_ACCESS_KEY: test
|
|
AWS_ENDPOINT: http://localhost:4566
|
|
AWS_ENDPOINT_URL: http://localhost:4566
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up disk space after AWS/LocalStack provider tests
|
|
run: |
|
|
echo "Cleaning up disk space after AWS/LocalStack provider tests..."
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -af --volumes || true
|
|
echo "Disk usage:"
|
|
df -h
|
|
|
|
# ==========================================
|
|
# RCLONE TESTS SECTION (using LocalStack S3 as backend)
|
|
# ==========================================
|
|
- name: Install and configure rclone with LocalStack S3
|
|
run: |
|
|
echo "Installing rclone..."
|
|
curl https://rclone.org/install.sh | sudo bash
|
|
rclone version
|
|
|
|
echo "Configuring rclone to use LocalStack S3..."
|
|
mkdir -p ~/.config/rclone
|
|
cat > ~/.config/rclone/rclone.conf << 'EOF'
|
|
[localstack-s3]
|
|
type = s3
|
|
provider = Other
|
|
env_auth = false
|
|
access_key_id = test
|
|
secret_access_key = test
|
|
endpoint = http://localhost:4566
|
|
acl = private
|
|
force_path_style = true
|
|
EOF
|
|
|
|
echo "Testing rclone configuration..."
|
|
rclone lsd localstack-s3: || echo "No buckets yet (expected)"
|
|
rclone ls localstack-s3:game-ci-team-pipelines || echo "Bucket may be empty"
|
|
echo "Rclone configured successfully"
|
|
- name: Run cloud-runner-rclone-steps test (rclone with LocalStack S3)
|
|
timeout-minutes: 30
|
|
run: yarn run test "cloud-runner-rclone-steps" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneLinux64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
PROVIDER_STRATEGY: local-docker
|
|
RCLONE_REMOTE: 'localstack-s3:game-ci-team-pipelines'
|
|
rcloneRemote: 'localstack-s3:game-ci-team-pipelines'
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up disk space after rclone tests
|
|
run: |
|
|
echo "Cleaning up disk space after rclone tests..."
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -f || true
|
|
echo "Disk usage:"
|
|
df -h
|
|
|
|
# ==========================================
|
|
# LOCAL DOCKER TESTS SECTION
|
|
# ==========================================
|
|
- name: Clean up disk space before local-docker tests
|
|
run: |
|
|
echo "Cleaning up disk space before local-docker tests..."
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
sudo apt-get clean || true
|
|
docker system prune -af --volumes || true
|
|
echo "Disk usage:"
|
|
df -h
|
|
- name: Run cloud-runner-image test (local-docker)
|
|
timeout-minutes: 10
|
|
run: yarn run test "cloud-runner-image" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneWindows64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
PROVIDER_STRATEGY: local-docker
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up disk space
|
|
run: |
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -f || true
|
|
df -h
|
|
- name: Run cloud-runner-hooks test (local-docker)
|
|
timeout-minutes: 30
|
|
run: yarn run test "cloud-runner-hooks" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneWindows64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
PROVIDER_STRATEGY: local-docker
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up disk space
|
|
run: |
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -f || true
|
|
df -h
|
|
- name: Run cloud-runner-local-persistence test
|
|
timeout-minutes: 30
|
|
run: yarn run test "cloud-runner-local-persistence" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneWindows64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
PROVIDER_STRATEGY: local-docker
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up disk space
|
|
run: |
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -f || true
|
|
df -h
|
|
- name: Run cloud-runner-locking-core test (local-docker with S3)
|
|
timeout-minutes: 30
|
|
run: yarn run test "cloud-runner-locking-core" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneWindows64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
PROVIDER_STRATEGY: local-docker
|
|
AWS_STACK_NAME: game-ci-team-pipelines
|
|
AWS_ACCESS_KEY_ID: test
|
|
AWS_SECRET_ACCESS_KEY: test
|
|
AWS_ENDPOINT: http://localhost:4566
|
|
AWS_ENDPOINT_URL: http://localhost:4566
|
|
AWS_S3_ENDPOINT: http://localhost:4566
|
|
INPUT_AWSS3ENDPOINT: http://localhost:4566
|
|
INPUT_AWSENDPOINT: http://localhost:4566
|
|
AWS_S3_FORCE_PATH_STYLE: 'true'
|
|
AWS_EC2_METADATA_DISABLED: 'true'
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up disk space
|
|
run: |
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -f || true
|
|
df -h
|
|
- name: Run cloud-runner-locking-get-locked test (local-docker with S3)
|
|
timeout-minutes: 30
|
|
run: yarn run test "cloud-runner-locking-get-locked" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneWindows64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
PROVIDER_STRATEGY: local-docker
|
|
AWS_STACK_NAME: game-ci-team-pipelines
|
|
AWS_ACCESS_KEY_ID: test
|
|
AWS_SECRET_ACCESS_KEY: test
|
|
AWS_ENDPOINT: http://localhost:4566
|
|
AWS_ENDPOINT_URL: http://localhost:4566
|
|
AWS_S3_ENDPOINT: http://localhost:4566
|
|
INPUT_AWSS3ENDPOINT: http://localhost:4566
|
|
INPUT_AWSENDPOINT: http://localhost:4566
|
|
AWS_S3_FORCE_PATH_STYLE: 'true'
|
|
AWS_EC2_METADATA_DISABLED: 'true'
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up disk space
|
|
run: |
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -f || true
|
|
df -h
|
|
- name: Run cloud-runner-caching test (local-docker)
|
|
timeout-minutes: 30
|
|
run: yarn run test "cloud-runner-caching" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneWindows64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
PROVIDER_STRATEGY: local-docker
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up disk space
|
|
run: |
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -f || true
|
|
df -h
|
|
- name: Run cloud-runner-github-checks test (local-docker)
|
|
timeout-minutes: 30
|
|
run: yarn run test "cloud-runner-github-checks" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneWindows64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
PROVIDER_STRATEGY: local-docker
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up disk space
|
|
run: |
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -f || true
|
|
df -h
|
|
- name: Run cloud-runner-s3-steps test (local-docker with S3)
|
|
timeout-minutes: 30
|
|
run: yarn run test "cloud-runner-s3-steps" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneLinux64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
PROVIDER_STRATEGY: local-docker
|
|
AWS_STACK_NAME: game-ci-team-pipelines
|
|
AWS_ACCESS_KEY_ID: test
|
|
AWS_SECRET_ACCESS_KEY: test
|
|
AWS_ENDPOINT: http://localhost:4566
|
|
AWS_ENDPOINT_URL: http://localhost:4566
|
|
AWS_S3_ENDPOINT: http://localhost:4566
|
|
INPUT_AWSS3ENDPOINT: http://localhost:4566
|
|
INPUT_AWSENDPOINT: http://localhost:4566
|
|
AWS_S3_FORCE_PATH_STYLE: 'true'
|
|
AWS_EC2_METADATA_DISABLED: 'true'
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Clean up disk space
|
|
run: |
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker system prune -f || true
|
|
df -h
|
|
- name: Run cloud-runner-end2end-caching test (local-docker with S3)
|
|
timeout-minutes: 60
|
|
run: yarn run test "cloud-runner-end2end-caching" --detectOpenHandles --forceExit --runInBand
|
|
env:
|
|
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
|
|
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
|
|
UNITY_SERIAL: ${{ secrets.UNITY_SERIAL }}
|
|
PROJECT_PATH: test-project
|
|
TARGET_PLATFORM: StandaloneLinux64
|
|
cloudRunnerTests: true
|
|
versioning: None
|
|
PROVIDER_STRATEGY: local-docker
|
|
AWS_STACK_NAME: game-ci-team-pipelines
|
|
AWS_ACCESS_KEY_ID: test
|
|
AWS_SECRET_ACCESS_KEY: test
|
|
AWS_ENDPOINT: http://localhost:4566
|
|
AWS_ENDPOINT_URL: http://localhost:4566
|
|
AWS_S3_ENDPOINT: http://localhost:4566
|
|
INPUT_AWSS3ENDPOINT: http://localhost:4566
|
|
INPUT_AWSENDPOINT: http://localhost:4566
|
|
AWS_S3_FORCE_PATH_STYLE: 'true'
|
|
AWS_EC2_METADATA_DISABLED: 'true'
|
|
GIT_PRIVATE_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.GIT_PRIVATE_TOKEN }}
|
|
- name: Final disk space cleanup
|
|
run: |
|
|
echo "Final disk space cleanup..."
|
|
rm -rf ./cloud-runner-cache/* || true
|
|
docker stop localstack-main 2>/dev/null || true
|
|
docker rm localstack-main 2>/dev/null || true
|
|
docker system prune -af --volumes || true
|
|
echo "Final disk usage:"
|
|
df -h
|