{"id":17645499,"url":"https://github.com/bbckr/parcel","last_synced_at":"2025-03-30T07:15:15.026Z","repository":{"id":227871827,"uuid":"245969589","full_name":"bbckr/parcel","owner":"bbckr","description":"Simple go template renderer for packaged templates (i.e. parcels).","archived":false,"fork":false,"pushed_at":"2020-04-06T10:52:00.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-05T09:18:50.360Z","etag":null,"topics":["chart","helm","nomad","renderer","template","template-engine"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"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/bbckr.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}},"created_at":"2020-03-09T07:26:51.000Z","updated_at":"2020-04-06T10:52:00.000Z","dependencies_parsed_at":"2024-03-22T05:31:14.222Z","dependency_job_id":null,"html_url":"https://github.com/bbckr/parcel","commit_stats":null,"previous_names":["bbckr/parcel"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbckr%2Fparcel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbckr%2Fparcel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbckr%2Fparcel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbckr%2Fparcel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbckr","download_url":"https://codeload.github.com/bbckr/parcel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246285818,"owners_count":20752957,"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":["chart","helm","nomad","renderer","template","template-engine"],"created_at":"2024-10-23T10:56:36.830Z","updated_at":"2025-03-30T07:15:15.004Z","avatar_url":"https://github.com/bbckr.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# parcel\nSimple go template renderer for nomad and other generic groups of templates (i.e. a light-weight Helm for purely templating).\n\n## Command usage\n### pull\nPull a parcel given the git source URI\n``` bash\nparcel pull [options] [SOURCE]\n\n-f --force # (optional) force pull parcel\n```\nExamples:\n``` bash\n# pull from remote repository\nparcel pull git::ssh://git@github.com/bbckr/parcel//example\n\n# pull from local repository\nparcel pull git::file://${PROJECT_ROOT}/.git//example\n\n# pull from repository ref\nparcel pull git::ssh://git@github.com/bbckr/parcel//example?ref=${GIT_REF}\n```\n### render\nRender template output for a parcel given the parcel identifiers. The parcel must be pulled before it can be referenced.\n``` bash\nparcel render [options] [OWNER] [NAME] [VERSION]\n-v --values # (optional) path to values yaml file\n-o --output # directory to output rendered files (default: .)\n```\n\nExamples:\n``` bash\n# render to output directory\nparcel render -o .output bbckr example 1.0.0\n\n# override default values\nparcel render -v myvalues.yaml bbckr example 1.0.0\n```\n\n## Documentation\n### Parcel structure\nEach parcel requires the following directory structure:\n``` bash\nfolder_name\n|_ static/ # place static files to reference in templates here\n|_ templates/ # place all your templates here\n...|_ job_1.hcl # go template, any name/ext\n...|_ job_2.hcl # go template, any name/ext\n|_ values.yaml # default values to feed parcel templates\n|_ manifest.yaml # parcel manifest\n```\n### Referencing values in templates\nParcel uses basic Go templating with no added helper functions.\n\nFor a full example of how the `values.yaml` should look and how to reference the values and other injected variables in a template, checkout [this example](/example).\n\nFor quick reference:\n\n``` ruby\n# templates/sample-job.hcl\njob \"sample-jon\" {\n    group \"sample-group\" {\n        task \"sample-task\" {\n            config {\n                image = \"{{ .Values.image.name }}:{{ .Values.image.tag }}\"\n            }\n        }\n    }\n}\n```\n\n``` yaml\n# values.yaml\nimage:\n  name: nginx\n  tag: latest\n```\nOutput:\n``` ruby\njob \"sample-jon\" {\n    group \"sample-group\" {\n        task \"sample-task\" {\n            config {\n                image = \"nginx:latest\"\n            }\n        }\n    }\n}\n```\n### Template Variables\n- `.Meta.name` Parcel name, taken from manifest\n- `.Meta.owner` Parcel owner, taken from manifest\n- `.Meta.version` Parcel version, taken from manifest\n- `.Values.*` Merged values from default Parcel values and values passed during render\n- `.Static.path` Path to static directory to reference static resources in templates\n\n### Template Functions\nUses [Go template](https://golang.org/pkg/text/template/) as a base and adds the following functions:\n- `toJSON` Marshal to JSON string\n- `replace` An alias for strings.Replace\n- `replaceAll` An alias for strings.ReplaceAll\n- `quote` Surround with double quotation marks\n- `b64encode` Base64 encode string\n- `b64decode` Base64 decode string\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbckr%2Fparcel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbckr%2Fparcel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbckr%2Fparcel/lists"}