From ffc1b76ca7339165b45277e7e7f5de1ce596e6dd Mon Sep 17 00:00:00 2001 From: Mark Waite Date: Wed, 22 Nov 2023 19:34:24 -0700 Subject: [PATCH] Add global configuration as code example --- README.adoc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/README.adoc b/README.adoc index 4584dbd735..89c03c6f2b 100644 --- a/README.adoc +++ b/README.adoc @@ -426,7 +426,31 @@ If the workspace is removed, the tag that was applied is lost. Tagging a workspace made sense when using centralized repositories that automatically applied the tag to the centralized repository. Applying a git tag in an agent workspace doesn't have many practical uses. +[#configuration-as-code] +=== Configuration as code + +The global settings of the git plugin can be defined with the Jenkins link:https://plugins.jenkins.io/configuration-as-code/[configuration as code plugin]. +Detailed descriptions of the individual settings are available in the link:#global-configuration[global configuration settings] section of this document. + +An example configuration might look like this: + +[,yaml] +---- +unclassified: + scmGit: + addGitTagAction: false + allowSecondFetch: false + createAccountBasedOnEmail: false + disableGitToolChooser: false + globalConfigEmail: "jenkins-user@example.com" + globalConfigName: "jenkins-user" + hideCredentials: false + showEntireCommitSummaryInChanges: true + useExistingAccountWithSameEmail: false +---- + [#security-configuration] + === Security Configuration image:/images/git-security-configuration.png[Security Configuration]