File python-nautikos.spec of Package python-nautikos

#
# spec file for package python-nautikos
#
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%{?sle15_python_module_pythons}
Name:           python-nautikos
Version:        0.3.4
Release:        0
Summary:        A CD tool for updating image tags in Kubernetes manifests
License:        MIT
URL:            https://www.github.com/janheindejong/nautikos
Source:         https://files.pythonhosted.org/packages/source/n/nautikos/nautikos-%{version}.tar.gz
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module base >= 3.9}
BuildRequires:  %{python_module pip}
BuildRequires:  %{python_module poetry-core}
# https://github.com/janheindejong/nautikos/blob/main/pyproject.toml#L25
BuildRequires:  %{python_module ruamel.yaml >= 0.17.21}
BuildRequires:  %{python_module typer >= 0.7.0}
BuildRequires:  %{python_module pytest}
BuildRequires:  fdupes
# https://github.com/janheindejong/nautikos/blob/main/pyproject.toml#L20
Requires:       python3-ruamel.yaml >= 0.17.21
Requires:       python3-typer >= 0.7.0
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch:      noarch
%python_subpackages

%description

*A lightweight CI/CD tool for updating image tags in Kubernetes manifests.*

A GitOps CI/CD process often uses a deployment or ops repo containing Kubernetes manifests for multiple services and environments. Tools like *Argo-CD* or *Flux* then track these repo's, and apply any changes to the cluster. When a new image of an application is created, you want the corresponding tags to be updated in the manifests housed in the deployment repo. Doing this manually is error prone. Having to write logic in every repo or pipeline to perform this is tedious.

%prep
%autosetup -p1 -n nautikos-%{version}

%build
%pyproject_wheel

%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/nautikos
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%post
%python_install_alternative nautikos

%postun
%python_uninstall_alternative nautikos

%files %{python_files}
%doc README.md
%{python_sitelib}/nautikos
%{python_sitelib}/nautikos-%{version}.dist-info
%python_alternative %{_bindir}/nautikos

%changelog
openSUSE Build Service is sponsored by