Skip to content

Commit

Permalink
Merge branch 'main' into mkdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
tobybellwood committed Sep 21, 2023
2 parents afe0f8a + 123c9ee commit eccf0d8
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ pipeline {
steps {
retry(3) {
sh script: 'docker login -u amazeeiojenkins -p $PASSWORD', label: "Docker login"
sh script: "make -O publish-testlagoon-images PUBLISH_PLATFORM_ARCH=linux/arm64,linux/amd64 BRANCH_NAME=${SAFEBRANCH_NAME}", label: "Publishing built images"
sh script: "timeout 12m make -O publish-testlagoon-images PUBLISH_PLATFORM_ARCH=linux/arm64,linux/amd64 BRANCH_NAME=${SAFEBRANCH_NAME}", label: "Publishing built images"
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion services/api/src/resources/environment/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ export const addOrUpdateEnvironment: ResolverFn = async (
// check the environment quota, this prevents environments being added directly via the api
const curEnvs = await organizationHelpers(sqlClientPool).getEnvironmentsByOrganizationId(projectOpenshift.organization)
const curOrg = await organizationHelpers(sqlClientPool).getOrganizationById(projectOpenshift.organization)
if (curEnvs.length >= curOrg.quotaEnvironment) {
if (curEnvs.length >= curOrg.quotaEnvironment && curOrg.quotaEnvironment != -1) {
throw new Error(
`Environment would exceed organization environment quota: ${curEnvs.length}/${curOrg.quotaEnvironment}`
);
Expand Down
2 changes: 1 addition & 1 deletion services/api/src/resources/group/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ export const addGroup: ResolverFn = async (
}
}

if (groupCount >= organizationData.quotaGroup) {
if (groupCount >= organizationData.quotaGroup && organizationData.quotaGroup != -1) {
throw new Error(
`This would exceed this organizations group quota; ${groupCount}/${organizationData.quotaGroup}`
);
Expand Down
2 changes: 1 addition & 1 deletion services/api/src/resources/notification/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const checkOrgNotificationPermission = async (hasPermission, input) => {
});

const orgNotifications = await organizationHelpers(sqlClientPool).getNotificationsForOrganizationId(input.organization);
if (orgNotifications.length >= organizationData.quotaNotification) {
if (orgNotifications.length >= organizationData.quotaNotification && organizationData.quotaNotification != -1) {
throw new Error(
`This would exceed this organizations notification quota; ${orgNotifications.length}/${organizationData.quotaNotification}`
);
Expand Down
2 changes: 1 addition & 1 deletion services/api/src/resources/project/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ export const addProject = async (
// check the project quota before adding the project
const organization = await organizationHelpers(sqlClientPool).getOrganizationById(input.organization);
const projects = await organizationHelpers(sqlClientPool).getProjectsByOrganizationId(input.organization);
if (projects.length >= organization.quotaProject) {
if (projects.length >= organization.quotaProject && organization.quotaProject != -1) {
throw new Error(
`This would exceed this organizations project quota; ${projects.length}/${organization.quotaProject}`
);
Expand Down

0 comments on commit eccf0d8

Please sign in to comment.