Sync docs

pull/314/head
David Finol 2022-01-02 01:39:12 -06:00
parent a3e783f430
commit cdb7cc65ab
4 changed files with 90 additions and 100 deletions

View File

@ -2,6 +2,10 @@ name: 'Unity - Builder'
author: Webber Takken <webber@takken.io> author: Webber Takken <webber@takken.io>
description: 'Build Unity projects for different platforms.' description: 'Build Unity projects for different platforms.'
inputs: inputs:
targetPlatform:
required: true
default: ''
description: 'Platform that the build should target.'
unityVersion: unityVersion:
required: false required: false
default: 'auto' default: 'auto'
@ -10,10 +14,6 @@ inputs:
required: false required: false
default: '' default: ''
description: 'Specific docker image that should be used for building the project' description: 'Specific docker image that should be used for building the project'
targetPlatform:
required: false
default: ''
description: 'Platform that the build should target.'
projectPath: projectPath:
required: false required: false
default: '' default: ''
@ -30,38 +30,10 @@ inputs:
required: false required: false
default: '' default: ''
description: 'Path to a Namespace.Class.StaticMethod to run to perform the build.' description: 'Path to a Namespace.Class.StaticMethod to run to perform the build.'
remoteBuildCluster: customParameters:
default: 'local'
required: false required: false
description: 'Either local, k8s or aws can be used to run builds on a remote cluster. Additional parameters must be configured.'
awsStackName:
default: 'game-ci'
required: false
description: 'The Cloud Formation stack name that must be setup before using this option.'
kubeConfig:
default: '' default: ''
required: false description: 'Custom parameters to configure the build.'
description: '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.'
remoteBuildMemory:
default: '800M'
required: false
description: 'Amount of memory to assign the remote build container'
remoteBuildCpu:
default: '0.25'
required: false
description: 'Amount of CPU time to assign the remote build container'
kubeVolumeSize:
default: '5Gi'
required: false
description: 'Amount of disc space to assign the Kubernetes Persistent Volume'
githubToken:
default: ''
required: false
description: 'GitHub token for cloning, only needed when kubeconfig is used.'
versioning: versioning:
required: false required: false
default: 'Semantic' default: 'Semantic'
@ -102,14 +74,6 @@ inputs:
required: false required: false
default: '' default: ''
description: 'The android target API level.' description: 'The android target API level.'
customParameters:
required: false
default: ''
description: >
Custom parameters to configure the build.
Parameters must start with a hyphen (-) and may be followed by a value (without hyphen).
Parameters without a value will be considered booleans (with a value of true).
sshAgent: sshAgent:
required: false required: false
default: '' default: ''
@ -117,8 +81,7 @@ inputs:
gitPrivateToken: gitPrivateToken:
required: false required: false
default: '' default: ''
description: > description: 'Github private token to pull from github'
Github private token to pull from github
chownFilesTo: chownFilesTo:
required: false required: false
default: '' default: ''
@ -126,12 +89,39 @@ inputs:
allowDirtyBuild: allowDirtyBuild:
required: false required: false
default: '' default: ''
description: > description: 'Allows the branch of the build to be dirty, and still generate the build.'
Allows the branch of the build to be dirty, and still generate the build. awsStackName:
default: 'game-ci'
Note that it is generally bad practice to modify your branch required: false
in a CI Pipeline. However there are exceptions where this might description: 'The Cloud Formation stack name that must be setup before using this option.'
be needed. (use with care). githubToken:
default: ''
required: false
description: 'GitHub token for cloning, only needed when kubeconfig is used.'
kubeConfig:
default: ''
required: false
description: '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.'
kubeVolumeSize:
default: '5Gi'
required: false
description: 'Amount of disc space to assign the Kubernetes Persistent Volume'
remoteBuildCluster:
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.'
remoteBuildCpu:
default: '0.25'
required: false
description: 'Amount of CPU time to assign the remote build container'
remoteBuildMemory:
default: '800M'
required: false
description: 'Amount of memory to assign the remote build container'
outputs: outputs:
volume: volume:
description: 'The Persistent Volume (PV) where the build artifacts have been stored by Kubernetes' description: 'The Persistent Volume (PV) where the build artifacts have been stored by Kubernetes'

44
dist/index.js vendored
View File

