Skip to content

Commit 8c04069

Browse files
committed
Adding a docker plugin
1 parent 7235659 commit 8c04069

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
"""Plugin for Docker projects."""
2+
import logging
3+
from pathlib import Path
4+
from typing import Optional
5+
from continuous_delivery_scripts.utils.language_specifics_base import BaseLanguage, get_language_from_file_name
6+
from continuous_delivery_scripts.spdx_report.spdx_project import SpdxProject
7+
8+
logger = logging.getLogger(__name__)
9+
10+
11+
class Docker(BaseLanguage):
12+
"""Specific actions for a Docker project."""
13+
14+
def get_related_language(self) -> str:
15+
"""Gets the related language."""
16+
return get_language_from_file_name(__file__)
17+
18+
def package_software(self) -> None:
19+
"""Todo build docker image."""
20+
super().package_software()
21+
22+
def release_package_to_repository(self) -> None:
23+
"""Todo push image to repository e.g. ecr, artifactory."""
24+
super().release_package_to_repository()
25+
26+
def check_credentials(self) -> None:
27+
"""Checks any credentials."""
28+
super().check_credentials()
29+
# Todo check ECR or artifactory
30+
31+
def generate_code_documentation(self, output_directory: Path, module_to_document: str) -> None:
32+
"""Generates the code documentation."""
33+
super().generate_code_documentation(output_directory, module_to_document)
34+
# TODO
35+
36+
def can_add_licence_headers(self) -> bool:
37+
"""States that licence headers can be added."""
38+
return True
39+
40+
def can_get_project_metadata(self) -> bool:
41+
"""States whether project metadata can be retrieved."""
42+
return False
43+
44+
def get_current_spdx_project(self) -> Optional[SpdxProject]:
45+
"""Gets current SPDX description."""
46+
# TODO
47+
return None

news/20201130101020.feature

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Added a Docker plugin

0 commit comments

Comments
 (0)