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

Rewrite to native systemd #1035

Merged
merged 8 commits into from
May 3, 2022
Merged

Rewrite to native systemd #1035

merged 8 commits into from
May 3, 2022

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Mar 28, 2022

This takes a stab at rewriting to use Jenkins' 2.332 native systemd file. While writing this I found out several other issues with the test suite. It still isn't passing, but this is submitted to share my progress.

Several changes can be merged already and can be split off.

@sbeaulie
Copy link

Are you planning to support both versions <2.332 (with module's systemd) and >2.332 (with jenkins packaged systemd) or would we release this module only for the newer jenkins versions?

@ekohl
Copy link
Member Author

ekohl commented Apr 4, 2022

I think just release it for the newer Jenkins. Perhaps release it as a new major release after such a long time.

@ekohl
Copy link
Member Author

ekohl commented Apr 4, 2022

(last push was just a trivial rebase)

@ekohl ekohl marked this pull request as ready for review May 3, 2022 14:51
@ekohl ekohl marked this pull request as draft May 3, 2022 14:52
ekohl added 7 commits May 3, 2022 18:08
For the OS families where a template was provided now default to using
systemd and we don't test with sysvinit.

This drops the ability to smoothly transition from sysvinit to systemd,
but that's not really important.  Very few users will switch their
system from sysvinit to systemd and if they do, it's a bigger upgrade
anyway.

It doesn't implement any cleanup since it's not expected to be present.
Without this systemd refuses to start.
I can't quite make out how this was ever true. Looking at
cfb33ef the location was always
$libdir/jenkins-cli.jar.

Since 5ef894f unzip is no longer
needed.
The latest versions are publishedd as hpi, which is the default for
jenkins::plugin.
Without these plugins the plugin purging removes too much.
Jenkins 2.332 started to include a systemd unit file which means we can
greatly simplify this module. It aligns all distros on a single
standard.

No attempt is made at supporting Jenkins < 2.332 but the old override
file is cleaned up.
@ekohl
Copy link
Member Author

ekohl commented May 3, 2022

Includes #1038. The test suite isn't green yet, mostly because of plugins. In particular, the latest credentials plugin requires a newer-than-LTS version which breaks a lot of tests.

@ekohl ekohl marked this pull request as ready for review May 3, 2022 16:19
@ekohl
Copy link
Member Author

ekohl commented May 3, 2022

Thinking more about this, I'm leaning to switching CI to non-LTS for now.

@ekohl ekohl linked an issue May 3, 2022 that may be closed by this pull request
@ekohl
Copy link
Member Author

ekohl commented May 3, 2022

I added sufficient workarounds that I now expect the tests to pass. However, I didn't run them locally so no guarantees.

@ekohl
Copy link
Member Author

ekohl commented May 3, 2022

Ok, the non-LTS fix I tried doesn't work because the modulesync is too old. I'm going to merge this as is now and then do a fresh modulesync.

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.

Does no longer work with jenkins 2.332.1 or 2.335 onwards
3 participants