-
Notifications
You must be signed in to change notification settings - Fork 742
Open
Description
What feature do you want to see added?
There are use cases for being able to export the JCasC config programmatically (for instance identifying changes that have been made in the Jenkins UI), however the docs do not mention how to do so (whereas the reload docs do). There are also other issues (#1373 and #2175) requesting this functionality.
It appears to be possible to export the config from a groovy script using this code:
import io.jenkins.plugins.casc.ConfigurationAsCode
def stream = new ByteArrayOutputStream()
ConfigurationAsCode.get().export(stream)
stream.toString()
The export method is annotated with @Restricted(NoExternalUse.class) which implies this is not intended to be available, however the process appears to work without issue.
Is there any reason not to officially document this process?
Metadata
Metadata
Assignees
Labels
No labels