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

Jenkins Generator: Allow lightweight checkout option #4580

Closed
AdamBrousseau opened this issue May 16, 2023 · 1 comment · Fixed by #4585
Closed

Jenkins Generator: Allow lightweight checkout option #4580

AdamBrousseau opened this issue May 16, 2023 · 1 comment · Fixed by #4585

Comments

@AdamBrousseau
Copy link
Contributor

Currently, the test job generator uses non-lightweight checkout because of a Jenkins issue when using variables for SCM Repo & Branch fields. This causes the full repo to be cloned to the Controller for each test job, which ends up consuming a great deal of disk space.
This has been partially(?) resolved in JENKINS-42971. As far as I can tell, the solution only works for Branch, not Repo. I have asked for clarification in the issue.
What this means is we can switch to lightweight checkout for all the jobs that don't need a parameterized repo value. I am thinking all generated automatic jobs. Ie. everything except for Grinders etc.
Not sure if it would be beneficial to add a bool to the generator job to toggle lightweight and/or toggle hardcoded repo vs parameter.

llxia added a commit to llxia/openjdk-tests that referenced this issue May 19, 2023
- If LIGHT_WEIGHT_CHECKOUT=true, set Repository URL explicitly and set Branch Specifier as parameter
- If LIGHT_WEIGHT_CHECKOUT=false, set both Repository URL and Branch Specifier as parameter

Once https://issues.jenkins.io/browse/JENKINS-42971 is fully resolved, we should remove LIGHT_WEIGHT_CHECKOUT parameter
as LIGHT_WEIGHT_CHECKOUT=true should always be set.

resolves: adoptium#4580

Signed-off-by: Lan Xia <Lan_Xia@ca.ibm.com>
@llxia
Copy link
Contributor

llxia commented May 19, 2023

Yes, I got the same result. The solution only works for the branch, not the repo.

stderr: fatal: '${ADOPTOPENJDK_REPO}' does not appear to be a git repository
fatal: Could not read from remote repository.

As for the solution, instead of having another bool parameter, we will set Branch Specifier as a parameter regardless. Only set Repository URL explicitly if LIGHT_WEIGHT_CHECKOUT=true. Otherwise, set Repository URL as a parameter. Once https://issues.jenkins.io/browse/JENKINS-42971 is fully resolved, we should remove LIGHT_WEIGHT_CHECKOUT parameter as LIGHT_WEIGHT_CHECKOUT=true should always be set. And both Repository URL Branch Specifier should be set as parameters.

renfeiw pushed a commit that referenced this issue May 24, 2023
- If LIGHT_WEIGHT_CHECKOUT=true, set Repository URL explicitly and set Branch Specifier as parameter
- If LIGHT_WEIGHT_CHECKOUT=false, set both Repository URL and Branch Specifier as parameter

Once https://issues.jenkins.io/browse/JENKINS-42971 is fully resolved, we should remove LIGHT_WEIGHT_CHECKOUT parameter
as LIGHT_WEIGHT_CHECKOUT=true should always be set.

resolves: #4580

Signed-off-by: Lan Xia <Lan_Xia@ca.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants