{"id":25441969,"url":"https://github.com/jenkinsci/scm-manager-plugin","last_synced_at":"2025-07-12T07:03:02.463Z","repository":{"id":37256591,"uuid":"242765719","full_name":"jenkinsci/scm-manager-plugin","owner":"jenkinsci","description":"Provides support for the source code management tool SCM-Manager. Tracks your Git, SVN, or Hg repositories individually or in namespaces.","archived":false,"fork":false,"pushed_at":"2025-02-13T10:49:51.000Z","size":1487,"stargazers_count":8,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T14:11:14.150Z","etag":null,"topics":["git","jenkins","jenkins-plugin","mercurial","scm","scm-manager","svn"],"latest_commit_sha":null,"homepage":"https://scm-manager.org","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jenkinsci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-24T15:03:04.000Z","updated_at":"2025-04-04T04:18:36.000Z","dependencies_parsed_at":"2024-02-20T08:27:27.438Z","dependency_job_id":"a87146b7-4328-4518-bd8a-143243281222","html_url":"https://github.com/jenkinsci/scm-manager-plugin","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/jenkinsci/scm-manager-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fscm-manager-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fscm-manager-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fscm-manager-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fscm-manager-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jenkinsci","download_url":"https://codeload.github.com/jenkinsci/scm-manager-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fscm-manager-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264952003,"owners_count":23687995,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["git","jenkins","jenkins-plugin","mercurial","scm","scm-manager","svn"],"created_at":"2025-02-17T13:16:13.414Z","updated_at":"2025-07-12T07:03:02.444Z","avatar_url":"https://github.com/jenkinsci.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SCM-Manager Plugin\n[![Build Status](https://ci.jenkins.io/buildStatus/icon?job=Plugins%2Fscm-manager-plugin%2Fmaster)](https://ci.jenkins.io/job/Plugins/job/scm-manager-plugin/job/master/)\n[![License](https://img.shields.io/github/license/jenkinsci/github-plugin.svg)](LICENSE)\n\n\u003cbr /\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://www.scm-manager.org/\"\u003e\n    \u003cimg src=\"docs/assets/logo.webp\" alt=\"Logo\" width=\"327\" height=\"80\"\u003e\n  \u003c/a\u003e\n\n\u003ch3 align=\"center\"\u003eSCM-Manager Plugin\u003c/h3\u003e\n\n  \u003cp align=\"center\"\u003e\n    Integrate your repositories from different SCM with this plugin!\n  \u003c/p\u003e\n    \u003cp\u003e\u003cb\u003eNote:\u003c/b\u003e This plugin requires SCM-Manager in order to be useful. Feel free to check it out in case you haven't been used to it yet.\u003c/p\u003e\n    \u003ca href=\"https://www.scm-manager.org/download/\"\u003e\u003cstrong\u003eDownload/Install latest SCM-Manager version »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/jenkinsci/scm-manager-plugin/blob/master/docs/de/index.md\"\u003eDocumentation in German\u003c/a\u003e\n\u003c/div\u003e\n\n## Requirements\n\nFor full functionality, this plugin requires SCM-Manager v3 (see above) with an installed\n[Jenkins plugin](https://www.scm-manager.org/plugins/scm-jenkins-plugin/) for the triggers and the\n[CI plugin](https://www.scm-manager.org/plugins/scm-ci-plugin/) to show the build results inside SCM-Manager. To create\nSSH connection between Jenkins and SCM-Manager, you can use the\n[SSH plugin](https://www.scm-manager.org/plugins/scm-ssh-plugin/).\n\n## Description\nThis plugin gives various ways to connect your SCM-Manager with Jenkins, like sending build status, multibranch\npipelines, folders for complete namespaces, and navigation items.\n\n### Build Status\nOnce the plugin is installed, it will automatically detect whether any jobs have configured an scm pointing to an instance of an SCM-Manager. \nIf such a build job starts, the plugin will send the `PENDING` state for the checkout revision to SCM-Manager. \nAfter the build is complete, the plugin will send the resulting state to SCM-Manager (`SUCCESS`, `UNSTABLE` or `FAILURE`).\n\n### Multibranch Pipelines\nFor multibranch pipelines, there is a new branch source named \"SCM-Manager\". \nYou can create pipelines in Jenkins that can find branches, tags, and pull requests in SCM-Manager hosted repositories on their own. \nIn cooperation with the [Jenkins plugin](https://www.scm-manager.org/plugins/scm-jenkins-plugin/) in SCM-Manager, the Jenkins CI server will receive hooks on every change and trigger new builds.\nTo remove stale jobs like for no longer available repositories, you can manually execute \"Scan Namespace Now\".\n\nTo create such a pipeline, select \"New Item\" on the Jenkins top level page, then enter a name and select \"Multibranch\nPipeline\".\n\n![How to select a multibranch pipeline](docs/assets/select-multibranch-pipeline.png)\n\nIn the configuration form for this item, select the matching \"SCM-Manager\" entry for your repository type in the \"Add\nsource\" dropdown in the section \"Branch Sources\".\n\n![How to select a multibranch pipeline source](docs/assets/config-multibranch-pipeline-source.png)\n\nIn the new configuration, enter the base URL of your SCM-Manager instance and select according credentials. \nThis plugin will then load a list of all available repositories you can select from.\nYou may also copy and paste a repository into the field.\n\n![Example of a config for a multibranch pipeline](docs/assets/config-multibranch-pipeline.png)\n\nFinally, you can select behaviours where you can choose whether branches, tags or pull requests shall be built (among others).\n\n#### JobDSL\n\nIn order to create an SCM-Manager Mercurial or Git repository with the Jenkins JobDSL, the following syntax can be used:\n\n```groovy\nmultibranchPipelineJob('heart-of-gold') {\n  branchSources {\n    scmManager {\n      id('spaceships/heart-of-gold')\n      serverUrl('https://scm.hitchhiker.com')\n      credentialsId('my-secret-id')\n      repository('spaceships/heart-of-gold')\n      discoverBranches(true)\n      discoverPullRequest(true)\n      discoverTags(false)\n    }\n  }\n}\n```\n\nThe parameters `discoverBranches`, `discoverPullRequest` and `discoverTags` are optional \nand describe which heads of the repository are build.\nThe example shows the default values.\n\nHave a look at the following example for a Subversion repository:\n\n```groovy\nmultibranchPipelineJob('heart-of-gold') {\n  branchSources {\n    scmManagerSvn {\n      id('spaceships/heart-of-gold')\n      serverUrl('https://scm.hitchhiker.com')\n      credentialsId('my-secret-id')\n      repository('spaceships/heart-of-gold')\n      includes(\"trunk,branches/*,tags/*,sandbox/*\")\n      excludes(\"\")\n    }\n  }\n}\n```\n\n### Organization Folders \u0026ndash; Namespaces\nIf you want to have build jobs for every repository in a namespace, you can create \"SCM-Manager Namespace\" jobs. These\nwill scan all repositories in the given namespace and create multibranch pipelines for each repository where a\n`Jenkinsfile` can be found. If a new repository is created in this namespace, a new pipeline will be created\nautomatically.\n\nTo create such a folder for a complete namespace, select \"New Item\" on the Jenkins top level page, then enter a name\nand select \"Organization Folder\".\n\n![How to select an organization folder](docs/assets/select-namespace-organization-folder.png)\n\nIn the configuration form for this item, select the *Repository\u0026nbsp;Sources \u003e Add* button and choose *SCM-Manager Namespace*.\n\n![How to select an SCM-Manager namespace as organization folder](docs/assets/config-namespace-select.png)\n\nWithin the new form, enter the base URL of your SCM-Manager instance and select according\ncredentials. This plugin will then load a list of all available namespaces you can select from.\n\nAs an alternative to a concrete namespace, you can select \u003ccode\u003e--all--\u003c/code\u003e if you want to create build jobs for\nall repositories of the whole SCM-Manager instance. Please note that in this case, the folders for the jobs will be\nnamed with the pattern *namespace/name*.\n\n![Example of a config for a namespace item](docs/assets/config-namespace-item.png)\n\nFinally, you can select behaviours where you can choose whether (for example) branches, tags or pull requests shall be\nbuilt.\n\n#### JobDSL\n\nHave a look at the following example in order to create a build job for an SCM-Manager namespace with the JobDSL:\n\n```groovy\norganizationFolder(\"spaceships\") {\n  organizations {\n    scmManagerNamespace {\n      serverUrl('https://scm.hitchhiker.com')\n      credentialsId('my-secret-id')\n      namespace(\"spaceships\")\n      discoverBranches(true)\n      discoverPullRequest(true)\n      discoverTags(false)\n      discoverSvn {\n        includes(\"trunk,branches/*,tags/*,sandbox/*\")\n        excludes(\"\")\n      }\n    }\n  }\n}\n// scan namespace directly after creation\nqueue(\"spaceships\")\n```\n\nThe `discover*` parameters are optional, the example above shows the default values. \nTo disable subversion builds, a `false` can be passed to the `discoverSvn` method e.g.: `discoverSvn(false)`.\nTo build all namespaces of the SCM-Manager instance, the pseudo namespace `--all--` can be used.\n\n### Navigation\nIn different pages of Jenkins, you can find links to the corresponding SCM-Manager page:\n\n- In **multibranch pipelines**, you can find the link \"SCM-Manager\" in the main navigation on the left. This leads you\n  directly to the main page of the repository in SCM-Manager.\n- In a **job for a concrete branch** or a **tag**, the link \"SCM-Manager\" in the main navigation on the left will get you\n  directly to the sources in SCM-Manager for this branch or tag.\n- In a **job for a pull request**, the link \"SCM-Manager\" in the main navigation on the left will navigate to the pull\n  request in SCM-Manager.\n- From the page for a build result, the link \"SCM-Manager\" in the main navigation on the left leads to the **Sources**\n  view in SCM-Manager for the concrete revision that has been built.\n- In the **Changes** view, there are links that lead to the details of a change showing the authors, the commit message,\n  and the diff for the commit.\n\n## Development\n### Build\n\nTo build the plugin just run the maven package phase.\n\n```bash\nmvn package\n```\n\n### Local Jenkins Instance\n\nStart the local Jenkins instance:\n\n```bash\nmvn hpi:run\n```\n\n### Plugin Update\nAt times, it may become necessary to update the Jenkins version of this\nplugin. Take following steps into account:\n\n* On mvnrepository - io.jenkins.tools.bom, pick the LTS version you want to update this plugin to.\nYou can see all available LTS BOMs in [this list on mvnrepository.com](https://mvnrepository.com/artifact/io.jenkins.tools.bom).\n  * Enter the values into the io.jenkins.tools.bom:bom-{version} dependency.\n* Manually update the versions listed in the properties section. You can pick the version numbers from the respective artifact list of\nthe BOM version on mvnrepository.com.\n* Also consider to update the version of org.jenkins-ci.plugins:plugin (the parent).\nCheck out the latest version [here](https://mvnrepository.com/artifact/org.jenkins-ci.plugins/plugin).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Fscm-manager-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjenkinsci%2Fscm-manager-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Fscm-manager-plugin/lists"}