mirror of
https://github.com/lework/jenkins-update-center.git
synced 2024-11-21 10:05:55 +02:00
3.7 KiB
3.7 KiB
jenkins-update-center
Jenkins mirror update center generator
Update time
Updated daily at 1 AM UTC
Mirror site
- tencent https://mirrors.cloud.tencent.com/jenkins/
- huawei https://mirrors.huaweicloud.com/jenkins/
- tsinghua https://mirrors.tuna.tsinghua.edu.cn/jenkins/
- ustc https://mirrors.ustc.edu.cn/jenkins/
- bit http://mirror.bit.edu.cn/jenkins/
file update-center.json
mirror site speed test
curl -sSL https://cdn.jsdelivr.net/gh/lework/jenkins-update-center/speed-test.sh | bash
Usage mirror site
- Upload custom CA file.
[ ! -d /var/lib/jenkins/update-center-rootCAs ] && mkdir /var/lib/jenkins/update-center-rootCAs
wget https://cdn.jsdelivr.net/gh/lework/jenkins-update-center/rootCA/update-center.crt -O /var/lib/jenkins/update-center-rootCAs/update-center.crt
chown jenkins.jenkins -R /var/lib/jenkins/update-center-rootCAs
- Change Update Site url.
Go to Jenkins
→ Manage Jenkins
→ Manage Plugins
→ Advanced
→ Update Site and submit URL to your https://cdn.jsdelivr.net/gh/lework/jenkins-update-center/updates/tsinghua/update-center.json
Steps to create local mirror of Jenkins update center:
- Clone code:
git clone https://github.com/iamtrump/jenkins-update-center.git
- Generate self-signed certificate:
cd jenkins-update-center
openssl genrsa -out rootCA/update-center.key 2048
openssl req -new -x509 -days 3650 rootCA/update-center.key -out rootCA/update-center.crt
- Rsync into your www root directory:
rsync -avz --delete rsync://rsync.osuosl.org/jenkins/ /var/www/jenkins
- Install dependencies:
yum -y install make gcc automake autoconf python3-devel git
pip install -r requirements.txt
-
Setup mirrors json:
Set your mirror url
# mirrors.json { "localhost": "http://localhost/jenkins/" }
-
Run the following python code:
python3 generator.py
cp localhost/update-center.json /var/www/jenkins/
- Put
update-center.crt
into${JENKINS_HOME}/update-center-rootCAs
folder. - Go to
Jenkins → Manage Jenkins → Manage Plugins → Advanced → Update Site
and submit URL to yourupdate-center.json
.