add jaeger
This commit is contained in:
parent
810af70775
commit
d1766bc509
|
@ -0,0 +1,51 @@
|
||||||
|
name: To-To-To Jaeger
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "15 3 * * *"
|
||||||
|
workflow_dispatch:
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Jaeger To-To-To
|
||||||
|
run: |
|
||||||
|
set -x
|
||||||
|
|
||||||
|
source libs/aliyun.sh
|
||||||
|
install_aliyun_ossutil
|
||||||
|
|
||||||
|
initdir=`pwd`
|
||||||
|
|
||||||
|
source ${initdir}/libs/common.sh
|
||||||
|
|
||||||
|
cat ${initdir}/sed/* > ${initdir}/toto.sed
|
||||||
|
|
||||||
|
for project in "https://github.com/jaegertracing/documentation.git"
|
||||||
|
do
|
||||||
|
|
||||||
|
uuid=`date "+%s%N"`
|
||||||
|
workdir="${initdir}/tmp/${uuid}"
|
||||||
|
mkdir -p $workdir
|
||||||
|
|
||||||
|
git clone $project $workdir
|
||||||
|
ls $workdir
|
||||||
|
|
||||||
|
find ./webs -name toto.sh -exec /bin/bash {} $workdir $initdir \;
|
||||||
|
|
||||||
|
src=`cat ${workdir}/ret-data|grep -v ^$|head -n 1|awk -F'&' '{print $1}'`
|
||||||
|
dest=`cat ${workdir}/ret-data|grep -v ^$|head -n 1|awk -F'&' '{print $2}'`
|
||||||
|
|
||||||
|
|
||||||
|
ls -lha $src
|
||||||
|
|
||||||
|
if [ -f "${src}/index.html" ];then
|
||||||
|
echo "=============================================> 构建成功,上传文件到OSS"
|
||||||
|
./ossutil --access-key-id ${{ secrets.ALIYUN_CYG_OSS_AK }} --access-key-secret ${{ secrets.ALIYUN_CYG_OSS_SK }} --endpoint ${{ secrets.ALIYUN_CYG_OSS_ENDPOINT }} --region ${{ secrets.ALIYUN_CYG_OSS_REGION }} cp -fr $src $dest
|
||||||
|
else
|
||||||
|
echo "=============================================> 没有构建出 index.html 文件"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
done
|
3
all.list
3
all.list
|
@ -14,4 +14,5 @@ https://github.com/volcano-sh/website.git
|
||||||
https://github.com/fluxcd/website.git
|
https://github.com/fluxcd/website.git
|
||||||
https://github.com/tikv/website.git
|
https://github.com/tikv/website.git
|
||||||
https://github.com/etcd-io/website.git
|
https://github.com/etcd-io/website.git
|
||||||
https://github.com/coredns/coredns.io.git
|
https://github.com/coredns/coredns.io.git
|
||||||
|
https://github.com/jaegertracing/documentation.git
|
|
@ -40,6 +40,14 @@ install_hugo_v122(){
|
||||||
sudo chmod +x /usr/bin/hugo
|
sudo chmod +x /usr/bin/hugo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install_hugo_v143_1(){
|
||||||
|
echo "=============================================> 安装 Hugo V0.143.1"
|
||||||
|
wget -q https://github.com/gohugoio/hugo/releases/download/v0.143.1/hugo_extended_0.143.1_linux-amd64.tar.gz
|
||||||
|
tar xf hugo_extended_0.143.1_linux-amd64.tar.gz
|
||||||
|
sudo cp ./hugo /usr/bin/
|
||||||
|
sudo chmod +x /usr/bin/hugo
|
||||||
|
}
|
||||||
|
|
||||||
install_hugo_v145(){
|
install_hugo_v145(){
|
||||||
echo "=============================================> 安装 Hugo V0.145.0"
|
echo "=============================================> 安装 Hugo V0.145.0"
|
||||||
wget -q https://github.com/gohugoio/hugo/releases/download/v0.145.0/hugo_extended_0.145.0_linux-amd64.tar.gz
|
wget -q https://github.com/gohugoio/hugo/releases/download/v0.145.0/hugo_extended_0.145.0_linux-amd64.tar.gz
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
https://github.com/coredns/coredns.io.git
|
https://github.com/jaegertracing/documentation.git
|
|
@ -0,0 +1,45 @@
|
||||||
|
workdir=$1
|
||||||
|
initdir=$2
|
||||||
|
|
||||||
|
source ${initdir}/libs/common.sh
|
||||||
|
|
||||||
|
before_jaeger_website(){
|
||||||
|
install_hugo_v143_1
|
||||||
|
install_postcss
|
||||||
|
|
||||||
|
# 添加网站访问统计
|
||||||
|
echo '<script defer src="https://umami.cncfstack.com/script.js" data-website-id="ad128657-afe1-4074-aa5e-279f72db2a62"></script>' >> layouts/partials/favicons.html
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
after_jaeger_website(){
|
||||||
|
|
||||||
|
#command = "make netlify-production-build"
|
||||||
|
|
||||||
|
mkdir output
|
||||||
|
hugo \
|
||||||
|
--destination ./output \
|
||||||
|
--cleanDestinationDir \
|
||||||
|
--minify \
|
||||||
|
--gc \
|
||||||
|
--enableGitInfo \
|
||||||
|
--baseURL https://jaeger.cncfstack.com
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
save_return(){
|
||||||
|
ls -lha
|
||||||
|
echo "${workdir}/output&oss://cncfstack-jaeger" > ${workdir}/ret-data
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
cd $workdir
|
||||||
|
if cat .git/config |grep '/jaegertracing/documentation.git' ;then
|
||||||
|
echo "=============================================> 匹配到 jaeger"
|
||||||
|
before_jaeger_website
|
||||||
|
after_jaeger_website
|
||||||
|
find_and_sed_v2 "./output"
|
||||||
|
save_return
|
||||||
|
fi
|
Loading…
Reference in New Issue