Skip to content
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

War downloaded and exploded every time #594

Open
cdupont opened this issue Nov 26, 2021 · 4 comments
Open

War downloaded and exploded every time #594

cdupont opened this issue Nov 26, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@cdupont
Copy link

cdupont commented Nov 26, 2021

I use V1.0-beta30.
I get this for every invocation of jenkinsfile-runner:

$ jenkinsfile-runner                                                                            
No explicit version has been selected, using latest LTS                                                                                                                                                     
Running pipeline on jenkins 2.303.3                                         
Downloading jenkins 2.303.3...                                                                                                                                                                              
Following redirect...                                                                                                                                                                                       
Exploding /home/cdupont/.jenkinsfile-runner/war/2.303.3/jenkins-war-2.303.3.war, this might take some time. 

Is it possible to cache the exploded war to save on time?

@cdupont cdupont added the bug Something isn't working label Nov 26, 2021
@dudil
Copy link

dudil commented Jan 4, 2022

Hi @cdupont - just a fellow developer (not maintainer here).
as a workaround you can explode manually the files before the first run and it will be cached,

I am using a docker and prepared a custom Dockerfile where:
It is including the following line (was taken from various examples)

# We need to explode the jenkins.war for JFR
RUN cd /usr/share/jenkins && jar -xvf jenkins.war

If you are not using docker you can just run that on your machine

I hope it helps 🙏

@paullewisn
Copy link

paullewisn commented Jun 24, 2022

Maybe help for a future reader, obvious, but something I initially overlooked:

After you have exploded the war file, this path needs to be supplied to the -w switch.

$ jenkinsfile-runner  -w /path/to/exploded/files/

@oleg-nenashev
Copy link
Member

I am not sure the auto-download feature should be kept as a default behavior. The current Java implementation is less efficient than wget/curl. It makes sense to keep it, but behind an --autodownload flag

@thisisatestuseraccount
Copy link

Manually downloading and decompressing the WAR is more effort than specifying a Jenkins version, but it seems necessary to skip a long download and extraction process. Would it be more user friendly to cache the extracted directory per Jenkins version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants