pull/289/head
Frostebite 2021-08-15 20:45:22 +00:00 committed by GitHub
parent 9c288def3f
commit 5a4b54ec05
7 changed files with 48 additions and 1 deletions

View File

@ -60,3 +60,10 @@ jobs:
targetPlatform: ${{ matrix.targetPlatform }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
awsBaseStackName: game-ci-base-stack
postBuildSteps:
- name: 'step 1'
image: 'alpine'
commands: ['printenv']
secrets:
- name: 'testCustomSecret'
value: 'VALUEXXX'

View File

@ -22,6 +22,9 @@ inputs:
required: false
default: ''
description: 'Name of the build.'
postBuildSteps:
required: false
default: ''
buildsPath:
required: false
default: ''

13
dist/index.js vendored
View File

@ -237,6 +237,7 @@ class BuildParameters {
remoteBuildCpu: input_1.default.remoteBuildCpu,
kubeVolumeSize: input_1.default.kubeVolumeSize,
kubeVolume: input_1.default.kubeVolume,
postBuildSteps: input_1.default.postBuildSteps,
};
});
}
@ -701,6 +702,9 @@ class Input {
static get chownFilesTo() {
return core.getInput('chownFilesTo') || '';
}
static get postBuildSteps() {
return core.getInput('postBuildSteps');
}
static get remoteBuildCluster() {
return core.getInput('remoteBuildCluster') || '';
}
@ -2222,6 +2226,15 @@ class RemoteBuilder {
yield this.RemoteBuilderProviderPlatform.setupSharedBuildResources(this.buildId, this.buildParams, this.branchName, this.defaultSecrets);
yield RemoteBuilder.SetupStep();
yield RemoteBuilder.BuildStep(baseImage);
core.info(`Post build steps ${JSON.stringify(this.buildParams.postBuildSteps, undefined, 4)}`);
for (const step of this.buildParams.postBuildSteps) {
yield this.RemoteBuilderProviderPlatform.runBuildTask(this.buildId, step['image'], step['commands'], `/${buildVolumeFolder}`, `/${buildVolumeFolder}`, [
{
name: 'GITHUB_SHA',
value: process.env.GITHUB_SHA || '',
},
], this.defaultSecrets);
}
yield RemoteBuilder.CompressionStep();
yield RemoteBuilder.UploadArtifacts();
if (this.SteamDeploy)

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -33,6 +33,8 @@ class BuildParameters {
public kubeVolume!: string;
public chownFilesTo!: string;
public postBuildSteps;
static async create(): Promise<BuildParameters> {
const buildFile = this.parseBuildFile(Input.buildName, Input.targetPlatform, Input.androidAppBundle);
@ -71,6 +73,7 @@ class BuildParameters {
remoteBuildCpu: Input.remoteBuildCpu,
kubeVolumeSize: Input.kubeVolumeSize,
kubeVolume: Input.kubeVolume,
postBuildSteps: Input.postBuildSteps,
};
}

View File

@ -93,6 +93,10 @@ class Input {
return core.getInput('chownFilesTo') || '';
}
static get postBuildSteps() {
return core.getInput('postBuildSteps');
}
static get remoteBuildCluster() {
return core.getInput('remoteBuildCluster') || '';
}

View File

@ -51,6 +51,23 @@ class RemoteBuilder {
);
await RemoteBuilder.SetupStep();
await RemoteBuilder.BuildStep(baseImage);
core.info(`Post build steps ${JSON.stringify(this.buildParams.postBuildSteps, undefined, 4)}`);
for (const step of this.buildParams.postBuildSteps) {
await this.RemoteBuilderProviderPlatform.runBuildTask(
this.buildId,
step['image'],
step['commands'],
`/${buildVolumeFolder}`,
`/${buildVolumeFolder}`,
[
{
name: 'GITHUB_SHA',
value: process.env.GITHUB_SHA || '',
},
],
this.defaultSecrets,
);
}
await RemoteBuilder.CompressionStep();
await RemoteBuilder.UploadArtifacts();
if (this.SteamDeploy) await RemoteBuilder.DeployToSteam();