diff --git a/.github/workflows/build-tests.yml b/.github/workflows/build-tests.yml
index 239f2b0f2..1d40d1ab9 100644
--- a/.github/workflows/build-tests.yml
+++ b/.github/workflows/build-tests.yml
@@ -7,7 +7,30 @@ on:
- '.github/**'
env:
- UNITY_LICENSE: "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \nm0Db8UK+ktnOLJBtHybkfetpcKo=o/pUbSQAukz7+ZYAWhnA0AJbIlyyCPL7bKVEM2lVqbrXt7cyey+umkCXamuOgsWPVUKBMkXtMH8L\n5etLmD0getWIhTGhzOnDCk+gtIPfL4jMo9tkEuOCROQAXCci23VFscKcrkB+3X6h4wEOtA2APhOY\nB+wvC794o8/82ffjP79aVAi57rp3Wmzx+9pe9yMwoJuljAy2sc2tIMgdQGWVmOGBpQm3JqsidyzI\nJWG2kjnc7pDXK9pwYzXoKiqUqqrut90d+kQqRyv7MSZXR50HFqD/LI69h68b7P8Bjo3bPXOhNXGR\n9YCoemH6EkfCJxp2gIjzjWW+l2Hj2EsFQi8YXw=="
+ UNITY_LICENSE:
+ "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \nm0Db8UK+ktnOLJBtHybkfetpcKo=o/pUbSQAukz7+ZYAWhnA0AJbIlyyCPL7bKVEM2lVqbrXt7cyey+umkCXamuOgsWPVUKBMkXtMH8L\n5etLmD0getWIhTGhzOnDCk+gtIPfL4jMo9tkEuOCROQAXCci23VFscKcrkB+3X6h4wEOtA2APhOY\nB+wvC794o8/82ffjP79aVAi57rp3Wmzx+9pe9yMwoJuljAy2sc2tIMgdQGWVmOGBpQm3JqsidyzI\nJWG2kjnc7pDXK9pwYzXoKiqUqqrut90d+kQqRyv7MSZXR50HFqD/LI69h68b7P8Bjo3bPXOhNXGR\n9YCoemH6EkfCJxp2gIjzjWW+l2Hj2EsFQi8YXw=="
jobs:
buildForAllPlatformsUbuntu:
@@ -16,6 +39,9 @@ jobs:
strategy:
fail-fast: false
matrix:
+ cloudRunnerCluster:
+ # - local-docker
+ - local
projectPath:
- test-project
unityVersion:
@@ -62,6 +88,7 @@ jobs:
unityVersion: ${{ matrix.unityVersion }}
targetPlatform: ${{ matrix.targetPlatform }}
customParameters: -profile SomeProfile -someBoolean -someValue exampleValue
+ cloudRunnerCluster: ${{ matrix.cloudRunnerCluster }}
###########################
# Upload #
diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml
index 10a5cfeab..6568e0572 100644
--- a/.github/workflows/cleanup.yml
+++ b/.github/workflows/cleanup.yml
@@ -29,7 +29,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: eu-west-2
- - run: yarn run cli -m aws-list-all
+ - run: yarn run cli -m list-resources
env:
AWS_REGION: eu-west-2
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
diff --git a/.github/workflows/cloud-runner-local-pipeline.yml b/.github/workflows/cloud-runner-local-pipeline.yml
new file mode 100644
index 000000000..84c4ac08a
--- /dev/null
+++ b/.github/workflows/cloud-runner-local-pipeline.yml
@@ -0,0 +1,96 @@
+name: Cloud Runner Local
+
+on:
+ push: { branches: ['!cloud-runner-develop', '!cloud-runner-preview', '!main'] }
+# push: { branches: [main] }
+# pull_request:
+# paths-ignore:
+# - '.github/**'
+
+jobs:
+ integrationTests:
+ name: Integration Tests
+ if: github.event.event_type != 'pull_request_target'
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ cloudRunnerCluster:
+ - local-docker
+ targetPlatform:
+ - StandaloneWindows64 # Build a Windows 64-bit standalone.
+ # steps
+ steps:
+ - name: Checkout (default)
+ uses: actions/checkout@v2
+ with:
+ lfs: true
+ - run: yarn
+ - run: yarn run cli --help
+ - run: yarn run test-i --detectOpenHandles --forceExit --runInBand
+ env:
+ UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
+ PROJECT_PATH: ${{ matrix.projectPath }}
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ TARGET_PLATFORM: ${{ matrix.targetPlatform }}
+ cloudRunnerTests: true
+ versioning: None
+ CLOUD_RUNNER_CLUSTER: ${{ matrix.cloudRunnerCluster }}
+ buildTests:
+ name: Build Tests
+ if: github.event.event_type != 'pull_request_target'
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ cloudRunnerCluster:
+ - local-docker
+ targetPlatform:
+ - StandaloneOSX # Build a macOS standalone (Intel 64-bit).
+ - StandaloneWindows64 # Build a Windows 64-bit standalone.
+ - StandaloneLinux64 # Build a Linux 64-bit standalone.
+ - WebGL # WebGL.
+ - iOS # Build an iOS player.
+ - Android # Build an Android .apk.
+ # - StandaloneWindows # Build a Windows standalone.
+ # - WSAPlayer # Build an Windows Store Apps player.
+ # - PS4 # Build a PS4 Standalone.
+ # - XboxOne # Build a Xbox One Standalone.
+ # - tvOS # Build to Apple's tvOS platform.
+ # - Switch # Build a Nintendo Switch player
+ # steps
+ steps:
+ - name: Checkout (default)
+ uses: actions/checkout@v2
+ with:
+ lfs: true
+ - uses: ./
+ id: unity-build
+ timeout-minutes: 25
+ env:
+ CLOUD_RUNNER_BRANCH: ${{ github.ref }}
+ CLOUD_RUNNER_DEBUG: true
+ CLOUD_RUNNER_DEBUG_TREE: true
+ DEBUG: true
+ PROJECT_PATH: test-project
+ UNITY_VERSION: 2019.3.15f1
+ USE_IL2CPP: false
+ with:
+ cloudRunnerTests: true
+ versioning: None
+ projectPath: ${{ matrix.projectPath }}
+ gitPrivateToken: ${{ secrets.GITHUB_TOKEN }}
+ targetPlatform: ${{ matrix.targetPlatform }}
+ cloudRunnerCluster: ${{ matrix.cloudRunnerCluster }}
+ - run: |
+ mv ./cloud-runner-cache/${{ steps.unity-build.outputs.CACHE_KEY }}/build/build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4 build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4
+ ls
+ - run: yarn run cli -m list-resources
+ ###########################
+ # Upload #
+ ###########################
+ - uses: actions/upload-artifact@v2
+ with:
+ name: AWS Build (${{ matrix.targetPlatform }})
+ path: build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4
+ retention-days: 14
diff --git a/.github/workflows/cloud-runner-pipeline.yml b/.github/workflows/cloud-runner-pipeline.yml
index 1b7c22933..70a8a8f03 100644
--- a/.github/workflows/cloud-runner-pipeline.yml
+++ b/.github/workflows/cloud-runner-pipeline.yml
@@ -1,11 +1,7 @@
-name: Cloud Runner
+name: Cloud Runner CI Pipeline
on:
- push: { branches: [cloud-runner-develop, main] }
-# push: { branches: [main] }
-# pull_request:
-# paths-ignore:
-# - '.github/**'
+ push: { branches: [cloud-runner-develop, cloud-runner-preview] }
env:
GKE_ZONE: 'us-central1'
@@ -21,43 +17,38 @@ env:
AWS_DEFAULT_REGION: eu-west-2
AWS_BASE_STACK_NAME: game-ci-github-pipelines
CLOUD_RUNNER_BRANCH: ${{ github.ref }}
- CLOUD_RUNNER_TESTS: true
+ CLOUD_RUNNER_DEBUG: true
+ CLOUD_RUNNER_DEBUG_TREE: true
DEBUG: true
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
+ PROJECT_PATH: test-project
+ UNITY_VERSION: 2019.3.15f1
+ USE_IL2CPP: false
jobs:
- awsBuild:
- name: AWS Fargate Build
- if: github.event.pull_request.draft == false
+ integrationTests:
+ name: Integration Tests
+ if: github.event.event_type != 'pull_request_target'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
- projectPath:
- - test-project
- unityVersion:
- # - 2019.2.11f1
- - 2019.3.15f1
- targetPlatform:
- #- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
- - StandaloneWindows64 # Build a Windows 64-bit standalone.
- - StandaloneLinux64 # Build a Linux 64-bit standalone.
- - WebGL # WebGL.
- #- iOS # Build an iOS player.
- #- Android # Build an Android .apk.
- # - StandaloneWindows # Build a Windows standalone.
- # - WSAPlayer # Build an Windows Store Apps player.
- # - PS4 # Build a PS4 Standalone.
- # - XboxOne # Build a Xbox One Standalone.
- # - tvOS # Build to Apple's tvOS platform.
- # - Switch # Build a Nintendo Switch player
- # steps
+ cloudRunnerCluster:
+ - aws
+ - local-docker
+ - k8s
steps:
- name: Checkout (default)
uses: actions/checkout@v2
- if: github.event.event_type != 'pull_request_target'
with:
lfs: true
+ - uses: google-github-actions/setup-gcloud@v0
+ with:
+ version: '288.0.0'
+ service_account_email: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_EMAIL }}
+ service_account_key: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }}
+ - name: Get GKE cluster credentials
+ run: gcloud container clusters get-credentials $GKE_CLUSTER --zone $GKE_ZONE --project $GKE_PROJECT
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
@@ -66,81 +57,117 @@ jobs:
aws-region: eu-west-2
- run: yarn
- run: yarn run cli --help
- - run: yarn run test "caching"
- - run: yarn run test-i-aws
+ - run: yarn run test "cloud-runner-run-twice-retaining" --detectOpenHandles --forceExit --runInBand
+ if: matrix.CloudRunnerCluster == 'aws' || matrix.CloudRunnerCluster == 'k8s'
+ timeout-minutes: 180
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
- PROJECT_PATH: ${{ matrix.projectPath }}
+ PROJECT_PATH: test-project
+ GIT_PRIVATE_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ TARGET_PLATFORM: StandaloneWindows64
+ cloudRunnerTests: true
+ versioning: None
+ CLOUD_RUNNER_CLUSTER: ${{ matrix.cloudRunnerCluster }}
+ - run: yarn run test-i --detectOpenHandles --forceExit --runInBand
+ if: matrix.CloudRunnerCluster == 'local-docker'
+ timeout-minutes: 180
+ env:
+ UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
+ PROJECT_PATH: test-project
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- TARGET_PLATFORM: ${{ matrix.targetPlatform }}
+ TARGET_PLATFORM: StandaloneWindows64
cloudRunnerTests: true
versioning: None
+ CLOUD_RUNNER_CLUSTER: ${{ matrix.cloudRunnerCluster }}
+
+ buildTargetTests:
+ name: Build Tests - Targets
+ if: github.event.event_type != 'pull_request_target'
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ cloudRunnerCluster:
+ #- aws
+ - local-docker
+ #- k8s
+ targetPlatform:
+ - StandaloneOSX # Build a macOS standalone (Intel 64-bit).
+ # - StandaloneWindows64 # Build a Windows 64-bit standalone.
+ - StandaloneLinux64 # Build a Linux 64-bit standalone.
+ - WebGL # WebGL.
+ - iOS # Build an iOS player.
+ - Android # Build an Android .apk.
+ steps:
+ - name: Checkout (default)
+ uses: actions/checkout@v2
+ with:
+ lfs: true
+
+ - uses: google-github-actions/setup-gcloud@v0
+ with:
+ version: '288.0.0'
+ service_account_email: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_EMAIL }}
+ service_account_key: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_KEY }}
+ - name: Get GKE cluster credentials
+ run: gcloud container clusters get-credentials $GKE_CLUSTER --zone $GKE_ZONE --project $GKE_PROJECT
+ - name: Configure AWS Credentials
+ uses: aws-actions/configure-aws-credentials@v1
+ with:
+ aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
+ aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
+ aws-region: eu-west-2
+ - run: yarn
- uses: ./
- id: aws-fargate-unity-build
- timeout-minutes: 25
+ id: unity-build
+ timeout-minutes: 90
+ env:
+ UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
with:
- cloudRunnerCluster: aws
+ cloudRunnerTests: true
versioning: None
- projectPath: ${{ matrix.projectPath }}
- unityVersion: ${{ matrix.unityVersion }}
+ projectPath: test-project
+ gitPrivateToken: ${{ secrets.GITHUB_TOKEN }}
targetPlatform: ${{ matrix.targetPlatform }}
- githubToken: ${{ secrets.GITHUB_TOKEN }}
- postBuildSteps: |
- - name: upload
- image: amazon/aws-cli
- commands: |
- aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID --profile default
- aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY --profile default
- aws configure set region $AWS_DEFAULT_REGION --profile default
- aws s3 ls
- aws s3 ls game-ci-test-storage
- ls /data/cache/$CACHE_KEY
- ls /data/cache/$CACHE_KEY/build
- aws s3 cp /data/cache/$CACHE_KEY/build/build-$BUILD_GUID.tar s3://game-ci-test-storage/$CACHE_KEY/build-$BUILD_GUID.tar
- secrets:
- - name: awsAccessKeyId
- value: ${{ secrets.AWS_ACCESS_KEY_ID }}
- - name: awsSecretAccessKey
- value: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- - name: awsDefaultRegion
- value: eu-west-2
+ cloudRunnerCluster: ${{ matrix.cloudRunnerCluster }}
+ customStepFiles: aws-s3-upload-build,aws-s3-pull-cache,aws-s3-upload-cache
- run: |
- aws s3 cp s3://game-ci-test-storage/${{ steps.aws-fargate-unity-build.outputs.CACHE_KEY }}/build-${{ steps.aws-fargate-unity-build.outputs.BUILD_GUID }}.tar build-${{ steps.aws-fargate-unity-build.outputs.BUILD_GUID }}.tar
+ aws s3 cp s3://game-ci-test-storage/cloud-runner-cache/${{ steps.unity-build.outputs.CACHE_KEY }}/build/build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4 build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4
ls
- - run: yarn run cli -m aws-garbage-collect
- ###########################
- # Upload #
- ###########################
- # download from cloud storage
+ - run: yarn run cli -m list-resources
+ env:
+ cloudRunnerTests: true
+ CLOUD_RUNNER_CLUSTER: ${{ matrix.cloudRunnerCluster }}
- uses: actions/upload-artifact@v2
with:
- name: AWS Build (${{ matrix.targetPlatform }})
- path: build-${{ steps.aws-fargate-unity-build.outputs.BUILD_GUID }}.tar
+ name: ${{ matrix.cloudRunnerCluster }} Build (${{ matrix.targetPlatform }})
+ path: build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4
retention-days: 14
- k8sBuilds:
- name: K8s (GKE Autopilot) build for ${{ matrix.targetPlatform }} on version ${{ matrix.unityVersion }}
+ buildTests:
+ name: Build Tests - Providers
+ if: github.event.event_type != 'pull_request_target'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
- unityVersion:
- # - 2019.2.11f1
- - 2019.3.15f1
+ cloudRunnerCluster:
+ - aws
+ - local-docker
+ - k8s
targetPlatform:
- # - StandaloneWindows64
- - StandaloneLinux64
+ #- StandaloneOSX # Build a macOS standalone (Intel 64-bit).
+ - StandaloneWindows64 # Build a Windows 64-bit standalone.
+ #- StandaloneLinux64 # Build a Linux 64-bit standalone.
+ #- WebGL # WebGL.
+ #- iOS # Build an iOS player.
+ #- Android # Build an Android .apk.
+ # steps
steps:
- ###########################
- # Checkout #
- ###########################
- - uses: actions/checkout@v2
- if: github.event.event_type != 'pull_request_target'
+ - name: Checkout (default)
+ uses: actions/checkout@v2
with:
lfs: true
- ###########################
- # Setup #
- ###########################
- uses: google-github-actions/setup-gcloud@v0
with:
version: '288.0.0'
@@ -149,70 +176,36 @@ jobs:
- name: Get GKE cluster credentials
run: gcloud container clusters get-credentials $GKE_CLUSTER --zone $GKE_ZONE --project $GKE_PROJECT
- ###########################
- # Cloud Runner Test Suite #
- ###########################
- - uses: actions/setup-node@v2
+ - name: Configure AWS Credentials
+ uses: aws-actions/configure-aws-credentials@v1
with:
- node-version: 12.x
+ aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
+ aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
+ aws-region: eu-west-2
- run: yarn
- - run: yarn run cli --help
- - run: yarn run test "caching"
- - name: Cloud Runner Test Suite
- run: yarn run test-i-k8s --detectOpenHandles --forceExit
+ - uses: ./
+ id: unity-build
+ timeout-minutes: 90
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
- PROJECT_PATH: ${{ matrix.projectPath }}
- TARGET_PLATFORM: ${{ matrix.targetPlatform }}
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- KUBE_CONFIG: ${{ steps.read-base64.outputs.base64 }}
- unityVersion: ${{ matrix.unityVersion }}
+ with:
cloudRunnerTests: true
versioning: None
-
- ###########################
- # Cloud Runner Build Test #
- ###########################
- - name: Cloud Runner Build Test
- uses: ./
- id: k8s-unity-build
- timeout-minutes: 30
- with:
- cloudRunnerCluster: k8s
- UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
- targetPlatform: ${{ matrix.targetPlatform }}
- kubeConfig: ${{ steps.read-base64.outputs.base64 }}
- githubToken: ${{ secrets.GITHUB_TOKEN }}
projectPath: test-project
- unityVersion: ${{ matrix.unityVersion }}
- versioning: None
- postBuildSteps: |
- - name: upload
- image: amazon/aws-cli
- commands: |
- aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID --profile default
- aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY --profile default
- aws configure set region $AWS_DEFAULT_REGION --profile default
- aws s3 ls
- aws s3 ls game-ci-test-storage
- ls /data/cache/$CACHE_KEY
- aws s3 cp /data/cache/$CACHE_KEY/build/build-$BUILD_GUID.tar s3://game-ci-test-storage/$CACHE_KEY/build-$BUILD_GUID.tar
- secrets:
- - name: awsAccessKeyId
- value: ${{ secrets.AWS_ACCESS_KEY_ID }}
- - name: awsSecretAccessKey
- value: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- - name: awsDefaultRegion
- value: eu-west-2
+ gitPrivateToken: ${{ secrets.GITHUB_TOKEN }}
+ targetPlatform: ${{ matrix.targetPlatform }}
+ cloudRunnerCluster: ${{ matrix.cloudRunnerCluster }}
+ customStepFiles: aws-s3-upload-build,aws-s3-pull-cache,aws-s3-upload-cache
- run: |
- aws s3 cp s3://game-ci-test-storage/${{ steps.k8s-unity-build.outputs.CACHE_KEY }}/build-${{ steps.k8s-unity-build.outputs.BUILD_GUID }}.tar build-${{ steps.k8s-unity-build.outputs.BUILD_GUID }}.tar
+ aws s3 cp s3://game-ci-test-storage/cloud-runner-cache/${{ steps.unity-build.outputs.CACHE_KEY }}/build/build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4 build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4
ls
- ###########################
- # Upload #
- ###########################
- # download from cloud storage
+ - run: yarn run cli -m list-resources
+ if: always()
+ env:
+ cloudRunnerTests: true
+ CLOUD_RUNNER_CLUSTER: ${{ matrix.cloudRunnerCluster }}
- uses: actions/upload-artifact@v2
with:
- name: K8s Build (${{ matrix.targetPlatform }})
- path: build-${{ steps.k8s-unity-build.outputs.BUILD_GUID }}.tar
+ name: ${{ matrix.cloudRunnerCluster }} Build (${{ matrix.targetPlatform }})
+ path: build-${{ steps.unity-build.outputs.BUILD_GUID }}.tar.lz4
retention-days: 14
diff --git a/.vscode/settings.json b/.vscode/settings.json
index e22e08b01..5a33b7a0b 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -1,4 +1,5 @@
{
+ "files.eol": "\n",
"god.tsconfig": "./tsconfig.json",
"yaml.customTags": [
"!And",
diff --git a/action.yml b/action.yml
index 6658a9a88..64effd182 100644
--- a/action.yml
+++ b/action.yml
@@ -9,7 +9,8 @@ inputs:
unityVersion:
required: false
default: 'auto'
- description: 'Version of unity to use for building the project. Use "auto" to get from your ProjectSettings/ProjectVersion.txt'
+ description:
+ 'Version of unity to use for building the project. Use "auto" to get from your ProjectSettings/ProjectVersion.txt'
customImage:
required: false
default: ''
@@ -81,91 +82,107 @@ inputs:
gitPrivateToken:
required: false
default: ''
- description: 'Github private token to pull from github'
+ description: '[CloudRunner] Github private token to pull from github'
chownFilesTo:
required: false
default: ''
- description: 'User and optionally group (user or user:group or uid:gid) to give ownership of the resulting build artifacts'
+ description:
+ 'User and optionally group (user or user:group or uid:gid) to give ownership of the resulting build artifacts'
allowDirtyBuild:
required: false
default: ''
- description: 'Allows the branch of the build to be dirty, and still generate the build.'
+ description: '[CloudRunner] Allows the branch of the build to be dirty, and still generate the build.'
postBuildSteps:
required: false
default: ''
- description: 'run a post build job in yaml format with the keys image, secrets (name, value object array), command string'
+ description:
+ '[CloudRunner] run a post build job in yaml format with the keys image, secrets (name, value object array),
+ command string'
preBuildSteps:
required: false
default: ''
- description: 'Run a pre build job after the repository setup but before the build job (in yaml format with the keys image, secrets (name, value object array), command line string)'
+ description:
+ '[CloudRunner] Run a pre build job after the repository setup but before the build job (in yaml format with the
+ keys image, secrets (name, value object array), command line string)'
+ customStepFiles:
+ required: false
+ default: ''
+ description:
+ '[CloudRunner] Specify the names (by file name) of custom steps to run before or after cloud runner jobs, must
+ match a yaml step file inside your repo in the folder .game-ci/steps/'
+ customHookFiles:
+ required: false
+ default: ''
+ description:
+ '[CloudRunner] Specify the names (by file name) of custom hooks to run before or after cloud runner jobs, must
+ match a yaml step file inside your repo in the folder .game-ci/hooks/'
customJobHooks:
required: false
default: ''
- description: 'Specify custom commands and trigger hooks (injects commands into jobs)'
+ description: '[CloudRunner] Specify custom commands and trigger hooks (injects commands into jobs)'
customJob:
required: false
default: ''
- description: 'Run a custom job instead of the standard build automation for cloud runner (in yaml format with the keys image, secrets (name, value object array), command line string)'
+ description:
+ '[CloudRunner] Run a custom job instead of the standard build automation for cloud runner (in yaml format with the
+ keys image, secrets (name, value object array), command line string)'
awsBaseStackName:
default: 'game-ci'
required: false
- description: 'The Cloud Formation stack name that must be setup before using this option.'
+ description: '[CloudRunner] The Cloud Formation stack name that must be setup before using this option.'
cloudRunnerCluster:
default: 'local'
required: false
- description: 'Either local, k8s or aws can be used to run builds on a remote cluster. Additional parameters must be configured.'
+ description:
+ '[CloudRunner] Either local, k8s or aws can be used to run builds on a remote cluster. Additional parameters must
+ be configured.'
cloudRunnerCpu:
default: ''
required: false
- description: 'Amount of CPU time to assign the remote build container'
+ description: '[CloudRunner] Amount of CPU time to assign the remote build container'
cloudRunnerMemory:
default: ''
required: false
- description: 'Amount of memory to assign the remote build container'
- cachePushOverrideCommand:
- default: ''
- required: false
- description: 'A command run every time a file is pushed to cache, formatted with input file path and remote cache path'
- cachePullOverrideCommand:
- default: ''
- required: false
- description: 'A command run every time before a file is being pulled from cache, formatted with request cache file and destination path'
+ description: '[CloudRunner] Amount of memory to assign the remote build container'
readInputFromOverrideList:
default: ''
required: false
- description: 'Comma separated list of input value names to read from "input override command"'
+ description: '[CloudRunner] Comma separated list of input value names to read from "input override command"'
readInputOverrideCommand:
default: ''
required: false
- description: 'Extend game ci by specifying a command to execute to pull input from external source e.g cloud provider secret managers'
+ description:
+ '[CloudRunner] Extend game ci by specifying a command to execute to pull input from external source e.g cloud
+ provider secret managers'
kubeConfig:
default: ''
required: false
- description: 'Supply a base64 encoded kubernetes config to run builds on kubernetes and stream logs until completion.'
+ description:
+ '[CloudRunner] Supply a base64 encoded kubernetes config to run builds on kubernetes and stream logs until
+ completion.'
kubeVolume:
default: ''
required: false
- description: 'Supply a Persistent Volume Claim name to use for the Unity build.'
+ description: '[CloudRunner] Supply a Persistent Volume Claim name to use for the Unity build.'
kubeStorageClass:
default: ''
required: false
- description: 'Kubernetes storage class to use for cloud runner jobs, leave empty to install rook cluster.'
+ description:
+ '[CloudRunner] Kubernetes storage class to use for cloud runner jobs, leave empty to install rook cluster.'
kubeVolumeSize:
default: '5Gi'
required: false
- description: 'Amount of disc space to assign the Kubernetes Persistent Volume'
+ description: '[CloudRunner] Amount of disc space to assign the Kubernetes Persistent Volume'
cacheKey:
default: ''
required: false
- description: 'Cache key to indicate bucket for cache'
- checkDependencyHealthOverride:
- default: ''
- required: false
- description: 'Use to specify a way to check depdency services health to enable resilient self-starting jobs'
- startDependenciesOverride:
- default: ''
+ description: '[CloudRunner] Cache key to indicate bucket for cache'
+ watchToEnd:
+ default: 'true'
required: false
- description: 'Use to specify a way to start depdency services health to enable resilient self-starting jobs'
+ description:
+ '[CloudRunner] Whether or not to watch the build to the end. Can be used for especially long running jobs e.g
+ imports or self-hosted ephemeral runners.'
outputs:
volume:
description: 'The Persistent Volume (PV) where the build artifacts have been stored by Kubernetes'
diff --git a/dist/index.js b/dist/index.js
index 1ccffaab8..13bdcbc80 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -220,6 +220,8 @@ const versioning_1 = __importDefault(__nccwpck_require__(93901));
const git_repo_1 = __nccwpck_require__(24271);
const github_cli_1 = __nccwpck_require__(44990);
const cli_1 = __nccwpck_require__(55651);
+const github_1 = __importDefault(__nccwpck_require__(83654));
+const cloud_runner_options_1 = __importDefault(__nccwpck_require__(96552));
class BuildParameters {
static create() {
return __awaiter(this, void 0, void 0, function* () {
@@ -232,13 +234,13 @@ class BuildParameters {
// ---
let unitySerial = '';
if (input_1.default.unityLicensingServer === '') {
- if (!process.env.UNITY_SERIAL && input_1.default.githubInputEnabled) {
+ if (!process.env.UNITY_SERIAL && github_1.default.githubInputEnabled) {
// No serial was present, so it is a personal license that we need to convert
if (!process.env.UNITY_LICENSE) {
throw new Error(`Missing Unity License File and no Serial was found. If this
- is a personal license, make sure to follow the activation
- steps and set the UNITY_LICENSE GitHub secret or enter a Unity
- serial number inside the UNITY_SERIAL GitHub secret.`);
+ is a personal license, make sure to follow the activation
+ steps and set the UNITY_LICENSE GitHub secret or enter a Unity
+ serial number inside the UNITY_SERIAL GitHub secret.`);
}
unitySerial = this.getSerialFromLicenseFile(process.env.UNITY_LICENSE);
}
@@ -271,36 +273,38 @@ class BuildParameters {
sshAgent: input_1.default.sshAgent,
gitPrivateToken: input_1.default.gitPrivateToken || (yield github_cli_1.GithubCliReader.GetGitHubAuthToken()),
chownFilesTo: input_1.default.chownFilesTo,
- cloudRunnerCluster: input_1.default.cloudRunnerCluster,
- cloudRunnerBuilderPlatform: input_1.default.cloudRunnerBuilderPlatform,
- awsBaseStackName: input_1.default.awsBaseStackName,
- kubeConfig: input_1.default.kubeConfig,
- cloudRunnerMemory: input_1.default.cloudRunnerMemory,
- cloudRunnerCpu: input_1.default.cloudRunnerCpu,
- kubeVolumeSize: input_1.default.kubeVolumeSize,
- kubeVolume: input_1.default.kubeVolume,
- postBuildSteps: input_1.default.postBuildSteps,
- preBuildSteps: input_1.default.preBuildSteps,
- customJob: input_1.default.customJob,
+ cloudRunnerCluster: cloud_runner_options_1.default.cloudRunnerCluster,
+ cloudRunnerBuilderPlatform: cloud_runner_options_1.default.cloudRunnerBuilderPlatform,
+ awsBaseStackName: cloud_runner_options_1.default.awsBaseStackName,
+ kubeConfig: cloud_runner_options_1.default.kubeConfig,
+ cloudRunnerMemory: cloud_runner_options_1.default.cloudRunnerMemory,
+ cloudRunnerCpu: cloud_runner_options_1.default.cloudRunnerCpu,
+ kubeVolumeSize: cloud_runner_options_1.default.kubeVolumeSize,
+ kubeVolume: cloud_runner_options_1.default.kubeVolume,
+ postBuildSteps: cloud_runner_options_1.default.postBuildSteps,
+ preBuildSteps: cloud_runner_options_1.default.preBuildSteps,
+ customJob: cloud_runner_options_1.default.customJob,
runNumber: input_1.default.runNumber,
branch: input_1.default.branch.replace('/head', '') || (yield git_repo_1.GitRepoReader.GetBranch()),
- cloudRunnerBranch: input_1.default.cloudRunnerBranch.split('/').reverse()[0],
- cloudRunnerIntegrationTests: input_1.default.cloudRunnerTests,
+ cloudRunnerBranch: cloud_runner_options_1.default.cloudRunnerBranch.split('/').reverse()[0],
+ cloudRunnerDebug: cloud_runner_options_1.default.cloudRunnerDebug,
githubRepo: input_1.default.githubRepo || (yield git_repo_1.GitRepoReader.GetRemote()) || 'game-ci/unity-builder',
isCliMode: cli_1.Cli.isCliMode,
- awsStackName: input_1.default.awsBaseStackName,
+ awsStackName: cloud_runner_options_1.default.awsBaseStackName,
gitSha: input_1.default.gitSha,
logId: nanoid_1.customAlphabet(cloud_runner_constants_1.default.alphabet, 9)(),
buildGuid: cloud_runner_guid_1.default.generateGuid(input_1.default.runNumber, input_1.default.targetPlatform),
- customJobHooks: input_1.default.customJobHooks(),
- cachePullOverrideCommand: input_1.default.cachePullOverrideCommand(),
- cachePushOverrideCommand: input_1.default.cachePushOverrideCommand(),
- readInputOverrideCommand: input_1.default.readInputOverrideCommand(),
- readInputFromOverrideList: input_1.default.readInputFromOverrideList(),
- kubeStorageClass: input_1.default.kubeStorageClass,
- checkDependencyHealthOverride: input_1.default.checkDependencyHealthOverride,
- startDependenciesOverride: input_1.default.startDependenciesOverride,
- cacheKey: input_1.default.cacheKey,
+ customJobHooks: cloud_runner_options_1.default.customJobHooks(),
+ readInputOverrideCommand: cloud_runner_options_1.default.readInputOverrideCommand(),
+ readInputFromOverrideList: cloud_runner_options_1.default.readInputFromOverrideList(),
+ kubeStorageClass: cloud_runner_options_1.default.kubeStorageClass,
+ cacheKey: cloud_runner_options_1.default.cacheKey,
+ retainWorkspace: cloud_runner_options_1.default.retainWorkspaces,
+ useSharedLargePackages: cloud_runner_options_1.default.useSharedLargePackages,
+ useLz4Compression: cloud_runner_options_1.default.useLz4Compression,
+ maxRetainedWorkspaces: cloud_runner_options_1.default.maxRetainedWorkspaces,
+ constantGarbageCollection: cloud_runner_options_1.default.constantGarbageCollection,
+ garbageCollectionMaxAge: cloud_runner_options_1.default.garbageCollectionMaxAge,
};
});
}
@@ -482,10 +486,14 @@ const action_yaml_1 = __nccwpck_require__(11091);
const cloud_runner_logger_1 = __importDefault(__nccwpck_require__(22855));
const cloud_runner_query_override_1 = __importDefault(__nccwpck_require__(31011));
const cli_functions_repository_1 = __nccwpck_require__(85301);
-const aws_cli_commands_1 = __nccwpck_require__(34340);
const caching_1 = __nccwpck_require__(32885);
const lfs_hashing_1 = __nccwpck_require__(8915);
const remote_client_1 = __nccwpck_require__(48135);
+const cloud_runner_options_reader_1 = __importDefault(__nccwpck_require__(3343));
+const github_1 = __importDefault(__nccwpck_require__(83654));
+const task_parameter_serializer_1 = __nccwpck_require__(35346);
+const cloud_runner_folders_1 = __nccwpck_require__(13527);
+const cloud_runner_system_1 = __nccwpck_require__(99393);
class Cli {
static get isCliMode() {
return Cli.options !== undefined && Cli.options.mode !== undefined && Cli.options.mode !== '';
@@ -500,13 +508,12 @@ class Cli {
return;
}
static InitCliMode() {
- cli_functions_repository_1.CliFunctionsRepository.PushCliFunctionSource(aws_cli_commands_1.AwsCliCommands);
+ cli_functions_repository_1.CliFunctionsRepository.PushCliFunctionSource(remote_client_1.RemoteClient);
cli_functions_repository_1.CliFunctionsRepository.PushCliFunctionSource(caching_1.Caching);
cli_functions_repository_1.CliFunctionsRepository.PushCliFunctionSource(lfs_hashing_1.LfsHashing);
- cli_functions_repository_1.CliFunctionsRepository.PushCliFunctionSource(remote_client_1.RemoteClient);
const program = new commander_ts_1.Command();
program.version('0.0.1');
- const properties = Object.getOwnPropertyNames(__1.Input);
+ const properties = cloud_runner_options_reader_1.default.GetProperties();
const actionYamlReader = new action_yaml_1.ActionYamlReader();
for (const element of properties) {
program.option(`--${element} <${element}>`, actionYamlReader.GetActionYamlValue(element));
@@ -518,27 +525,36 @@ class Cli {
program.option('--cachePushFrom ', 'cache push from source folder');
program.option('--cachePushTo ', 'cache push to caching folder');
program.option('--artifactName ', 'caching artifact name');
+ program.option('--select