You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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:
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?
The text was updated successfully, but these errors were encountered: