use the same builder path folders for build step as setup step
parent
34b62aa849
commit
848cc03ba7
|
|
@ -2090,6 +2090,7 @@ const kubernetes_build_platform_1 = __importDefault(__webpack_require__(81730));
|
||||||
const repositoryFolder = 'repo';
|
const repositoryFolder = 'repo';
|
||||||
const buildVolumeFolder = 'data';
|
const buildVolumeFolder = 'data';
|
||||||
const cacheFolder = 'cache';
|
const cacheFolder = 'cache';
|
||||||
|
const cacheFolderFull = `/${buildVolumeFolder}/${cacheFolder}`;
|
||||||
class RemoteBuilder {
|
class RemoteBuilder {
|
||||||
static build(buildParameters, baseImage) {
|
static build(buildParameters, baseImage) {
|
||||||
var _a;
|
var _a;
|
||||||
|
|
@ -2159,7 +2160,7 @@ class RemoteBuilder {
|
||||||
const repo3 = `https://${buildParameters.githubToken}@github.com/${process.env.GITHUB_REPOSITORY}.git`;
|
const repo3 = `https://${buildParameters.githubToken}@github.com/${process.env.GITHUB_REPOSITORY}.git`;
|
||||||
const purgeRemoteCache = process.env.PURGE_REMOTE_BUILDER_CACHE === undefined;
|
const purgeRemoteCache = process.env.PURGE_REMOTE_BUILDER_CACHE === undefined;
|
||||||
const initializeSourceRepoForCaching = `${this.builderPathFull}/dist/remote-builder/cloneNoLFS.sh ${this.repoPathFull} ${repo3} $GITHUB_SHA ${testLFSFile}`;
|
const initializeSourceRepoForCaching = `${this.builderPathFull}/dist/remote-builder/cloneNoLFS.sh ${this.repoPathFull} ${repo3} $GITHUB_SHA ${testLFSFile}`;
|
||||||
const handleCaching = `${this.builderPathFull}/dist/remote-builder/handleCaching.sh ${this.cacheFolderFull} ${branchName} ${this.libraryFolderFull} ${lfsDirectory} ${purgeRemoteCache}`;
|
const handleCaching = `${this.builderPathFull}/dist/remote-builder/handleCaching.sh ${cacheFolderFull} ${branchName} ${this.libraryFolderFull} ${lfsDirectory} ${purgeRemoteCache}`;
|
||||||
yield this.RemoteBuilderProviderPlatform.runBuildTask(buildUid, 'alpine/git', [
|
yield this.RemoteBuilderProviderPlatform.runBuildTask(buildUid, 'alpine/git', [
|
||||||
` apk update -q
|
` apk update -q
|
||||||
apk add unzip -q
|
apk add unzip -q
|
||||||
|
|
@ -2253,14 +2254,14 @@ class RemoteBuilder {
|
||||||
core.info('Starting part 2/4 (build unity project)');
|
core.info('Starting part 2/4 (build unity project)');
|
||||||
yield this.RemoteBuilderProviderPlatform.runBuildTask(buildUid, baseImage.toString(), [
|
yield this.RemoteBuilderProviderPlatform.runBuildTask(buildUid, baseImage.toString(), [
|
||||||
`
|
`
|
||||||
cp -r /${buildVolumeFolder}/${buildUid}/builder/dist/default-build-script/ /UnityBuilderAction;
|
cp -r "${this.builderPathFull}/dist/default-build-script/" "/UnityBuilderAction"
|
||||||
cp -r /${buildVolumeFolder}/${buildUid}/builder/dist/entrypoint.sh /entrypoint.sh;
|
cp -r "${this.builderPathFull}/dist/entrypoint.sh" "/entrypoint.sh"
|
||||||
cp -r /${buildVolumeFolder}/${buildUid}/builder/dist/steps/ /steps;
|
cp -r "${this.builderPathFull}/dist/steps/" "/steps"
|
||||||
chmod -R +x /entrypoint.sh;
|
chmod -R +x "/entrypoint.sh"
|
||||||
chmod -R +x /steps;
|
chmod -R +x "/steps"
|
||||||
/entrypoint.sh;
|
/entrypoint.sh
|
||||||
`,
|
`,
|
||||||
], `/${buildVolumeFolder}`, `/${buildVolumeFolder}/${buildUid}/${repositoryFolder}/`, [
|
], `/${buildVolumeFolder}`, `/${this.repoPathFull}`, [
|
||||||
{
|
{
|
||||||
name: 'ContainerMemory',
|
name: 'ContainerMemory',
|
||||||
value: buildParameters.remoteBuildMemory,
|
value: buildParameters.remoteBuildMemory,
|
||||||
|
|
@ -2433,7 +2434,6 @@ class RemoteBuilder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RemoteBuilder.SteamDeploy = false;
|
RemoteBuilder.SteamDeploy = false;
|
||||||
RemoteBuilder.cacheFolderFull = `/${buildVolumeFolder}/${cacheFolder}`;
|
|
||||||
exports.default = RemoteBuilder;
|
exports.default = RemoteBuilder;
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -8,11 +8,12 @@ import Kubernetes from './kubernetes-build-platform';
|
||||||
const repositoryFolder = 'repo';
|
const repositoryFolder = 'repo';
|
||||||
const buildVolumeFolder = 'data';
|
const buildVolumeFolder = 'data';
|
||||||
const cacheFolder = 'cache';
|
const cacheFolder = 'cache';
|
||||||
|
const cacheFolderFull = `/${buildVolumeFolder}/${cacheFolder}`;
|
||||||
|
|
||||||
class RemoteBuilder {
|
class RemoteBuilder {
|
||||||
static SteamDeploy: boolean = false;
|
static SteamDeploy: boolean = false;
|
||||||
|
private static readonly remoteBuilderUtilityRepoFolder: string;
|
||||||
private static cacheFolderFull: string = `/${buildVolumeFolder}/${cacheFolder}`;
|
private static readonly remoteBuilderSteamUtilityRepoFolder: string;
|
||||||
private static buildPathFull: string;
|
private static buildPathFull: string;
|
||||||
private static builderPathFull: string;
|
private static builderPathFull: string;
|
||||||
private static steamPathFull: string;
|
private static steamPathFull: string;
|
||||||
|
|
@ -113,7 +114,7 @@ class RemoteBuilder {
|
||||||
|
|
||||||
const purgeRemoteCache = process.env.PURGE_REMOTE_BUILDER_CACHE === undefined;
|
const purgeRemoteCache = process.env.PURGE_REMOTE_BUILDER_CACHE === undefined;
|
||||||
const initializeSourceRepoForCaching = `${this.builderPathFull}/dist/remote-builder/cloneNoLFS.sh ${this.repoPathFull} ${repo3} $GITHUB_SHA ${testLFSFile}`;
|
const initializeSourceRepoForCaching = `${this.builderPathFull}/dist/remote-builder/cloneNoLFS.sh ${this.repoPathFull} ${repo3} $GITHUB_SHA ${testLFSFile}`;
|
||||||
const handleCaching = `${this.builderPathFull}/dist/remote-builder/handleCaching.sh ${this.cacheFolderFull} ${branchName} ${this.libraryFolderFull} ${lfsDirectory} ${purgeRemoteCache}`;
|
const handleCaching = `${this.builderPathFull}/dist/remote-builder/handleCaching.sh ${cacheFolderFull} ${branchName} ${this.libraryFolderFull} ${lfsDirectory} ${purgeRemoteCache}`;
|
||||||
await this.RemoteBuilderProviderPlatform.runBuildTask(
|
await this.RemoteBuilderProviderPlatform.runBuildTask(
|
||||||
buildUid,
|
buildUid,
|
||||||
'alpine/git',
|
'alpine/git',
|
||||||
|
|
@ -230,16 +231,16 @@ class RemoteBuilder {
|
||||||
baseImage.toString(),
|
baseImage.toString(),
|
||||||
[
|
[
|
||||||
`
|
`
|
||||||
cp -r /${buildVolumeFolder}/${buildUid}/builder/dist/default-build-script/ /UnityBuilderAction;
|
cp -r "${this.builderPathFull}/dist/default-build-script/" "/UnityBuilderAction"
|
||||||
cp -r /${buildVolumeFolder}/${buildUid}/builder/dist/entrypoint.sh /entrypoint.sh;
|
cp -r "${this.builderPathFull}/dist/entrypoint.sh" "/entrypoint.sh"
|
||||||
cp -r /${buildVolumeFolder}/${buildUid}/builder/dist/steps/ /steps;
|
cp -r "${this.builderPathFull}/dist/steps/" "/steps"
|
||||||
chmod -R +x /entrypoint.sh;
|
chmod -R +x "/entrypoint.sh"
|
||||||
chmod -R +x /steps;
|
chmod -R +x "/steps"
|
||||||
/entrypoint.sh;
|
/entrypoint.sh
|
||||||
`,
|
`,
|
||||||
],
|
],
|
||||||
`/${buildVolumeFolder}`,
|
`/${buildVolumeFolder}`,
|
||||||
`/${buildVolumeFolder}/${buildUid}/${repositoryFolder}/`,
|
`/${this.repoPathFull}`,
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
name: 'ContainerMemory',
|
name: 'ContainerMemory',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue