{"id":22281543,"url":"https://github.com/jenkinsci/workflow-remote-loader-plugin","last_synced_at":"2025-04-09T06:13:11.369Z","repository":{"id":3462153,"uuid":"43321515","full_name":"jenkinsci/workflow-remote-loader-plugin","owner":"jenkinsci","description":"Load Pipeline scripts from remote locations (e.g. Git) - replaced by Pipeline: Groovy Libraries plugin","archived":false,"fork":false,"pushed_at":"2025-02-01T21:11:50.000Z","size":125,"stargazers_count":92,"open_issues_count":2,"forks_count":2,"subscribers_count":104,"default_branch":"master","last_synced_at":"2025-04-02T05:07:38.002Z","etag":null,"topics":["adopt-this-plugin","deprecated"],"latest_commit_sha":null,"homepage":"https://plugins.jenkins.io/workflow-remote-loader/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"oleg-nenashev/workflow-remote-loader-plugin","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.txt","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":"2015-09-28T19:17:44.000Z","updated_at":"2024-08-27T09:52:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"de4e0897-7f7e-4259-95be-ec9b8415ceb4","html_url":"https://github.com/jenkinsci/workflow-remote-loader-plugin","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fworkflow-remote-loader-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fworkflow-remote-loader-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fworkflow-remote-loader-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fworkflow-remote-loader-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jenkinsci","download_url":"https://codeload.github.com/jenkinsci/workflow-remote-loader-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247987285,"owners_count":21028895,"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","deprecated"],"created_at":"2024-12-03T16:19:08.770Z","updated_at":"2025-04-09T06:13:11.348Z","avatar_url":"https://github.com/jenkinsci.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Pipeline Remote File Loader Plugin\n\n## Summary\n\n**The [Pipeline: Groovy Libraries](https://plugins.jenkins.io/pipeline-groovy-lib/) plugin replaces this plugin**.\nThe [Pipeline shared libraries section of the Jenkins User Handbook](https://jenkins.io/doc/book/pipeline/shared-libraries/) describes the [Pipeline: Groovy Libraries](https://plugins.jenkins.io/pipeline-groovy-lib/) plugin in detail.\n\nThe plugin simplifies the usage of the shared functionality in [Pipeline](https://www.jenkins.io/doc/book/pipeline/) scripts.\nIt allows Pipeline scripts to be stored in remote SCM iles and loads them on-demand.\n\nSupported features:\n* Groovy file loading from Git and Github (requires an installed Git plugin)\n\n## Usage\n\nThe plugin adds a global `fileLoader` DSL variable, which provides methods for loading Pipeline objects from remote sources.\n\n### Available methods\n\nThe `fileLoader` variable provides the following methods:\n* `fromGit(String libPath, String repository, String branch, String credentialsId, String labelExpression, boolean skipNodeCreation)` - loading of a single Groovy file from the specified Git repository\n* `withGit(String repository, String branch, String credentialsId, String labelExpression, boolean skipNodeCreation)` - wrapper closure for multiple files loading from a same Git repo\n* `fromSVN(String libPath, String repository, String credentialsId, String labelExpression, boolean skipNodeCreation)` - loading of a single Groovy file from the specified SVN repository\n* `withSVN(String repository, String credentialsId, String labelExpression, boolean skipNodeCreation)` - wrapper closure for multiple files loading from a same SVN repo\n\n* `load(String libPath)` - loading of an object from a Groovy file specified by the relative path. Also can be used within `withGit()` closure to load multiple objects at once\n\nParameters:\n* `libPath` - a relative path to the file, \".groovy\" extension will be added automatically\n* `repository`\n    * for Git - string representation of a path to Git repository. Supports all formats supported by [Git Plugin](https://plugins.jenkins.io/git/)\n    * for SVN - string representation of a path to/or inside an SVN repository.\n* `branch` - Optional: Branch to be used (it's also possible to specify labels). Default value: `master`\n* `credentialsId` - Optional: Credentials to be used for the Git repo checkout. Default value: `null` (unauthorized access)\n* `labelExpression` - Optional: label expression, which specifies a node to be used for checkout. Default value: empty string (runs on any node)\n* `skipNodeCreation` - Optional: If true the creation of a new node is skipped. Default value: false (creates a new node)\n\n### Groovy file format\n\nThe loading behaves similarly to the built-in `load` command, see [Pipeline documentation](https://www.jenkins.io/doc/pipeline/steps/workflow-cps/#load-evaluate-a-groovy-source-file-into-the-pipeline-script) for more info about library file syntax. Only one file is being loaded by commands from `fileLoader`. Use static initializers within the Groovy file of the loaded file to load more context from neighbor files.\n\n### Examples\n\nLoading a single Groovy file from Git:\n```groovy\nstage 'Load a file from GitHub'\ndef helloworld = fileLoader.fromGit('examples/fileLoader/helloworld',\n        'https://github.com/jenkinsci/workflow-remote-loader-plugin.git', 'master', null, '')\n\nstage 'Run method from the loaded file'\nhelloworld.printHello()\n```\n\nLoading multiple files from Git:\n```groovy\nstage 'Load files from GitHub'\ndef environment, helloworld\nfileLoader.withGit('https://github.com/jenkinsci/workflow-remote-loader-plugin.git', 'master', null, '') {\n    helloworld = fileLoader.load('examples/fileLoader/helloworld');\n    environment = fileLoader.load('examples/fileLoader/environment');\n}\n\nstage 'Run methods from the loaded content'\nhelloworld.printHello()\nenvironment.dumpEnvVars()\n```\n\n## License\n[MIT License](http://opensource.org/licenses/MIT)\n\n## Changelog\n\n[GitHub releases](https://github.com/jenkinsci/workflow-remote-loader-plugin/releases)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Fworkflow-remote-loader-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjenkinsci%2Fworkflow-remote-loader-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Fworkflow-remote-loader-plugin/lists"}