diff --git a/src/otomi-stack.ts b/src/otomi-stack.ts index 5bf07125..f3779502 100644 --- a/src/otomi-stack.ts +++ b/src/otomi-stack.ts @@ -1397,6 +1397,10 @@ export default class OtomiStack { } async createAplBuild(teamId: string, data: AplBuildRequest): Promise { + const tekton = this.getApp('tekton') + const harbor = this.getApp('harbor') + if (!tekton?.values?.enabled || !harbor?.values?.enabled) + throw new ForbiddenError('Tekton and Harbor need to be enabled, cannot create container image') const buildName = `${data?.spec?.imageName}-${data?.spec?.tag}` if (data.spec.secretName && data.spec.secretName.length < 2) throw new ValidationError('Secret name must be at least 2 characters long')