1
0
mirror of https://github.com/lework/jenkins-update-center.git synced 2024-11-26 18:11:49 +02:00
Jenkins mirror update center generator
Go to file
2020-04-28 01:04:09 +00:00
.github/workflows Create generator.yml 2020-03-05 12:23:50 +08:00
rootCA init 2020-03-05 12:04:10 +08:00
updates This is an github action commit. 2020-04-28 01:04:09 +00:00
generator.py Update generator.py 2020-03-05 13:44:56 +08:00
LICENSE Initial commit 2020-03-05 11:58:11 +08:00
mirrors.json init 2020-03-05 12:04:10 +08:00
README.md Update README.md 2020-03-05 14:18:53 +08:00
requirements.txt add req 2020-03-05 12:10:20 +08:00
speed-test.sh add 2020-03-05 13:37:09 +08:00

jenkins-update-center

GitHub

Jenkins mirror update center generator

Update time

Updated daily at 1 AM UTC

Mirror site

file update-center.json

Site Source CDN
tencent https://raw.githubusercontent.com/lework/jenkins-update-center/master/updates/tencent/update-center.json https://cdn.jsdelivr.net/gh/lework/jenkins-update-center/updates/tencent/update-center.json
huawei https://raw.githubusercontent.com/lework/jenkins-update-center/master/updates/huawei/update-center.json https://cdn.jsdelivr.net/gh/lework/jenkins-update-center/updates/huawei/update-center.json
tsinghua https://raw.githubusercontent.com/lework/jenkins-update-center/master/updates/tsinghua/update-center.json https://cdn.jsdelivr.net/gh/lework/jenkins-update-center/updates/tsinghua/update-center.json
ustc https://raw.githubusercontent.com/lework/jenkins-update-center/master/updates/ustc/update-center.json https://cdn.jsdelivr.net/gh/lework/jenkins-update-center/updates/ustc/update-center.json
bit https://raw.githubusercontent.com/lework/jenkins-update-center/master/updates/bit/update-center.json https://cdn.jsdelivr.net/gh/lework/jenkins-update-center/updates/bit/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

  1. 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
  1. Change Update Site url.

Go to JenkinsManage JenkinsManage PluginsAdvanced → 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:

  1. Clone code:
git clone https://github.com/iamtrump/jenkins-update-center.git 
  1. 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
  1. Rsync into your www root directory:
rsync -avz --delete rsync://rsync.osuosl.org/jenkins/ /var/www/jenkins
  1. Install dependencies:
yum -y install make gcc automake autoconf python3-devel git
pip install -r requirements.txt
  1. Setup mirrors json:

    Set your mirror url

    # mirrors.json
    {
        "localhost": "http://localhost/jenkins/"
    }
    
  2. Run the following python code:

python3 generator.py
cp localhost/update-center.json /var/www/jenkins/
  1. Put update-center.crt into ${JENKINS_HOME}/update-center-rootCAs folder.
  2. Go to Jenkins → Manage Jenkins → Manage Plugins → Advanced → Update Site and submit URL to your update-center.json.