Skip to content

Commit

Permalink
DAG-2237 Change default build variants to required for mongo projects (
Browse files Browse the repository at this point in the history
  • Loading branch information
zituo-jin committed Nov 8, 2022
1 parent 3da2128 commit 6e2d161
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Changelog

## 3.0.6 - 2022-11-07
- Change default build variants to required for mongo projects.

## 3.0.5 - 2022-08-29
- Perform `checkout` by default when branch name is specified.

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "git-co-evg-base"
version = "3.0.5"
version = "3.0.6"
description = "Find a good commit to base your work on"
authors = ["David Bradford <david.bradford@mongodb.com>"]
readme = "README.md"
Expand Down
15 changes: 15 additions & 0 deletions src/goodbase/goodbase_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import json
import logging
import os.path
import re
import sys
from pathlib import Path
from typing import Dict, List, NamedTuple, Optional
Expand Down Expand Up @@ -36,6 +37,7 @@
"inject",
"urllib3",
]
PROJECT_REGEX_TO_DEFAULT_BUILD_VARIANTS = {"mongodb-mongo-.*": [".*-required$"]}


class RevisionInformation(NamedTuple):
Expand Down Expand Up @@ -430,6 +432,19 @@ def main(

if build_variant:
build_variant_checks = build_variant
else:
for (
project_regex,
default_build_variants,
) in PROJECT_REGEX_TO_DEFAULT_BUILD_VARIANTS.items():
if re.match(project_regex, evg_project):
LOGGER.debug(
"Found default build variants for evg project",
evg_project=project_regex,
default_build_variants=default_build_variants,
)
build_variant_checks = default_build_variants
break

build_checks = BuildChecks(build_variant_regex=build_variant_checks)
if pass_threshold is not None:
Expand Down

0 comments on commit 6e2d161

Please sign in to comment.