The following plugin provides functionality available through Pipeline-compatible steps. Read more about how to integrate steps into your Pipeline in the Steps section of the Pipeline Syntax page.

For a list of other such plugins, see the Pipeline Steps Reference page.

$class: 'SubversionSCM'

  • $class: 'SubversionSCM'
    Checks out the source code from Subversion repositories. See post-commit hook set up for improved turn-around time and performance in polling.
    • locations
        Array / List of Nested Object
      • remote : String
      • credentialsId : String
      • local : String
        Specify a local directory (relative to the workspace root) where this module is checked out. If left empty, the last path component of the URL is used as the default, just like the svn CLI. A single period (.) may be used to check out the project directly into the workspace rather than into a subdirectory.
      • depthOption : String
        --depth option for checkout and update commands. Default value is infinity.
        • empty includes only the immediate target of the operation, not any of its file or directory children.
        • files includes the immediate target of the operation and any of its immediate file children.
        • immediates includes the immediate target of the operation and any of its immediate file or directory children. The directory children will themselves be empty.
        • infinity includes the immediate target, its file and directory children, its children's children, and so on to full recursion.
        • as-it-is takes the working depth from the current working copy, allows for setting update depth manually using --set-depth option.
        More information can be found here.
      • ignoreExternalsOption : boolean
        "--ignore-externals" option will be used with svn checkout, svn update commands to disable externals definition processing.

        More information can be found here.
        Note: there is the potential to leverage svn:externals to gain read access to the entire Subversion repository. This can happen if you follow the normal practice of giving Jenkins credentials with read access to the entire Subversion repository. You will also need to provide the credentials to use when checking/polling out the svn:externals using the Additional Credentials option.
      • cancelProcessOnExternalsFail : boolean
        Determines if the process should be cancelled when checkout/update svn:externals failed. Will work when "Ignore externals" box is not checked. Default choice is to cancelled the process when checkout/update svn:externals failed.
    • workspaceUpdater
        Nested Choice of Objects
      • $class: 'CheckoutUpdater'
        • $class: 'NoopUpdater'
          • $class: 'UpdateUpdater'
            • $class: 'UpdateWithCleanUpdater'
              • $class: 'UpdateWithRevertUpdater'
              • browser
                  Nested Choice of Objects
                • $class: 'Assembla'
                  • spaceName : String
                • $class: 'BacklogRepositoryBrowser'
                  • url : String
                    Set the project URL of Repository Browser used with this project. Sample of URL are shown below.
                    • https://demo.backlog.jp/projects/DORA

                    When no value is set, project of "Backlog URL" set above is used.

                • $class: 'CollabNetSVN'
                  • url : String
                    The repository browser URL for the root of the project. For example, a Java.net project called myproject would use https://myproject.dev.java.net/source/browse/myproject.
                • $class: 'FishEyeSVN'
                  • url : String
                    Specify the URL of this module in FishEye. (such as http://fisheye6.cenqua.com/browse/ant/)
                  • rootModule : String
                    Specify the root Subversion module that this FishEye monitors. For example, for http://fisheye6.cenqua.com/browse/ant/, this field would be ant because it displays the directory "/ant" of the ASF repo. If FishEye is configured to display the whole SVN repository, leave this field empty.
                • svnPhabricator
                  • url : String
                  • repo : String
                • $class: 'PolarionRepositoryBrowser'
                  • url : String
                  • location : String
                • $class: 'RedmineRepositoryBrowser'
                  • repositoryId : String
                • $class: 'SVNWeb'
                  • url : String
                • $class: 'ScmManagerSvnRepositoryBrowser'
                  • repoUrl : String
                    Specify the root URL serving this repository (such as https://scm-manager.org/scm/repo/namespace/name).
                • $class: 'Sventon'
                  • url : String
                    Specify the URL of the Sventon repository browser. For example, if you normally browse from http://somehost.com/svn/repobrowser.svn?name=local, this field would be http://somehost.com/svn/
                  • repositoryInstance : String
                    Specify the Sventon repository instance name that references this subversion repository. For example, if you normally browse from http://somehost.com/svn/repobrowser.svn?name=local, this field would be local
                • $class: 'Sventon2'
                  • url : String
                    Specify the URL of the Sventon repository browser. For example, if you normally browse from http://somehost.com/svn/repobrowser.svn?name=local, this field would be http://somehost.com/svn/
                  • repositoryInstance : String
                    Specify the Sventon repository instance name that references this subversion repository. For example, if you normally browse from http://somehost.com/svn/repobrowser.svn?name=local, this field would be local
                • $class: 'TeamForge'
                  • connectionFactory
                      Nested Object
                    • url : String

                      This should be the URL of your CollabNet TeamForge site. It should be of the form 'https://forge.collab.net'.

                    • username : String

                      The user who will upload the files.

                    • password : String

                      The password for the user specified above. If incorrectly given, the login to the CollabNet TeamForge server will fail.

                  • project : String
                  • repo : String
                • $class: 'TracRepositoryBrowser'
                  • $class: 'ViewSVN'
                    • url : String
                      Specify the root URL of ViewSVN for this repository (such as this).
                  • $class: 'ViewVCRepositoryBrowser'
                    • url : String
                    • location : String
                  • $class: 'VisualSVN'
                  • $class: 'WebSVN'
                    • url : String
                • excludedRegions : String
                  If set, and Jenkins is set to poll for changes, Jenkins will ignore any files and/or folders in this list when determining if a build needs to be triggered.

                  Each exclusion uses regular expression pattern matching, and must be separated by a new line.

                  	/trunk/myapp/src/main/web/.*\.html
                  	/trunk/myapp/src/main/web/.*\.jpeg
                  	/trunk/myapp/src/main/web/.*\.gif
                    
                  The example above illustrates that if only html/jpeg/gif files have been committed to the SCM a build will not occur.

                  More information on regular expressions can be found here.
                • excludedUsers : String
                  If set, and Jenkins is set to poll for changes, Jenkins will ignore any revisions committed by users in this list when determining if a build needs to be triggered. This can be used to exclude commits done by the build itself from triggering another build, assuming the build server commits the change with a distinct SCM user.

                  Each exclusion uses literal pattern matching, and must be separated by a new line.

                  	 auto_build_user
                    
                  The example above illustrates that if only revisions by "auto_build_user" have been committed to the SCM a build will not occur.
                • excludedRevprop : String
                  If set, and Jenkins is set to poll for changes, Jenkins will ignore any revisions that are marked with the given revision property (revprop) when determining if a build needs to be triggered. This can be used to exclude commits done by the build itself from triggering another build, assuming the build server commits the change with the correct revprop.

                  This type of exclusion only works with Subversion 1.5 servers and newer.

                  More information on revision properties can be found here.
                • excludedCommitMessages : String
                  If set, and Jenkins is set to poll for changes, Jenkins will ignore any revisions with commit messages containing any of the given regular expressions when determining if a build needs to be triggered.
                • includedRegions : String
                  If set, and Jenkins is set to poll for changes, Jenkins will ignore any files and/or folders that are not in this list when determining if a build needs to be triggered.

                  Each inclusion uses regular expression pattern matching, and must be separated by a new line.

                  This is useful when you need to check out an entire resource for building, but only want to do the build when a subset has changed.

                  	/trunk/myapp/c/library1/.*
                  	/trunk/myapp/c/library2/.*
                    
                  If /trunk/myapp is checked out, the build will only occur when there are changes to either the c/library1 and c/library2 subtrees.

                  If there are also excluded regions specified, then a file is not ignored when it is in the included list and not in the excluded list.

                  More information on regular expressions can be found here.
                • ignoreDirPropChanges : boolean
                  If set, Jenkins ignores svn-property only changes of directories. These changes are ignored when determining whether a build should be triggered and are removed from a build's changeset. Main usage of this property is to ignore svn:mergeinfo changes (which would otherwise e.g. lead to a complete rebuild of a maven project, in spite of incremental build option).
                • filterChangelog : boolean
                  If set Jenkins will apply the same inclusion and exclusion patterns for displaying changelog entries as it does for polling for changes. If this is disabled, changes which are excluded for polling are still displayed in the changelog.
                • additionalCredentials

                  If there are additional credentials required in order to obtain a complete checkout of the source, they can be provided here.

                  The realm is how the repository self-identifies to a client. It usually has the following format:

                  <proto://host:port> Realm Name

                  • proto is the protocol, e.g. http or svn.
                  • host is the host how it's accessed by Jenkins, e.g. as IP address 192.168.1.100, host name svnserver, or host name and domain svn.example.org.
                  • port is the port, even if not explicitly specified. By default, this is 80 for HTTP, 443 for HTTPS, 3690 for the svn protocol.
                  • Realm Name is how the repository self-identifies. Common options include VisualSVN Server, Subversion Authentication or the UUID of the repository.

                  To find out the realm, you could do any of the following:

                  • If you access the repository via HTTP or HTTPS: Open the repo in a web browser without saved credentials. It will use the Realm Name (see above) in the authentication dialog.
                  • Use the command line svn program.
                    • If you don't have stored the credentials, run e.g. svn info https://svnserver/repo and it will tell you the realm when asking you to enter a password, e.g.: Authentication realm: <svn://svnserver:3690> VisualSVN Server.
                    • If you have already stored the credentials to access the repository, look for the realm name in one of the files in ~/.subversion/auth/svn/simple; it will be two lines below the line svn:realmstring.
                  • When accessing a repository via the svn+ssh protocol, the realm has the format username@svn+ssh://host:port – note that the username is before the svn+ssh:// (unlike the URL used for normal SVN operations), and that there are no angle brackets and no realm name. For this protocol the default port is 22.

                  Make sure to enter the realm exactly as shown, starting with a < (except for repositories accessed via svn+ssh – see above).

                    Array / List of Nested Object
                  • realm : String
                    This is the realm that the SvnKit library associates with a specific checkout. For most Subversion servers this will typically be of the format <scheme://hostname(:port)> name, while for servers accessed via svn+ssh it is of the format (username@)svn+ssh://hostname(:port).
                  • credentialsId : String
                    Select the credential from the list of relevant credentials in order to use that credential for checking out the source code.
                • quietOperation : boolean

                  Mimics subversion command line --quiet parameter for check out / update operations to help keep the output shorter. Prints nothing, or only summary information.


              • Was this page helpful?

                Please submit your feedback about this page through this quick form.

                Alternatively, if you don't wish to complete the quick form, you can simply indicate if you found this page helpful?

                    


                See existing feedback here.