Serialize all input and buildparams

pull/310/head
Frostebite 2021-12-21 05:57:00 +00:00
parent 568b5b216b
commit a6a24d8378
8 changed files with 301 additions and 10 deletions

View File

@ -1,3 +0,0 @@
{
"entryFilePath": "dist\\index.js"
}

View File

@ -0,0 +1,98 @@
getInput=getInput(query) {
return Input.githubEnabled
? core.getInput(query)
: Input.cliOptions[query] !== undefined
? Input.cliOptions[query]
: process.env[query] !== undefined
? process.env[query]
: false;
}
androidKeystorePass=
androidKeystoreBase64=
ANDROID_VERSION_CODE=1
kubeConfig=
HOSTNAME=ip-10-0-1-22.eu-west-2.compute.internal
customImage=false
testCustomSecret=VALUEXXX
androidKeyaliasPass=
BUILDID=0-windows64-btbj
SHLVL=1
branch=remote-builder/unified-providers
githubRepo=game-ci/unity-builder
HOME=/root
cloudRunnerCpu=1.0
versioningStrategy=None
platform=StandaloneWindows64
githubEnabled=false
ANDROID_KEYSTORE_NAME=
buildPathFull=/data/0-windows64-btbj
version=2019.2.11f1
region=eu-west-2
AWS_EXECUTION_ENV=AWS_ECS_FARGATE
specifiedVersion=
chownFilesTo=
BUILD_FILE=StandaloneWindows64.exe
runNumber=0
buildMethod=
ANDROID_KEYALIAS_NAME=
BUILD_NAME=StandaloneWindows64
VERSION=none
AWS_DEFAULT_REGION=eu-west-2
logToFile=true
runnerTempPath=undefined
sshAgent=
androidVersionCode=false
ECS_CONTAINER_METADATA_URI_V4=http://169.254.170.2/v4/978ea84caeab48ddad29e3b8243e4e3d-1072172599
androidKeystoreName=
BUILD_METHOD=
kubeVolumeSize=5Gi
ECS_CONTAINER_METADATA_URI=http://169.254.170.2/v3/978ea84caeab48ddad29e3b8243e4e3d-1072172599
CUSTOM_PARAMETERS=
steamPathFull=/data/0-windows64-btbj/steam
customParameters=
repoPathFull=/data/0-windows64-btbj/repo
cloudRunnerCluster=
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
libraryFolderFull=/data/0-windows64-btbj/repo/test-project/Library
androidAppBundle=false
androidKeyaliasName=
preBuildSteps=
buildFile=StandaloneWindows64.exe
ContainerMemory=750M
projectPath=test-project
buildName=StandaloneWindows64
unityVersion=auto
BUILD_TARGET=StandaloneWindows64
targetPlatform=StandaloneWindows64
BUILD_PATH=build/StandaloneWindows64
ALLOW_EMPTY_PASSWORD=yes
PROJECT_PATH=test-project
AWS_REGION=eu-west-2
awsBaseStackName=game-ci-3-test
GITHUB_WORKSPACE=/github/workspace
length=0
buildVersion=none
builderPathFull=/data/0-windows64-btbj/builder
cliOptions=[object Object]
postBuildSteps=
name=Input
cloudRunnerMemory=750M
PWD=/data
buildsPath=build
allowDirtyBuild=false
githubToken=
UNITY_VERSION=2019.2.11f1
buildPath=build/StandaloneWindows64
projectPathFull=/data/0-windows64-btbj/repo/test-project
kubeVolume=
customBuildSteps=
- name: 'step 1'
image: 'alpine'
commands: ['printenv']
secrets:
- name: 'testCustomSecret'
value: 'VALUEXXX'
prototype=[object Object]
ContainerCpu=1.0
remoteBuilderIntegrationTests=true

View File

