CI上传YUM仓库

支持tcmall
This commit is contained in:
fengweihao
2020-09-23 14:26:20 +08:00
parent 502626e550
commit a9f38024f0
5 changed files with 31 additions and 15 deletions

View File

@@ -2,7 +2,7 @@ image: "git.mesalab.cn:7443/mesa_platform/build-env:master"
variables:
GIT_STRATEGY: "clone"
BUILD_PADDING_PREFIX: /tmp/padding_for_CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX_PREFIX_PREFIX_PREFIX_PREFIX_PREFIX/
INSTALL_PREFIX: "/home/tsg/verify-policy"
INSTALL_PREFIX: "/opt/tsg/verify-policy"
TESTING_VERSION_BUILD: 0
stages:
@@ -76,8 +76,8 @@ release_build_release:
BUILD_TYPE: RelWithDebInfo
PACKAGE: 1
UPLOAD: 1
PULP3_REPO_NAME: verify-policy-stable-x86_64.el7
PULP3_DIST_NAME: verify-policy-stable-x86_64.el7
PULP3_REPO_NAME: tsg-stable-x86_64.el7
PULP3_DIST_NAME: tsg-stable-x86_64.el7
extends: .build_by_travis
artifacts:
name: "verify-policy-$CI_COMMIT_REF_NAME-release"
@@ -93,8 +93,9 @@ release_build_release_devel:
ENABLE_DEVEL_SWITCH: "ON"
PACKAGE: 1
UPLOAD: 1
PULP3_REPO_NAME: verify-policy-stable-x86_64.el7
PULP3_DIST_NAME: verify-policy-stable-x86_64.el7
SYMBOL_TARGET: verify-policy
PULP3_REPO_NAME: tsg-stable-x86_64.el7
PULP3_DIST_NAME: tsg-stable-x86_64.el7
extends: .build_by_travis
artifacts:
name: "verify-policy-$CI_COMMIT_REF_NAME-release"

View File

@@ -50,13 +50,12 @@ if [ -n "${PACKAGE}" ]; then
make package
fi
#if [ -n "${UPLOAD}" ]; then
#cp ~/rpm_upload_tools.py ./
#python3 rpm_upload_tools.py ${PULP3_REPO_NAME} ${PULP3_DIST_NAME} *.rpm
#fi
#if [ -n "${UPLOAD_SYMBOL_FILES}" ]; then
# rpm -i tfe*debuginfo*.rpm
# cp /usr/lib/debug/opt/tsg/tfe/bin/tfe.debug /tmp/tfe.debuginfo.${CI_COMMIT_SHORT_SHA}
# sentry-cli upload-dif -t elf /tmp/tfe.debuginfo.${CI_COMMIT_SHORT_SHA}
#fi
if [ -n "${UPLOAD}" ]; then
cp ~/rpm_upload_tools.py ./
python3 rpm_upload_tools.py ${PULP3_REPO_NAME} ${PULP3_DIST_NAME} *.rpm
rpm -i $SYMBOL_TARGET*debuginfo*.rpm
_symbol_file=`find /usr/lib/debug/ -name "$SYMBOL_TARGET*.debug"`
cp $_symbol_file ${_symbol_file}info.${CI_COMMIT_SHORT_SHA}
sentry-cli upload-dif -t elf ${_symbol_file}info.${CI_COMMIT_SHORT_SHA}
fi

View File

@@ -11,5 +11,6 @@ target_link_libraries(verify-policy pthread dl
libevent-static
MESA_handle_logger
MESA_prof_load
gperftools-static
cjson)

15
vendor/CMakeLists.txt vendored
View File

@@ -55,6 +55,21 @@ add_dependencies(gmock googletest)
set_property(TARGET gmock PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/libgmock.a)
set_property(TARGET gmock PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include)
### gperftools
ExternalProject_Add(gperftools
PREFIX gperftools
URL ${CMAKE_CURRENT_SOURCE_DIR}/gperftools-2.7.tar.gz
URL_MD5 c6a852a817e9160c79bdb2d3101b4601
CONFIGURE_COMMAND ./configure --prefix=<INSTALL_DIR> --disable-shared
BUILD_IN_SOURCE 1)
ExternalProject_Get_Property(gperftools INSTALL_DIR)
file(MAKE_DIRECTORY ${INSTALL_DIR}/include)
add_library(gperftools-static STATIC IMPORTED GLOBAL)
add_dependencies(gperftools-static gperftools)
set_property(TARGET gperftools-static PROPERTY IMPORTED_LOCATION ${INSTALL_DIR}/lib/libtcmalloc.a)
set_property(TARGET gperftools-static PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${INSTALL_DIR}/include)
### MESA Framework
# Consider the MESA Framework is installed in the system. We declare a imported target instead of

BIN
vendor/gperftools-2.7.tar.gz vendored Normal file

Binary file not shown.