Remove additional secret adding logic

pull/289/head
Frostebite 2021-08-15 19:00:31 +00:00 committed by GitHub
parent 150d2b156e
commit 7bd98aade8
3 changed files with 3 additions and 105 deletions

49
dist/index.js vendored
View File

@ -2296,8 +2296,6 @@ class RemoteBuilder {
}
static BuildStep(baseImage) {
return __awaiter(this, void 0, void 0, function* () {
const buildSecrets = new Array();
RemoteBuilder.readBuildSecrets(buildSecrets);
core.info('Starting part 2/4 (build unity project)');
yield this.RemoteBuilderProviderPlatform.runBuildTask(this.buildId, baseImage.toString(), [
`
@ -2310,7 +2308,7 @@ class RemoteBuilder {
/entrypoint.sh
ls -lh
`,
], `/${buildVolumeFolder}`, `/${this.projectPathFull}`, RemoteBuilder.readBuildEnvironmentVariables(), buildSecrets);
], `/${buildVolumeFolder}`, `/${this.projectPathFull}`, RemoteBuilder.readBuildEnvironmentVariables(), this.defaultSecrets);
});
}
static CompressionStep() {
@ -2453,51 +2451,6 @@ class RemoteBuilder {
};
}));
}
static readBuildSecrets(buildSecrets) {
buildSecrets.push(...this.defaultSecrets);
if (process.env.UNITY_LICENSE)
buildSecrets.push({
ParameterKey: 'UnityLicense',
EnvironmentVariable: 'UNITY_LICENSE',
ParameterValue: process.env.UNITY_LICENSE,
});
if (process.env.UNITY_EMAIL)
buildSecrets.push({
ParameterKey: 'UnityEmail',
EnvironmentVariable: 'UNITY_EMAIL',
ParameterValue: process.env.UNITY_EMAIL,
});
if (process.env.UNITY_PASSWORD)
buildSecrets.push({
ParameterKey: 'UnityPassword',
EnvironmentVariable: 'UNITY_PASSWORD',
ParameterValue: process.env.UNITY_PASSWORD,
});
if (process.env.UNITY_SERIAL)
buildSecrets.push({
ParameterKey: 'UnitySerial',
EnvironmentVariable: 'UNITY_SERIAL',
ParameterValue: process.env.UNITY_SERIAL,
});
if (this.buildParams.androidKeystoreBase64)
buildSecrets.push({
ParameterKey: 'AndroidKeystoreBase64',
EnvironmentVariable: 'ANDROID_KEYSTORE_BASE64',
ParameterValue: this.buildParams.androidKeystoreBase64,
});
if (this.buildParams.androidKeystorePass)
buildSecrets.push({
ParameterKey: 'AndroidKeystorePass',
EnvironmentVariable: 'ANDROID_KEYSTORE_PASS',
ParameterValue: this.buildParams.androidKeystorePass,
});
if (this.buildParams.androidKeyaliasPass)
buildSecrets.push({
ParameterKey: 'AndroidKeyAliasPass',
EnvironmentVariable: 'AWS_ACCESS_KEY_ALIAS_PASS',
ParameterValue: this.buildParams.androidKeyaliasPass,
});
}
static readUploadArtifactsSecrets() {
return [
{

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -142,8 +142,6 @@ class RemoteBuilder {
}
private static async BuildStep(baseImage: any) {
const buildSecrets = new Array();
RemoteBuilder.readBuildSecrets(buildSecrets);
core.info('Starting part 2/4 (build unity project)');
await this.RemoteBuilderProviderPlatform.runBuildTask(
this.buildId,
@ -163,7 +161,7 @@ class RemoteBuilder {
`/${buildVolumeFolder}`,
`/${this.projectPathFull}`,
RemoteBuilder.readBuildEnvironmentVariables(),
buildSecrets,
this.defaultSecrets,
);
}
@ -336,59 +334,6 @@ class RemoteBuilder {
);
}
private static readBuildSecrets(buildSecrets: any[]) {
buildSecrets.push(...this.defaultSecrets);
if (process.env.UNITY_LICENSE)
buildSecrets.push({
ParameterKey: 'UnityLicense',
EnvironmentVariable: 'UNITY_LICENSE',
ParameterValue: process.env.UNITY_LICENSE,
});
if (process.env.UNITY_EMAIL)
buildSecrets.push({
ParameterKey: 'UnityEmail',
EnvironmentVariable: 'UNITY_EMAIL',
ParameterValue: process.env.UNITY_EMAIL,
});
if (process.env.UNITY_PASSWORD)
buildSecrets.push({
ParameterKey: 'UnityPassword',
EnvironmentVariable: 'UNITY_PASSWORD',
ParameterValue: process.env.UNITY_PASSWORD,
});
if (process.env.UNITY_SERIAL)
buildSecrets.push({
ParameterKey: 'UnitySerial',
EnvironmentVariable: 'UNITY_SERIAL',
ParameterValue: process.env.UNITY_SERIAL,
});
if (this.buildParams.androidKeystoreBase64)
buildSecrets.push({
ParameterKey: 'AndroidKeystoreBase64',
EnvironmentVariable: 'ANDROID_KEYSTORE_BASE64',
ParameterValue: this.buildParams.androidKeystoreBase64,
});
if (this.buildParams.androidKeystorePass)
buildSecrets.push({
ParameterKey: 'AndroidKeystorePass',
EnvironmentVariable: 'ANDROID_KEYSTORE_PASS',
ParameterValue: this.buildParams.androidKeystorePass,
});
if (this.buildParams.androidKeyaliasPass)
buildSecrets.push({
ParameterKey: 'AndroidKeyAliasPass',
EnvironmentVariable: 'AWS_ACCESS_KEY_ALIAS_PASS',
ParameterValue: this.buildParams.androidKeyaliasPass,
});
}
private static readUploadArtifactsSecrets() {
return [
{