{"id":17069826,"url":"https://github.com/jlong/cjp-example-template-library","last_synced_at":"2026-05-15T12:31:59.544Z","repository":{"id":66244195,"uuid":"73486044","full_name":"jlong/cjp-example-template-library","owner":"jlong","description":null,"archived":false,"fork":false,"pushed_at":"2016-11-15T19:07:07.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-26T12:44:22.955Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/jlong.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2016-11-11T14:51:36.000Z","updated_at":"2021-03-17T21:16:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"502baf98-35f5-4270-a52e-557d323e53e5","html_url":"https://github.com/jlong/cjp-example-template-library","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/jlong/cjp-example-template-library","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlong%2Fcjp-example-template-library","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlong%2Fcjp-example-template-library/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlong%2Fcjp-example-template-library/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlong%2Fcjp-example-template-library/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jlong","download_url":"https://codeload.github.com/jlong/cjp-example-template-library/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jlong%2Fcjp-example-template-library/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33067156,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T11:35:32.926Z","status":"ssl_error","status_checked_at":"2026-05-15T11:35:31.362Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-10-14T11:27:57.633Z","updated_at":"2026-05-15T12:31:59.504Z","avatar_url":"https://github.com/jlong.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CJP Example Template Library\n\nThis repository is an example template library for CloudBees Jenkins Enterprise.\n\n# Example templates\n\nThe following examples are included:\n\n* [Freestyle](freestyle/freestyle-github-project.xml.template)\n* [Freestyle with Auxilary](freestyle-with-auxilary/album-project.xml.template)\n* [Pipeline](pipeline/github-pipeline-project.xml.template)\n* [Multi-branch Pipeline](multibranch-pipeline/multibranch-pipeline-github-project.xml.template)\n* [GitHub Organization](github-organization/github-organization.xml.template)\n\n# File format and structure\n\nTemplate repositories can be structured however the user desires. The only\nrequirement is that template filenames end in `.xml.template`.\n\nLibrary Templates are written using the same XML that Jenkins saves CJP\nTemplate configuration to disk. In fact, you can take the `config.xml` for any\nCJP Template and use that as the basis for a template in your library without\nany modification.\n\nIn addition the the standard XML for templates, library templates can also\nuse directives. The `include` directive allows you to build templates from\nseveral files. This facilitates sharing code between templates.\n\nTo include another file in a template, you write:\n\n    \u003c!-- include \"file.xml\" --\u003e\n\nReferences to files are relative to the directory of the current file. So to\ninclude a file one directory up (in the parent directory) you write:\n\n    \u003c!-- include \"../file.xml\" --\u003e\n\nSome parts of a template may require escaping to become valid XML. When this is\nnecessary we pass the `escape_xml` parameter as well:\n\n    \u003c!-- include \"file.xml\", escape_xml: true --\u003e\n\nWhen true, the `escape_xml` parameter will cause all angle brackets(`\u003c`, `\u003e`)\nand ampersands (`\u0026`) to be escaped.\n\n# Template lifecycle\n\nTemplates are compiled in two stages:\n\n(1) In the first stage, the template definition from the repository is compiled\nto produce the template's `config.xml` which is stored in the Jenkins\nconfiguration. In this stage, directives (like `\u003c!-- include \"file.xml\" --\u003e`)\nare evaluated.\n\n(2) In the second stage, the template `config.xml` is evaluated and the instance\njob `config.xml` is produced. In this stage, template variables (`${variable}`) and expressions\n(`\u003c%= expression %\u003e`) are evaluated.\n\n\n    ┌─────────────────────────┐  ┌─────────────────────────┐  ┌─────────────────────────┐\n    │                         │  │                         │  │                         │\n    │          User           │  │       Repository        │  │         Jenkins         │\n    │                         │  │                         │  │                         │\n    └─────────────────────────┘  └─────────────────────────┘  └─────────────────────────┘\n                 │                            │                            │\n\n                 │ Add template               │                            │\n                  ───────────────────────────▶  New template\n                 │                            │───────────────────────────▶░ ────╮ (1) Generate template\n                                                                           ░     │ config.xml\n                 │                            │                            ░ ◀───╯\n\n                 │                            │                            │\n                   Create template instance\n                 │────────────────────────────────────────────────────────▶░ ────╮ (2) Generate job\n                                                                           ░     │ config.xml\n                 │                            │                            ░ ◀───╯\n\n                 │ Update template            │                            │\n                  ───────────────────────────▶  Updated template\n                 │                            │───────────────────────────▶░ ────╮ (1) Regenerate template\n                                                                           ░     │ config.xml\n                 │                            │                            ░ ◀───╯\n                                                                           ░\n                 │                            │                            ░ ────╮ (2) Regenerate job\n                                                                           ░     │ config.xml\n                 │                            │                            ░ ◀───╯\n\n                 │                            │                            │\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlong%2Fcjp-example-template-library","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjlong%2Fcjp-example-template-library","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjlong%2Fcjp-example-template-library/lists"}