@ -0,0 +1,97 @@
getInput=getInput(query) {
return Input.githubEnabled
? core.getInput(query)
: Input.cliOptions[query] !== undefined
? Input.cliOptions[query]
: process.env[query] !== undefined
? process.env[query]
: false;
}
androidKeystoreBase64=
androidKeystorePass=
ANDROID_VERSION_CODE=1
kubeConfig=
customImage=false
HOSTNAME=ip-10-0-0-201.eu-west-2.compute.internal
testCustomSecret=VALUEXXX
androidKeyaliasPass=
BUILDID=0-windows64-h1wl
SHLVL=1
branch=remote-builder/unified-providers
githubRepo=game-ci/unity-builder
HOME=/root
cloudRunnerCpu=1.0
versioningStrategy=None
platform=StandaloneWindows64
githubEnabled=false
ANDROID_KEYSTORE_NAME=
version=2019.2.11f1
buildPathFull=/data/0-windows64-h1wl
AWS_EXECUTION_ENV=AWS_ECS_FARGATE
region=eu-west-2
specifiedVersion=
runNumber=0
BUILD_FILE=StandaloneWindows64.exe
chownFilesTo=
BUILD_NAME=StandaloneWindows64
buildMethod=
ANDROID_KEYALIAS_NAME=
VERSION=none
AWS_DEFAULT_REGION=eu-west-2
logToFile=true
sshAgent=
androidVersionCode=false
ECS_CONTAINER_METADATA_URI_V4=http://169.254.170.2/v4/25d37a163d3642b08b3847875d61c58f-2663259997
androidKeystoreName=
BUILD_METHOD=
ECS_CONTAINER_METADATA_URI=http://169.254.170.2/v3/25d37a163d3642b08b3847875d61c58f-2663259997
steamPathFull=/data/0-windows64-h1wl/steam
customParameters=
CUSTOM_PARAMETERS=
kubeVolumeSize=5Gi
cloudRunnerCluster=
repoPathFull=/data/0-windows64-h1wl/repo
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
libraryFolderFull=/data/0-windows64-h1wl/repo/test-project/Library
androidAppBundle=false
preBuildSteps=
androidKeyaliasName=
buildFile=StandaloneWindows64.exe
ContainerMemory=750M
projectPath=test-project
buildName=StandaloneWindows64
BUILD_TARGET=StandaloneWindows64
unityVersion=auto
targetPlatform=StandaloneWindows64
ALLOW_EMPTY_PASSWORD=yes
BUILD_PATH=build/StandaloneWindows64
PROJECT_PATH=test-project
AWS_REGION=eu-west-2
awsBaseStackName=game-ci-3-test
GITHUB_WORKSPACE=/github/workspace
builderPathFull=/data/0-windows64-h1wl/builder
length=0
buildVersion=none
cliOptions=[object Object]
postBuildSteps=
name=Input
cloudRunnerMemory=750M
PWD=/data
buildsPath=build
allowDirtyBuild=false
githubToken=
UNITY_VERSION=2019.2.11f1
buildPath=build/StandaloneWindows64
projectPathFull=/data/0-windows64-h1wl/repo/test-project
kubeVolume=
prototype=[object Object]
ContainerCpu=1.0
customBuildSteps=
- name: 'step 1'
image: 'alpine'
commands: ['printenv']
secrets:
- name: 'testCustomSecret'
value: 'VALUEXXX'
remoteBuilderIntegrationTests=true

View File

