代码拉取完成,页面将自动刷新
同步操作将从 openEuler/k8s-install 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#! /bin/bash
while getopts "b:" opt; do
case $opt in
b) build_version=$OPTARG ;;
\?) echo "Invalid option: -$OPTARG" >&2; exit 1 ;;
esac
done
if [ -z "$build_version" ]; then
echo "Build version (-b) not specified. Exiting."
exit 1
fi
echo "============ Pull rpm packages ============"
cd rpms/
./init.sh
cd -
echo "============ Pull x86_64 docker images, and save to tar ============"
cd tar-x86_64/
./init.sh
cd -
echo "============ Pull aarch64 docker images, and save to tar ============"
cd tar-aarch64/
./init.sh
cd -
dist=("ctl2" "ctl3")
arch=("x86_64" "aarch64")
# Generate offline tar balls and upload onto repo server
echo "============ Generate offline tar balls and upload onto repo server ============"
rm -rf /tmp/k8s-install-offline
mkdir -p /tmp/k8s-install-offline/rpms
cp -r config k8s-install-offline README.md /tmp/k8s-install-offline
chmod 400 rsync.password
for a in ${arch[@]};do
mkdir -p /tmp/k8s-install-offline/tar-$a
cp tar-$a/*.tar /tmp/k8s-install-offline/tar-$a/
for d in ${dist[@]};do
rm -f /tmp/k8s-install-offline/rpms/*
cp rpms/*.$d.$a.rpm rpms/*.$d.noarch.rpm /tmp/k8s-install-offline/rpms/ >/dev/null 2>&1
cd /tmp
tar zcf k8sinstall-$d-$a.tgz k8s-install-offline/
cd -
rsync --delete --partial -avzuP /tmp/k8sinstall-$d-$a.tgz [email protected]::ctyunos/ctyunos_testing/k8sinstall-$d-$a.tgz --password-file=rsync.password
echo "/tmp/k8sinstall-$d-$a.tgz is published!"
# rm -rf /tmp/k8sinstall-*.tgz
done
rm -rf /tmp/k8s-install-offline/tar-$a
done
rm -rf /tmp/k8s-install-offline
# Retar source code and cherrypick to build branch
echo "============ Retar source code and cherrypick to build branch ============"
git status | grep "nothing to commit"
[[ $? == 0 ]] || (echo "Some git changes still not committed. exit.." && exit)
rm -rf /tmp/k8s-install
mkdir -p /tmp/k8s-install
cp -r config k8s-install /tmp/k8s-install
cd /tmp
tar zcf k8s-install.tgz k8s-install/
cd -
git checkout obsbuild
mv /tmp/k8s-install.tgz .
rpmbuild -bb --define "_sourcedir $(pwd)" *.spec # Just a test
git add .
git commit -m "commit changes into obsbuild branch."
git push
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。