Skip to content

Commit

Permalink
Disable running prebuilds without a project
Browse files Browse the repository at this point in the history
  • Loading branch information
jankeromnes committed Nov 29, 2022
1 parent 0bfd9b0 commit f8d3bde
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/gitpod-protocol/src/protocol.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1127,7 +1127,7 @@ export interface WithCommitHistory {

export interface StartPrebuildContext extends WorkspaceContext, WithCommitHistory {
actual: WorkspaceContext;
project?: Project;
project: Project;
branch?: string;
}

Expand Down
5 changes: 5 additions & 0 deletions components/server/ee/src/prebuilds/prebuild-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ export class PrebuildManager {
if (user.blocked) {
throw new Error(`Blocked users cannot start prebuilds (${user.name})`);
}
if (!project) {
throw new Error(
`Running prebuilds without a project is no longer supported. Please add '${cloneURL}' as a project in a Gitpod team.`,
);
}
const existingPB = await this.findNonFailedPrebuiltWorkspace({ span }, cloneURL, commitSHAIdentifier);

// If the existing prebuild is failed, it will be retriggered in the afterwards
Expand Down

0 comments on commit f8d3bde

Please sign in to comment.