-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker.py
More file actions
59 lines (45 loc) · 1.94 KB
/
Copy pathdocker.py
File metadata and controls
59 lines (45 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#
# Copyright (C) 2020-2026 Arm Limited or its affiliates and Contributors. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
"""Plugin for Docker projects."""
import logging
from pathlib import Path
from typing import TYPE_CHECKING, Optional
from continuous_delivery_scripts.utils.definitions import CommitType
from continuous_delivery_scripts.utils.language_specifics_base import (
BaseLanguage,
get_language_from_file_name,
)
if TYPE_CHECKING:
from continuous_delivery_scripts.spdx_report.spdx_project import SpdxProject
logger = logging.getLogger(__name__)
class Docker(BaseLanguage):
"""Specific actions for a Docker project."""
def get_related_language(self) -> str:
"""Gets the related language."""
return get_language_from_file_name(__file__)
def package_software(self, mode: CommitType, version: str) -> None:
"""Todo build docker image."""
super().package_software(mode, version)
def release_package_to_repository(self, mode: CommitType, version: str) -> None:
"""Todo push image to repository e.g. ecr, artifactory."""
super().release_package_to_repository(mode, version)
def check_credentials(self) -> None:
"""Checks any credentials."""
super().check_credentials()
# Todo check ECR or artifactory
def generate_code_documentation(self, output_directory: Path, module_to_document: str) -> None:
"""Generates the code documentation."""
super().generate_code_documentation(output_directory, module_to_document)
# TODO
def can_add_licence_headers(self) -> bool:
"""States that licence headers can be added."""
return True
def can_get_project_metadata(self) -> bool:
"""States whether project metadata can be retrieved."""
return False
def get_current_spdx_project(self) -> Optional["SpdxProject"]:
"""Gets current SPDX description."""
# TODO
return None