New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mirror option to speed the download #252
Conversation
@@ -261,7 +264,7 @@ private File getJenkinsWar() throws IOException { | |||
File war = new File(cache, String.format("war/%s/jenkins-war-%s.war", version, version)); | |||
if (!war.exists()) { | |||
war.getParentFile().mkdirs(); | |||
final URL url = new URL(String.format("http://updates.jenkins.io/download/war/%s/jenkins.war", version)); | |||
final URL url = new URL(getMirrorURL(String.format("http://updates.jenkins.io/download/war/%s/jenkins.war", version))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why we use http
instead of https
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our current mirror infrastructure works for HTTP only. For HTTPs you get no mirrors. AFAIK @olblak is exploring replacement options
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#258 as a follow-up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As @oleg-nenashev mention we don't have a very good support of https at the moment and I am working on different initiatives
There is an open Pull Request for https support of http://archives.jenkins-ci.org
I also deployed get.jenkins.io which is not as update as mirror.jenkins.io but instead of using mirrorbrain we switch to mirrorbits so we support https on our mirror infrastructure and it also provides more information like this
Basically the challenges that I am facing now are:
- htacess support, we rely a lot on htacess so I have to switch from nginx to apache or get rid of htacess. I am more considering switch to apache
- Updating artifacts, either we have push or a pull approach
mirror.azure.jenkins.io has a pull approach and update its data every 5minutes - https://get.jenkins.io and the futur https://archives.jenkins.io are configured with a push approach but currently it's taking too long, around 15min for each run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
regarding update-center will probably follow once our mirror infra fully support https
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So if you specify https here, you'll just end up on a HTTP mirror at the moment
bootstrap/src/main/java/io/jenkins/jenkinsfile/runner/bootstrap/Bootstrap.java
Outdated
Show resolved
Hide resolved
…p/Bootstrap.java Co-Authored-By: Oleg Nenashev <o.v.nenashev@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am going to merge it into the master branch. I believe this change is a net improvement
No description provided.