@ -624,15 +624,15 @@ const core = __webpack_require__(42186);
* Note that input is always passed as a string, even booleans. * Note that input is always passed as a string, even booleans.
*/ */
class Input { class Input {
static get targetPlatform() {
return core.getInput('targetPlatform') || platform_1.default.default;
}
static get unityVersion() { static get unityVersion() {
return core.getInput('unityVersion') || 'auto'; return core.getInput('unityVersion') || 'auto';
} }
static get customImage() { static get customImage() {
return core.getInput('customImage'); return core.getInput('customImage');
} }
static get targetPlatform() {
return core.getInput('targetPlatform') || platform_1.default.default;
}
static get projectPath() { static get projectPath() {
const rawProjectPath = core.getInput('projectPath') || '.'; const rawProjectPath = core.getInput('projectPath') || '.';
return rawProjectPath.replace(/\/$/, ''); return rawProjectPath.replace(/\/$/, '');
@ -646,6 +646,9 @@ class Input {
static get buildMethod() { static get buildMethod() {
return core.getInput('buildMethod'); // processed in docker file return core.getInput('buildMethod'); // processed in docker file
} }
static get customParameters() {
return core.getInput('customParameters') || '';
}
static get versioningStrategy() { static get versioningStrategy() {
return core.getInput('versioning') || 'Semantic'; return core.getInput('versioning') || 'Semantic';
} }
@ -677,13 +680,6 @@ class Input {
static get androidTargetSdkVersion() { static get androidTargetSdkVersion() {
return core.getInput('androidTargetSdkVersion') || ''; return core.getInput('androidTargetSdkVersion') || '';
} }
static get allowDirtyBuild() {
const input = core.getInput('allowDirtyBuild') || false;
return input === 'true';
}
static get customParameters() {
return core.getInput('customParameters') || '';
}
static get sshAgent() { static get sshAgent() {
return core.getInput('sshAgent') || ''; return core.getInput('sshAgent') || '';
} }
@ -693,29 +689,33 @@ class Input {
static get chownFilesTo() { static get chownFilesTo() {
return core.getInput('chownFilesTo') || ''; return core.getInput('chownFilesTo') || '';
} }
static get remoteBuildCluster() { static get allowDirtyBuild() {
return core.getInput('remoteBuildCluster') || ''; const input = core.getInput('allowDirtyBuild') || false;
return input === 'true';
} }
static get awsStackName() { static get awsStackName() {
return core.getInput('awsStackName') || ''; return core.getInput('awsStackName') || 'game-ci';
}
static get kubeConfig() {
return core.getInput('kubeConfig') || '';
} }
static get githubToken() { static get githubToken() {
return core.getInput('githubToken') || ''; return core.getInput('githubToken') || '';
} }
static get remoteBuildMemory() { static get kubeConfig() {
return core.getInput('remoteBuildMemory') || '800M'; return core.getInput('kubeConfig') || '';
} }
static get remoteBuildCpu() { static get kubeVolume() {
return core.getInput('remoteBuildCpu') || '0.25'; return core.getInput('kubeVolume') || '';
} }
static get kubeVolumeSize() { static get kubeVolumeSize() {
return core.getInput('kubeVolumeSize') || '5Gi'; return core.getInput('kubeVolumeSize') || '5Gi';
} }
static get kubeVolume() { static get remoteBuildCluster() {
return core.getInput('kubeVolume') || ''; return core.getInput('remoteBuildCluster') || 'local';
}
static get remoteBuildCpu() {
return core.getInput('remoteBuildCpu') || '0.25';
}
static get remoteBuildMemory() {
return core.getInput('remoteBuildMemory') || '800M';
} }
} }
exports.default = Input; exports.default = Input;

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -8,6 +8,10 @@ const core = require('@actions/core');
* Note that input is always passed as a string, even booleans. * Note that input is always passed as a string, even booleans.
*/ */
class Input { class Input {
static get targetPlatform() {
return core.getInput('targetPlatform') || Platform.default;
}
static get unityVersion() { static get unityVersion() {
return core.getInput('unityVersion') || 'auto'; return core.getInput('unityVersion') || 'auto';
} }
@ -16,10 +20,6 @@ class Input {
return core.getInput('customImage'); return core.getInput('customImage');
} }
static get targetPlatform() {
return core.getInput('targetPlatform') || Platform.default;
}
static get projectPath() { static get projectPath() {
const rawProjectPath = core.getInput('projectPath') || '.'; const rawProjectPath = core.getInput('projectPath') || '.';
return rawProjectPath.replace(/\/$/, ''); return rawProjectPath.replace(/\/$/, '');
@ -37,6 +37,10 @@ class Input {
return core.getInput('buildMethod'); // processed in docker file return core.getInput('buildMethod'); // processed in docker file
} }
static get customParameters() {
return core.getInput('customParameters') || '';
}
static get versioningStrategy() { static get versioningStrategy() {
return core.getInput('versioning') || 'Semantic'; return core.getInput('versioning') || 'Semantic';
} }
@ -79,16 +83,6 @@ class Input {
return core.getInput('androidTargetSdkVersion') || ''; return core.getInput('androidTargetSdkVersion') || '';
} }
static get allowDirtyBuild() {
const input = core.getInput('allowDirtyBuild') || false;
return input === 'true';
}
static get customParameters() {
return core.getInput('customParameters') || '';
}
static get sshAgent() { static get sshAgent() {
return core.getInput('sshAgent') || ''; return core.getInput('sshAgent') || '';
} }
@ -101,36 +95,42 @@ class Input {
return core.getInput('chownFilesTo') || ''; return core.getInput('chownFilesTo') || '';
} }
static get remoteBuildCluster() { static get allowDirtyBuild() {
return core.getInput('remoteBuildCluster') || ''; const input = core.getInput('allowDirtyBuild') || false;
return input === 'true';
} }
static get awsStackName() { static get awsStackName() {
return core.getInput('awsStackName') || ''; return core.getInput('awsStackName') || 'game-ci';
}
static get kubeConfig() {
return core.getInput('kubeConfig') || '';
} }
static get githubToken() { static get githubToken() {
return core.getInput('githubToken') || ''; return core.getInput('githubToken') || '';
} }
static get remoteBuildMemory() { static get kubeConfig() {
return core.getInput('remoteBuildMemory') || '800M'; return core.getInput('kubeConfig') || '';
} }
static get remoteBuildCpu() { static get kubeVolume() {
return core.getInput('remoteBuildCpu') || '0.25'; return core.getInput('kubeVolume') || '';
} }
static get kubeVolumeSize() { static get kubeVolumeSize() {
return core.getInput('kubeVolumeSize') || '5Gi'; return core.getInput('kubeVolumeSize') || '5Gi';
} }
static get kubeVolume() { static get remoteBuildCluster() {
return core.getInput('kubeVolume') || ''; return core.getInput('remoteBuildCluster') || 'local';
}
static get remoteBuildCpu() {
return core.getInput('remoteBuildCpu') || '0.25';
}
static get remoteBuildMemory() {
return core.getInput('remoteBuildMemory') || '800M';
} }
} }