parameterize s3
parent
6d80dcf9bf
commit
563193a61f
|
|
@ -5537,12 +5537,15 @@ class SharedWorkspaceLocking {
|
||||||
}
|
}
|
||||||
static DoesWorkspaceTopLevelExist(buildParametersContext) {
|
static DoesWorkspaceTopLevelExist(buildParametersContext) {
|
||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
return ((yield SharedWorkspaceLocking.ReadLines(`aws s3 ls ${SharedWorkspaceLocking.workspaceBucketRoot}`))
|
try {
|
||||||
.map((x) => x.replace(`/`, ``))
|
yield SharedWorkspaceLocking.ReadLines(`aws s3 ls ${SharedWorkspaceLocking.workspaceBucketRoot}`);
|
||||||
.includes(`locks`) &&
|
return (yield SharedWorkspaceLocking.ReadLines(`aws s3 ls ${SharedWorkspaceLocking.workspaceRoot}`))
|
||||||
(yield SharedWorkspaceLocking.ReadLines(`aws s3 ls ${SharedWorkspaceLocking.workspaceRoot}`))
|
|
||||||
.map((x) => x.replace(`/`, ``))
|
.map((x) => x.replace(`/`, ``))
|
||||||
.includes(buildParametersContext.cacheKey));
|
.includes(buildParametersContext.cacheKey);
|
||||||
|
}
|
||||||
|
catch (_a) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
static GetAllLocks(workspace, buildParametersContext) {
|
static GetAllLocks(workspace, buildParametersContext) {
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -23,14 +23,15 @@ export class SharedWorkspaceLocking {
|
||||||
).map((x) => x.replace(`/`, ``));
|
).map((x) => x.replace(`/`, ``));
|
||||||
}
|
}
|
||||||
public static async DoesWorkspaceTopLevelExist(buildParametersContext: BuildParameters) {
|
public static async DoesWorkspaceTopLevelExist(buildParametersContext: BuildParameters) {
|
||||||
return (
|
try {
|
||||||
(await SharedWorkspaceLocking.ReadLines(`aws s3 ls ${SharedWorkspaceLocking.workspaceBucketRoot}`))
|
await SharedWorkspaceLocking.ReadLines(`aws s3 ls ${SharedWorkspaceLocking.workspaceBucketRoot}`);
|
||||||
|
|
||||||
|
return (await SharedWorkspaceLocking.ReadLines(`aws s3 ls ${SharedWorkspaceLocking.workspaceRoot}`))
|
||||||
.map((x) => x.replace(`/`, ``))
|
.map((x) => x.replace(`/`, ``))
|
||||||
.includes(`locks`) &&
|
.includes(buildParametersContext.cacheKey);
|
||||||
(await SharedWorkspaceLocking.ReadLines(`aws s3 ls ${SharedWorkspaceLocking.workspaceRoot}`))
|
} catch {
|
||||||
.map((x) => x.replace(`/`, ``))
|
return false;
|
||||||
.includes(buildParametersContext.cacheKey)
|
}
|
||||||
);
|
|
||||||
}
|
}
|
||||||
public static async GetAllLocks(workspace: string, buildParametersContext: BuildParameters): Promise<string[]> {
|
public static async GetAllLocks(workspace: string, buildParametersContext: BuildParameters): Promise<string[]> {
|
||||||
if (!(await SharedWorkspaceLocking.DoesWorkspaceExist(workspace, buildParametersContext))) {
|
if (!(await SharedWorkspaceLocking.DoesWorkspaceExist(workspace, buildParametersContext))) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue