代码拉取完成,页面将自动刷新
同步操作将从 anolis/anolis-ci-test 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#!/bin/sh
# Usage:
# export PKG_CI_REPO_URL=<git_repo_url>
# export PKG_CI_REPO_BRANCH=<git_branch>
# export PKG_CI_PR_ID=<pull_request_id>
#
# Notes:
# PKG_CI_REPO_URL is url of the target git repo
# PKG_CI_REPO_BRANCH is branch of the target git repo
#
# #Get help list:
# ./run_package_citest.sh -h
# #Run a single test:
# ./run_package_citest.sh -t check_license
# #Run several tests:
# ./run_package_citest.sh -t check_license -t check_specfile
. ./lib/lib.sh
[ -n "$1" ] || { usage; exit 0; }
# parse args
test_list=""
while getopts "ht:" opt; do
case ${opt} in
t)
test_list="$test_list $OPTARG"
;;
h)
usage && exit 0
;;
\?)
echo "Invalid option: $OPTARG" 1>&2
;;
esac
done
shift $((OPTIND -1))
[ -n "$test_list" ] || die "No test case is specified, use '$0 -t casename'"
# main process
[ -n "$PKG_CI_REPO_URL" ] || die "PKG_CI_REPO_URL is required but not set!"
[ -n "$PKG_CI_REPO_BRANCH" ] || die "PKG_CI_REPO_BRANCH is required but not set!"
[ -n "$PKG_CI_PR_ID" ] || die "PKG_CI_PR_ID is required but not set!"
work_dir=$(readlink -f work_dir)
[ -d "$work_dir" ] || mkdir $work_dir
util_dir=$(readlink -f utils)
pkg_name=$(basename $PKG_CI_REPO_URL .git)
pkg_path="$work_dir/$pkg_name"
pr_branch="pull-request-${PKG_CI_PR_ID}"
ret=0
os_version=$(cat /etc/os-release | grep ID= |awk -F'"' '{print $2}'|xargs)
# if echo $os_version | grep "anolis 23"; then
# # creat_anolis23_build_repo
# create_anolis23_ai_repo
# fi
if echo $os_version | grep "anolis 8"; then
create_anolis8_ai_repo
fi
for t in $test_list; do
echo "====Run Test: $t"
$t
done
exit $ret
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。