提交ci流程
This commit is contained in:
35
ci/travis.sh
35
ci/travis.sh
@@ -32,32 +32,19 @@ env | sort
|
||||
: "${NO_EXCEPTION:=OFF}"
|
||||
: "${NO_RTTI:=OFF}"
|
||||
: "${COMPILER_IS_GNUCXX:=OFF}"
|
||||
export VERSION_ID=$(./autorevision.sh -t sh -o version | grep VCS_TAG | sed 's/^.*v//g' | sed 's/"//g')
|
||||
yum install -y golang
|
||||
go version
|
||||
mkdir -p ./rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS}
|
||||
tar -czvf ./rpmbuild/SOURCES/coredump-tools-${VERSION_ID}.tar.gz ../coredump-tools
|
||||
cp ./script/coredump.spec ./rpmbuild/SPECS
|
||||
rpmbuild --define "_version ${VERSION_ID}" --define "_release release" -ba ./rpmbuild/SPECS/coredump.spec
|
||||
|
||||
yum install -y cligen-devel clixon-devel
|
||||
|
||||
if [ -n "${LIBYAML_BUILD}" ]; then
|
||||
git clone https://github.com/yaml/libyaml.git
|
||||
cd libyaml
|
||||
sed -i 's/^add_library.*$/add_library(yaml SHARED ${SRCS})/g' CMakeLists.txt
|
||||
cmake3 .
|
||||
make && make install
|
||||
cd ..
|
||||
fi
|
||||
|
||||
mkdir build || true
|
||||
|
||||
cd build
|
||||
|
||||
cmake3 -DVERSION_DAILY_BUILD=$TESTING_VERSION_BUILD ..
|
||||
|
||||
if [ -n "${PACKAGE}" ]; then
|
||||
make package
|
||||
fi
|
||||
ls -halt ./*.rpm
|
||||
|
||||
if [ -n "${UPLOAD}" ]; then
|
||||
cp ~/rpm_upload_tools.py ./
|
||||
python3 rpm_upload_tools.py ${PULP3_RPM_REPO_NAME} ${PULP3_RPM_DIST_NAME} *.rpm
|
||||
fi
|
||||
# if [ -n "${UPLOAD}" ]; then
|
||||
# cp ~/rpm_upload_tools.py ./
|
||||
# python3 rpm_upload_tools.py ${PULP3_RPM_REPO_NAME} ${PULP3_RPM_DIST_NAME} *.rpm
|
||||
# fi
|
||||
|
||||
|
||||
|
||||
37
script/coredump.spec
Normal file
37
script/coredump.spec
Normal file
@@ -0,0 +1,37 @@
|
||||
Name: coredump-tools
|
||||
Version: {_version}
|
||||
Release: {_release}
|
||||
Summary: tsg's coredump handler and tools
|
||||
Group: Applications/Internet
|
||||
License: GPL
|
||||
URL: https://git.mesalab.cn/linxin/coredump-handler
|
||||
|
||||
|
||||
Source0: coredump-tools-{_version}.tar.gz
|
||||
%define debug_package %{nil}
|
||||
%description
|
||||
This package contains the binary executable for coredump-handler and coredump-tool, as well as its configuration files.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
cd ./coredump-handler
|
||||
go build -o coredump-handler .
|
||||
cd ..
|
||||
cd ./coredump-ctl
|
||||
go build -o coredump-tool .
|
||||
cd ..
|
||||
%install
|
||||
mkdir -p %{buildroot}/etc/coredump-handler
|
||||
mkdir -p %{buildroot}/opt/tsg/coredump
|
||||
cp ./coredump-handler/coredump-handler %{buildroot}/opt/tsg/coredump
|
||||
cp ./config/config.json %{buildroot}/etc/coredump-handler
|
||||
cp ./coredump-ctl/coredump-tool %{buildroot}/opt/tsg/coredump
|
||||
%post
|
||||
echo "export PATH=/opt/tsg/coredump:$PATH" >>~/.bashrc
|
||||
%files
|
||||
%defattr (-,root,root)
|
||||
/etc/coredump-handler/config.json
|
||||
/opt/tsg/coredump/coredump-handler
|
||||
/opt/tsg/coredump/coredump-tool
|
||||
Reference in New Issue
Block a user