@ -0,0 +1,98 @@
getInput=getInput(query) {
return Input.githubEnabled
? core.getInput(query)
: Input.cliOptions[query] !== undefined
? Input.cliOptions[query]
: process.env[query] !== undefined
? process.env[query]
: false;
}
androidKeystoreBase64=
androidKeystorePass=
ANDROID_VERSION_CODE=1
kubeConfig=
customImage=false
HOSTNAME=ip-10-0-1-224.eu-west-2.compute.internal
testCustomSecret=VALUEXXX
androidKeyaliasPass=
BUILDID=0-windows64-qwbx
SHLVL=1
githubRepo=game-ci/unity-builder
branch=remote-builder/unified-providers
HOME=/root
cloudRunnerCpu=1.0
platform=StandaloneWindows64
versioningStrategy=None
buildPathFull=/data/0-windows64-qwbx
version=2019.2.11f1
githubEnabled=false
ANDROID_KEYSTORE_NAME=
AWS_EXECUTION_ENV=AWS_ECS_FARGATE
region=eu-west-2
specifiedVersion=
runNumber=0
BUILD_FILE=StandaloneWindows64.exe
chownFilesTo=
BUILD_NAME=StandaloneWindows64
buildMethod=
ANDROID_KEYALIAS_NAME=
VERSION=none
logToFile=true
AWS_DEFAULT_REGION=eu-west-2
androidVersionCode=false
runnerTempPath=undefined
sshAgent=
ECS_CONTAINER_METADATA_URI_V4=http://169.254.170.2/v4/a7cf38309de6450a9ad8717b181bc485-2780554367
androidKeystoreName=
BUILD_METHOD=
ECS_CONTAINER_METADATA_URI=http://169.254.170.2/v3/a7cf38309de6450a9ad8717b181bc485-2780554367
CUSTOM_PARAMETERS=
kubeVolumeSize=5Gi
customParameters=
steamPathFull=/data/0-windows64-qwbx/steam
repoPathFull=/data/0-windows64-qwbx/repo
cloudRunnerCluster=
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
libraryFolderFull=/data/0-windows64-qwbx/repo/test-project/Library
androidAppBundle=false
androidKeyaliasName=
preBuildSteps=
ContainerMemory=750M
projectPath=test-project
buildFile=StandaloneWindows64.exe
BUILD_TARGET=StandaloneWindows64
buildName=StandaloneWindows64
unityVersion=auto
targetPlatform=StandaloneWindows64
ALLOW_EMPTY_PASSWORD=yes
BUILD_PATH=build/StandaloneWindows64
PROJECT_PATH=test-project
AWS_REGION=eu-west-2
GITHUB_WORKSPACE=/github/workspace
awsBaseStackName=game-ci-3-test
buildVersion=none
length=0
builderPathFull=/data/0-windows64-qwbx/builder
cliOptions=[object Object]
cloudRunnerMemory=750M
name=Input
postBuildSteps=
PWD=/data
allowDirtyBuild=false
buildsPath=build
UNITY_VERSION=2019.2.11f1
githubToken=
buildPath=build/StandaloneWindows64
projectPathFull=/data/0-windows64-qwbx/repo/test-project
kubeVolume=
prototype=[object Object]
customBuildSteps=
- name: 'step 1'
image: 'alpine'
commands: ['printenv']
secrets:
- name: 'testCustomSecret'
value: 'VALUEXXX'
ContainerCpu=1.0
remoteBuilderIntegrationTests=true

5
dist/index.js vendored
View File

@ -2278,20 +2278,19 @@ class CloudRunnerState {
]; ];
} }
static get serializeBuildParamsAndInput() { static get serializeBuildParamsAndInput() {
var _a, _b;
const keys = Object.keys(CloudRunnerState.buildParams); const keys = Object.keys(CloudRunnerState.buildParams);
const array = new Array(); const array = new Array();
for (const element of keys) { for (const element of keys) {
array.push({ array.push({
name: element, name: element,
value: (_a = CloudRunnerState.buildParams[element]) === null || _a === void 0 ? void 0 : _a.toString(), value: `${CloudRunnerState.buildParams[element]}`,
}); });
} }
const input = Object.getOwnPropertyNames(__1.Input); const input = Object.getOwnPropertyNames(__1.Input);
for (const element of input) { for (const element of input) {
array.push({ array.push({
name: element, name: element,
value: (_b = __1.Input[element]) === null || _b === void 0 ? void 0 : _b.toString(), value: `${__1.Input[element]}`,
}); });
} }
return array; return array;

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -32,7 +32,9 @@ describe('Cloud Runner', () => {
console.log(file); console.log(file);
const keys = Object.keys(buildParameter); const keys = Object.keys(buildParameter);
for (const element of keys) { for (const element of keys) {
expect(file).toContain(`${element}=${buildParameter[element]}`); if (buildParameter[element] !== undefined) {
expect(file).toContain(`${element}`);
}
} }
} }
}, 500000); }, 500000);

View File

@ -134,14 +134,14 @@ export class CloudRunnerState {
for (const element of keys) { for (const element of keys) {
array.push({ array.push({
name: element, name: element,
value: CloudRunnerState.buildParams[element]?.toString(), value: `${CloudRunnerState.buildParams[element]}`,
}); });
} }
const input = Object.getOwnPropertyNames(Input); const input = Object.getOwnPropertyNames(Input);
for (const element of input) { for (const element of input) {
array.push({ array.push({
name: element, name: element,
value: Input[element]?.toString(), value: `${Input[element]}`,
}); });
} }
return array; return array;