{"id":15045525,"url":"https://github.com/jenkinsci/jobcopy-builder-plugin","last_synced_at":"2025-10-19T21:31:48.965Z","repository":{"id":6340320,"uuid":"7576327","full_name":"jenkinsci/jobcopy-builder-plugin","owner":"jenkinsci","description":"Jenkins plugin to copy a job in a build step.","archived":false,"fork":false,"pushed_at":"2023-06-06T07:25:20.000Z","size":229,"stargazers_count":3,"open_issues_count":7,"forks_count":26,"subscribers_count":98,"default_branch":"master","last_synced_at":"2025-01-30T04:41:26.784Z","etag":null,"topics":["adopt-this-plugin"],"latest_commit_sha":null,"homepage":"https://plugins.jenkins.io/jobcopy-builder/","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jenkinsci.png","metadata":{"files":{"readme":"README.adoc","changelog":"CHANGELOG.adoc","contributing":null,"funding":null,"license":null,"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":"2013-01-12T14:44:51.000Z","updated_at":"2023-10-17T21:03:14.000Z","dependencies_parsed_at":"2024-09-25T02:08:19.068Z","dependency_job_id":null,"html_url":"https://github.com/jenkinsci/jobcopy-builder-plugin","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fjobcopy-builder-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fjobcopy-builder-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fjobcopy-builder-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fjobcopy-builder-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jenkinsci","download_url":"https://codeload.github.com/jenkinsci/jobcopy-builder-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237221176,"owners_count":19274447,"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":["adopt-this-plugin"],"created_at":"2024-09-24T20:51:58.861Z","updated_at":"2025-10-19T21:31:43.654Z","avatar_url":"https://github.com/jenkinsci.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"= Jobcopy Builder plugin\n\n:sectanchors:\n\nThis plugin adds \"Copy Job\" as a build step.You can select how to\nretrieve choices, including the way to share choices among all jobs.\n\n:toc:\n\n[[JobcopyBuilderplugin-Whatsthis]]\n== What's this?\n\nThis plugin provides a Copy Job build step:\n\n* It makes a new job from an existing job.\n** You can copy multiple jobs in one build execution with specifying\nmultiple Copy Job build steps.\n** Can be applied to any type of jobs.\n* You specify following parameters.\n** From Job Name\n*** Variable expressions can be used.\n** To Job Name\n*** Variable expressions can be used.\n** Overwrite\n*** Specifies whether to overwrite the destination job if it already\nexists.\n* Additional operations can be performed when copying.\n** Enable Job: Enabling the destination job if the source job is\ndisabled.\n** Disable Job: Disabling the destination job if the source job is\nenabled. ( \u003e= 1.3.0)\n** Replace String: Replace strings in a job configuration.\n*** Source and destination strings can contain variable expressions.\n* Additional operation can be extended by using Extension Points.\n\n[[JobcopyBuilderplugin-Screenshots]]\n== Screenshots\n\n. You can add \"Copy Job\" build step. +\n#image:docs/images/01-configure.png[image]#\n. \"Copy Job\" performs additional operations. Replacing strings in the\nconfiguration, enabling a disabled job.\n* The job copied from +\n#image:docs/images/02-copyfrom01.png[image]#\n* The job copied to. String \"VERSION\" is replaced, and the job is\nenabled. +\n#image:docs/images/03-copyto01.png[image]#\n. Replacing strings can be applied to any part of configurations,\nincluding that of plugins. This is a example that the branch field of\nGit plugin is replaced.\n* The job copied from. +\n#image:docs/images/04-copyfrom02.png[image]#\n* The job copied to. String \"VERSION\" is replaced. +\n#image:docs/images/05-copyto02.png[image]#\n\n[[JobcopyBuilderplugin-Howdoesthiswork]]\n== How does this work?\n\nThis plugin works as following:\n\n. Reads the configuration xml (config.xml) of the copying job.\n. Applies the operations to the configuration xml string.\n. Create a new job with the processed configuration xml string.\n\n[[JobcopyBuilderplugin-Extensionpoint]]\n== Extension point\n\nA new way to provide choices can be added with implementing\n`+JobcopyOperation+`, overriding the following method:\n\n[source,java]\n----\npublic String perform(String xmlString, String encoding, EnvVars env, PrintStream logger);\n----\n\nor, with extending `+AbstractXmlJobcopyOperation+`, overriding the\nfollowing method:\n\n[source,java]\n----\nabstract public Document perform(Document doc, EnvVars env, PrintStream logger);\n----\n\n[[JobcopyBuilderplugin-Usedwithpromotedbuilds]]\n== Used with promoted builds\n\nWhen used with\nhttps://plugins.jenkins.io/promoted-builds/[Promoted\nBuilds Plugin], the configurations of promotions are not copied for they\nare not stored in config.xml. +\nDo as followings:\n\n* Click \"Advanced\" in \"copy Job\"\n* Add \"Additional File Sets\", specify \"promotions/*/config.xml\" in\n\"Files\".\n\n[[JobcopyBuilderplugin-Permissionstocopyjobs]]\n== Permissions to copy jobs\n\n* \"Copy Job\" build step requires following permissions.\n+\n[cols=\",,\",options=\"header\",]\n|===\n|Target Job |Required permissions |Notes\n|Item to copy from |Job/Read, Job/ExtendedRead |Job/ExtendedRead is\ndisplayed only when you install\nhttps://plugins.jenkins.io/extended-read-permission/[Extended\nRead Permission Plugin]. You can grant it by granting Job/Configure\ninstead.\n\n|Item to copy to (when create) |Job/Create | \n\n|Item to copy to (when overwrite) |Job/Read, Job/Configure | \n|===\n* \"Copy Job\" defaults to run as ANONYMOUS.\n** If you want \"Copy Job\" run as a specific user, use other plugins\nauthenticate builds. e.g.\nhttps://plugins.jenkins.io/authorize-project/[Authorize\nProject plugin]\n\n[[JobcopyBuilderplugin-Issues]]\n== Issues\n\nTo report a bug or request an enhancement to this plugin please create a\nticket in JIRA (you need to login or to sign up for an account). Also\nhave a look on\nhttps://www.jenkins.io/participate/report-issue/[How to\nreport an issue]\n\n* https://issues.jenkins-ci.org/issues/?jql=resolution%20%3D%20Unresolved%20AND%20component%20%3D%20jobcopy-builder-plugin[Open\nIssues]\n* https://issues.jenkins-ci.org/secure/CreateIssueDetails!init.jspa?pid=10172\u0026issuetype=1\u0026components=17506\u0026priority=4\u0026assignee=ikedam[Bug\nreport]\n* https://issues.jenkins-ci.org/secure/CreateIssueDetails!init.jspa?pid=10172\u0026issuetype=4\u0026components=17506\u0026priority=4[Request\nor propose an improvement of existing feature]\n* https://issues.jenkins-ci.org/secure/CreateIssueDetails!init.jspa?pid=10172\u0026issuetype=2\u0026components=17506\u0026priority=4[Request\nor propose a new feature]\n\ninclude::CHANGELOG.adoc[]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Fjobcopy-builder-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjenkinsci%2Fjobcopy-builder-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Fjobcopy-builder-plugin/lists"}