launcher-application
launcher-application copied to clipboard
Allow setting the MAVEN_MIRROR_URL
Questions have been asked if our S2I builders can support MAVEN_MIRROR_URL.
It seems the official RH Java S2I builder (registry.access.redhat.com/redhat-openjdk-18/openjdk18-openshift) does indeed. But setting it would be a very manual process that would require manual intervention each time a Booster was launched.
So perhaps we can actually add this to the Launch application itself.
One option would be to add it to the wizard (in the advanced setting section for example). It would be less manual work but it would still require the user to know about mirror urls.
The second option would be to add it to the template we use to create the Launch application. This assumes that the Maven mirror is part and parcel of the chosen OpenShift server. It also means that the list of possible OpenShift servers needs to be extended with an (optional) mirror url.
In both cases the mirror url is very runtime-specific. It can be used for the Spring Boot, WIldfly Swarm and Vert.x runtimes, but not for the NodeJS runtime. But one could imagine that NodeJS might have it's own NPM mirrors that people would like to use. So the chosen solution should take into account that at some point we'd might need several mirror urls.
For node I've been using NPM_MIRROR (supported by the node s2i builder image), and BOWER_MIRROR (which isn't supported, but can be configured in a package.json postinstall hook, e.g.
"scripts": {
"postinstall": "node_modules/.bin/bower --config.registry.search=${BOWER_MIRROR} install"
}
I would like to second this enhancement request. This would make it easier to use Nexus as cache for all new applications by default. And IMHO, to make this really usable there needs to be optional CR field for the default MAVEN_MIRROR_URL value, instead of requiring every user to input it.