Setup folder variables in correct order
parent
83babdf162
commit
91c3ced4ea
|
|
@ -2168,8 +2168,9 @@ class RemoteBuilder {
|
|||
return __awaiter(this, void 0, void 0, function* () {
|
||||
RemoteBuilder.buildId = remote_builder_namespace_1.default.generateBuildName(RemoteBuilder.readRunNumber(), buildParameters.platform);
|
||||
RemoteBuilder.buildParams = buildParameters;
|
||||
RemoteBuilder.readBranchName();
|
||||
RemoteBuilder.readDefaultSecrets();
|
||||
RemoteBuilder.setupBranchName();
|
||||
RemoteBuilder.setupFolderVariables();
|
||||
RemoteBuilder.setupDefaultSecrets();
|
||||
try {
|
||||
RemoteBuilder.setupBuildPlatform();
|
||||
yield this.RemoteBuilderProviderPlatform.setupSharedBuildResources(this.buildId, this.buildParams, this.branchName, this.defaultSecrets);
|
||||
|
|
@ -2194,6 +2195,14 @@ class RemoteBuilder {
|
|||
}
|
||||
});
|
||||
}
|
||||
static setupFolderVariables() {
|
||||
this.buildPathFull = `/${buildVolumeFolder}/${this.buildId}`;
|
||||
this.builderPathFull = `${this.buildPathFull}/builder`;
|
||||
this.steamPathFull = `${this.buildPathFull}/steam`;
|
||||
this.repoPathFull = `${this.buildPathFull}/${repositoryFolder}`;
|
||||
this.projectPathFull = `${this.repoPathFull}/${this.buildParams.projectPath}`;
|
||||
this.libraryFolderFull = `${this.projectPathFull}/Library`;
|
||||
}
|
||||
static SetupStep() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
core.info('Starting step 1/4 clone and restore cache)');
|
||||
|
|
@ -2349,7 +2358,7 @@ class RemoteBuilder {
|
|||
}
|
||||
return runNumber;
|
||||
}
|
||||
static readBranchName() {
|
||||
static setupBranchName() {
|
||||
var _a;
|
||||
const defaultBranchName = ((_a = process.env.GITHUB_REF) === null || _a === void 0 ? void 0 : _a.split('/').filter((x) => {
|
||||
x = x[0].toUpperCase() + x.slice(1);
|
||||
|
|
@ -2358,7 +2367,7 @@ class RemoteBuilder {
|
|||
this.branchName =
|
||||
process.env.REMOTE_BUILDER_CACHE !== undefined ? process.env.REMOTE_BUILDER_CACHE : defaultBranchName;
|
||||
}
|
||||
static readDefaultSecrets() {
|
||||
static setupDefaultSecrets() {
|
||||
this.defaultSecrets = [
|
||||
{
|
||||
ParameterKey: 'GithubToken',
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -37,8 +37,9 @@ class RemoteBuilder {
|
|||
buildParameters.platform,
|
||||
);
|
||||
RemoteBuilder.buildParams = buildParameters;
|
||||
RemoteBuilder.readBranchName();
|
||||
RemoteBuilder.readDefaultSecrets();
|
||||
RemoteBuilder.setupBranchName();
|
||||
RemoteBuilder.setupFolderVariables();
|
||||
RemoteBuilder.setupDefaultSecrets();
|
||||
try {
|
||||
RemoteBuilder.setupBuildPlatform();
|
||||
|
||||
|
|
@ -75,6 +76,15 @@ class RemoteBuilder {
|
|||
}
|
||||
}
|
||||
|
||||
private static setupFolderVariables() {
|
||||
this.buildPathFull = `/${buildVolumeFolder}/${this.buildId}`;
|
||||
this.builderPathFull = `${this.buildPathFull}/builder`;
|
||||
this.steamPathFull = `${this.buildPathFull}/steam`;
|
||||
this.repoPathFull = `${this.buildPathFull}/${repositoryFolder}`;
|
||||
this.projectPathFull = `${this.repoPathFull}/${this.buildParams.projectPath}`;
|
||||
this.libraryFolderFull = `${this.projectPathFull}/Library`;
|
||||
}
|
||||
|
||||
private static async SetupStep() {
|
||||
core.info('Starting step 1/4 clone and restore cache)');
|
||||
|
||||
|
|
@ -270,7 +280,7 @@ class RemoteBuilder {
|
|||
return runNumber;
|
||||
}
|
||||
|
||||
private static readBranchName() {
|
||||
private static setupBranchName() {
|
||||
const defaultBranchName =
|
||||
process.env.GITHUB_REF?.split('/')
|
||||
.filter((x) => {
|
||||
|
|
@ -282,7 +292,7 @@ class RemoteBuilder {
|
|||
process.env.REMOTE_BUILDER_CACHE !== undefined ? process.env.REMOTE_BUILDER_CACHE : defaultBranchName;
|
||||
}
|
||||
|
||||
private static readDefaultSecrets() {
|
||||
private static setupDefaultSecrets() {
|
||||
this.defaultSecrets = [
|
||||
{
|
||||
ParameterKey: 'GithubToken',
|
||||
|
|
|
|||
Loading…
Reference in New Issue