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-73282] Run PCT with a Jetty 12 EE 8 test harness when core is Jetty 12 EE 8 #675

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

basil
Copy link
Member

@basil basil commented Jun 20, 2024

See JENKINS-73282. This PR has no effect for trunk, but once core adopts Jetty 12, this will dynamically upgrade the test harness to a Jetty 12 test harness (but only if necessary). The minimum test harness release is https://github.com/jenkinsci/jenkins-test-harness/releases/tag/2230.v4fa_477b_634f4 which supports Jetty 12 EE 8 and EE 9. This will allow plugins to be tested on Jetty 12 in PCT without having to upgrade each plugin's parent POM individually. Of course, once the plugin parent POMs are updated, this will have no effect. Eventually this code can be deleted once all plugins are on a plugin parent POM that includes Jetty 12 in its test harness.

Testing done

Tested with the latest weekly core as well as a Jetty 12 EE 8 core. In the latter case, the test harness was automatically upgraded as expected. Tested interactively in BOM in jenkinsci/bom#3314.

basil added a commit to basil/bom that referenced this pull request Jun 21, 2024
@basil basil marked this pull request as ready for review June 21, 2024 01:52
@basil basil requested a review from a team as a code owner June 21, 2024 01:52
public boolean check(@NonNull BeforeExecutionContext context) {
VersionNumber winstoneVersion = getWinstoneVersion(context.getConfig().getWar());
if (winstoneVersion.getDigitAt(0) < 7) {
return false;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do nothing if Winstone is Jetty 10 …

if (winstoneVersion.getDigitAt(0) < 7) {
return false;
}
return super.check(context);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

… but otherwise invoke the logic in the superclass, which dynamically updates jenkins-test-harness.version to 2230.v4fa_477b_634f4, but only if the current value of the version is older (newer values don't need to be overridden).

Copy link

@MarkEWaite MarkEWaite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@basil basil merged commit 58221e0 into master Jun 21, 2024
14 checks passed
@basil basil deleted the JENKINS-73282 branch June 21, 2024 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants