In my scripted pipeline I want to create a lock that will persists in the global Jenkins configuration, after the pipeline has finished. I tried the following to no avail.
import org.jenkins.plugins.lockableresources.LockableResourcesManager as LRM
lrm = LRM.get()
lrm.createResource("my_lock")
lrm.save()
The lockable resource is ephemeral: It is created and can be used, but it does not persist. I am on Jenkins 2.226 running the Lockable Resources plugin 2.7.