{"id":20648554,"url":"https://github.com/linuxthor/knife-gadgets","last_synced_at":"2025-10-09T12:41:12.946Z","repository":{"id":150324139,"uuid":"44795993","full_name":"linuxthor/knife-gadgets","owner":"linuxthor","description":"Add hooks to knife to run custom scripts at key points ","archived":false,"fork":false,"pushed_at":"2015-10-23T10:16:53.000Z","size":152,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-30T10:07:07.912Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linuxthor.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}},"created_at":"2015-10-23T06:52:43.000Z","updated_at":"2015-10-23T07:28:04.000Z","dependencies_parsed_at":"2023-06-01T06:16:19.660Z","dependency_job_id":null,"html_url":"https://github.com/linuxthor/knife-gadgets","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/linuxthor/knife-gadgets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxthor%2Fknife-gadgets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxthor%2Fknife-gadgets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxthor%2Fknife-gadgets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxthor%2Fknife-gadgets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linuxthor","download_url":"https://codeload.github.com/linuxthor/knife-gadgets/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linuxthor%2Fknife-gadgets/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266412368,"owners_count":23924500,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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-11-16T17:09:19.081Z","updated_at":"2025-10-09T12:41:07.928Z","avatar_url":"https://github.com/linuxthor.png","language":"Ruby","readme":"# knife-gadgets\nA knife plugin that adds hooks to knife to run external scripts at key points and potentially abort the action being taken. \n\nInstall by copying to .chef/plugins/knife/ \n\nCurrently there are two hooks in the 'cookbook upload' command:\n\n1. Before syntax checking (useful for extra checking/linting of cookbooks)\n2. After syntax checking has passed but before upload takes place (a good time to commit to SCM) \n\nWhen the hook code runs it checks if the configuration options 'prevalidate_hook' and 'postvalidate_hook' are set (e.g in knife.rb) and runs the scripts they point to. \n\nExample knife.rb settings:\n\n```\nprevalidate_hook         \"/home/user/Chef/prevalidate_cookbook.sh\"\npostvalidate_hook        \"/home/user/Chef/postvalidate_cookbook.sh\"\n```\n\nThe following environment variables are populated when calling the external helper:\n\n```\n$CURRENT_COOKBOOK #name of the current cookbook \n$COOKBOOK_PATH #filesystem path to cookbooks\n$NODE_NAME #name of client \n\n```\nIf a script returns a non-zero exit code the 'cookbook upload' operation is aborted. \n\nIt is planned to add additional hooks over time. \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxthor%2Fknife-gadgets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinuxthor%2Fknife-gadgets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinuxthor%2Fknife-gadgets/lists"}