Setup a custom update center and absolute URLs in update-center.json

442 views
Skip to first unread message

Martin d'Anjou

unread,
Jan 28, 2021, 6:01:12 PM1/28/21
to Jenkins Infrastructure
Hello,

In the update-center.json file, it is full of absolute URLs for the plugin download links. So if I setup a custom update center, a mirror if you will, do I have to re-write all those URLs to point to my update center?

Example:

Thanks,
Martin

Olblak

unread,
Jan 30, 2021, 4:46:24 AM1/30/21
to Jenkins Infrastructure
the update center and the mirror are two different things. the update center tells you what is available and where. In the case of the Jenkins project, it redirect you to get.jenkins.io which then redirect you to the closer mirror that contains what you need. If you rebuild your update center, you would be able to redefine those absolute URL, to redirect to the location you want, let say a specific mirror
--
You received this message because you are subscribed to the Google Groups "Jenkins Infrastructure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkins-infr...@googlegroups.com.

Martin d'Anjou

unread,
Jan 30, 2021, 9:30:09 AM1/30/21
to Jenkins Infrastructure
Can you please define for me what "update center" means? Is it the update-center.json file (which is not a json file but rather json wrapped in something)? Or is it something more elaborate?

Thanks,
Martin

Gavin Mogan

unread,
Jan 31, 2021, 3:46:24 AM1/31/21
to Jenkins Infrastructure
Its not really more elaborate. Update center is the script that powers update-center.json (wrapped) and update-center.actual.json (unwrapped). The file is signed so plugin manager in jenkins can verify the data (I don't know how it works, i just know it does).

You can run your own update center.There's some instructions at https://github.com/jenkins-infra/update-center2/#preparing-local-execution. You'll be able to override what you want, including download urls.

An other option would be to write some sort of lamba style service that takes in the update-center.actual.json file, removes the signing, and replaces the downloads link to whatever your preference is.

Gavin

Reply all
Reply to author
Forward
0 new messages