Skip to content

Commit

Permalink
[CPCLOUD-4590] Build RPM package
Browse files Browse the repository at this point in the history
  • Loading branch information
skafandri committed Nov 6, 2024
1 parent 16116c4 commit 3a3044f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@ jobs:
--outdir dist/
- name: Build RPM package
run: python setup.py bdist_rpm
- uses: actions/upload-artifact@v4
with:
name: rpm package
path: build/bdist.linux-x86_64/rpm/SRPMS/*.rpm
- name: Publish distribution 📦 to Test PyPI
if: github.ref == 'refs/heads/master'
uses: pypa/gh-action-pypi-publish@master
Expand Down
7 changes: 2 additions & 5 deletions .spec → agent360.spec
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Summary: 360monitorng agent
Name: %{name}
Version: %{version}
Release: %{release}
Source0: %{name}-%{unmangled_version}.tar.gz
Source: %{name}-%{unmangled_version}.tar.gz
License: BSD-3-Clause
Group: Networking Tools
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Expand Down Expand Up @@ -74,7 +74,7 @@ systemctl daemon-reload
%setup -n %{name}-%{unmangled_version} -n %{name}-%{unmangled_version}

%build
python3 setup.py build
python3 -m build --sdist --wheel --outdir dist/

%install
python3 -m venv $VenvDir && echo -e "\\e[32m [SUCCESS] Virtual environment has been created\\e[m"
Expand All @@ -86,8 +86,5 @@ deactivate
ln -sf $VenvDir/bin/agent360 /usr/local/bin/agent360
ln -sf $VenvDir/bin/hello360 /usr/local/bin/hello360

%clean
rm -rf $RPM_BUILD_ROOT

%files -f INSTALLED_FILES
%defattr(-,root,root)

0 comments on commit 3a3044f

Please sign in to comment.