-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2127 from SUSE/helm_version_check
Helm version check
- Loading branch information
Showing
4 changed files
with
51 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
"""BCI Container definition for the helm container.""" | ||
|
||
from bci_build.container_attributes import SupportLevel | ||
from bci_build.os_version import ALL_NONBASE_OS_VERSIONS | ||
from bci_build.os_version import CAN_BE_LATEST_OS_VERSION | ||
from bci_build.package import ApplicationStackContainer | ||
from bci_build.package import ParseVersion | ||
from bci_build.package import Replacement | ||
from bci_build.package.helpers import generate_from_image_tag | ||
from bci_build.package.helpers import generate_package_version_check | ||
from bci_build.package.versions import format_version | ||
from bci_build.package.versions import get_pkg_version | ||
|
||
HELM_CONTAINERS = [ | ||
ApplicationStackContainer( | ||
name="helm", | ||
pretty_name="Kubernetes Package Manager", | ||
os_version=os_version, | ||
is_latest=os_version in CAN_BE_LATEST_OS_VERSION, | ||
version="%%helm_version%%", | ||
tag_version=format_version( | ||
helm_ver := get_pkg_version("helm", os_version), ParseVersion.MINOR | ||
), | ||
additional_versions=[ | ||
format_version(helm_ver, ParseVersion.MAJOR), | ||
], | ||
from_target_image=generate_from_image_tag(os_version, "bci-micro"), | ||
build_stage_custom_end=generate_package_version_check( | ||
"helm", helm_ver, ParseVersion.MINOR, use_target=True | ||
), | ||
version_in_uid=False, | ||
license="Apache-2.0", | ||
package_list=[ | ||
"ca-certificates-mozilla", | ||
"helm", | ||
], | ||
replacements_via_service=[ | ||
Replacement( | ||
regex_in_build_description="%%helm_version%%", | ||
package_name="helm", | ||
parse_version=ParseVersion.PATCH, | ||
) | ||
], | ||
entrypoint=["/usr/bin/helm"], | ||
cmd=["help"], | ||
support_level=SupportLevel.L3, | ||
) | ||
for os_version in ALL_NONBASE_OS_VERSIONS | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters