0

I am planning to update all Jenkins plugins URLs to point to an internal host instead of existing open source urls. I cannot find any function in python-jenkins API to do so.

{'active': True, 'backupVersion': None, 'bundled': False, 'deleted': False, 'dependencies': [{'optional': True, 'shortName': 'sshd', 'version': '3.0.1'}], 'detached': False, 'downgradable': False, 'enabled': True, 'hasUpdate': True, 'longName': 'Popper.js 2 API Plugin', 'minimumJavaVersion': '1.8', 'pinned': False, 'requiredCoreVersion': '2.263.1', 'shortName': 'popper2-api', 'supportsDynamicLoad': 'YES', 'url': 'https://plugins.jenkins.io/popper2-api', 'version': 2.5.4-3}

For example, I would like to update the plugin update URL for the above plugin[which I got from get_plugin_info() via python-jenkins API] from https://plugins.jenkins.io/popper2-api to https://my_internal_jenkins_plugins.com/popper2-api

So is there any way to do so via python-jenkins API or is there any curl or other method available for doing it?

zester
  • 165
  • 3
  • 12
  • Why would you not just update the [updates site reference](https://www.jenkins.io/templates/updates/); *Manage Jenkins » Manage Plugins » Advanced* ? – Ian W Jan 25 '22 at 07:16
  • There are hundreds of plugins. Doing that manually would take alot of time. – zester Jan 25 '22 at 07:19
  • 1
    It's ONE update site, one URL, nor one url per plugin. They all come from the same site. – Ian W Jan 25 '22 at 07:37
  • But how do I create a json file like update-center.json which is there in https://updates.jenkins.io/update-center.json for my own host url? – zester Jan 25 '22 at 08:25
  • You google [Jenkins custom update site](https://www.google.com/search?q=jenkins+custom+update+site) and follow the instructions. Or reinvent the wheel. – Ian W Jan 25 '22 at 08:48

0 Answers0