Empty circleci config (#23913)
* Try easy first * Add an empty job * Fix name * Fix method
This commit is contained in:
@@ -36,6 +36,17 @@ COMMON_PYTEST_OPTIONS = {"max-worker-restart": 0, "dist": "loadfile", "s": None}
|
|||||||
DEFAULT_DOCKER_IMAGE = [{"image": "cimg/python:3.8.12"}]
|
DEFAULT_DOCKER_IMAGE = [{"image": "cimg/python:3.8.12"}]
|
||||||
|
|
||||||
|
|
||||||
|
class EmptyJob:
|
||||||
|
job_name = "empty"
|
||||||
|
|
||||||
|
def to_dict(self):
|
||||||
|
return {
|
||||||
|
"working_directory": "~/transformers",
|
||||||
|
"docker": copy.deepcopy(DEFAULT_DOCKER_IMAGE),
|
||||||
|
"steps":["checkout"],
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
class CircleCIJob:
|
class CircleCIJob:
|
||||||
name: str
|
name: str
|
||||||
@@ -573,7 +584,8 @@ def create_circleci_config(folder=None):
|
|||||||
if os.path.exists(repo_util_file) and os.path.getsize(repo_util_file) > 0:
|
if os.path.exists(repo_util_file) and os.path.getsize(repo_util_file) > 0:
|
||||||
jobs.extend(REPO_UTIL_TESTS)
|
jobs.extend(REPO_UTIL_TESTS)
|
||||||
|
|
||||||
if len(jobs) > 0:
|
if len(jobs) == 0:
|
||||||
|
jobs = [EmptyJob()]
|
||||||
config = {"version": "2.1"}
|
config = {"version": "2.1"}
|
||||||
config["parameters"] = {
|
config["parameters"] = {
|
||||||
# Only used to accept the parameters from the trigger
|
# Only used to accept the parameters from the trigger
|
||||||
|
|||||||
Reference in New Issue
Block a user