← Back to issue list

schema: add environment support for hooks (CRAFT-424)

View original Github issue

Metadata

Project
snapcraft
Number
#3565
Type
pull request
State
merged
Author
cjp256
Labels
—
Created
Updated
Closed

Current evaluation

Merged PR snapcore/snapcraft#3565, adding CRAFT-424 hook environment support, shared schema definitions, snap metadata processing, and unit/spread tests.

Resolution: closed resolved

Reason: PR #3565 was approved with no unresolved review comments and merged into master. It added hook environment schema support, metadata processing, and test coverage.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- Consolidate definition of environment in the schema and use it for global, apps, and now hooks. - Update meta to support processing hooks. - Add unit and spread test coverage. Signed-off-by: Chris Patterson <chris.patterson@canonical.com> - [ ] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [ ] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [ ] Have you successfully run `./runtests.sh static`? - [ ] Have you successfully run `./runtests.sh tests/unit`? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged PR snapcore/snapcraft#3565, adding CRAFT-424 hook environment support, shared schema definitions, snap metadata processing, and unit/spread tests.
stealth/space-bunny-alpha — closed resolved Merged #3565 via 506001445, adding hook environment schema support, metadata processing, and unit/spread test coverage for CRAFT-424.
stealth/space-bunny-alpha — closed resolved Merged #3565 via commit 506001445, adding schema-defined hook environments for CRAFT-424, updating metadata processing, and adding unit and spread tests.
qwen/qwen3.6-35b-a3b — — Merged into master. Consolidated environment definitions in the schema to support hooks, updated metadata processing, and added test coverage. Approved by one reviewer with passing CI and 100% diff coverage.
qwen3.6-35b-a3b-mtp-q6 — — Merged into master. Consolidated schema environment definitions to support hooks, updated meta processing, and added unit tests. Achieved 100% diff coverage. An unrelated ROS plugin bug was noted but did not block the merge.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#1848381 snapcraft doesn't allow setting the environment for hooks snapcraft (launchpad) closed Fixed by merged canonical/snapcraft#3565 (commit 79c5a5f0d), which added schema support for hook environment properties.
80%
#1586465 Add support for hooks snapcraft (launchpad) closed Hook support was added in snapcore/snapcraft#1026 via commit 01880ee8d, packaging hook files and snapcraft.yaml hook definitions.
77%
#3659 meta: add support for hooks snapcraft merged Merged snapcraft#3659 via commit 00eed7dc9 (merge 795294fd5) into snapcraft/7.0, adding hooks support in snapcraft.yaml for CRAFT-808.
76%
#1026 Add support for hooks. snapcraft merged PR #1026 merged as commit 01880ee8d ('core: add support for hooks'), adding hook support: executables in snap/hooks/ are copied into the snap, and parts can install hooks into snap/hooks/. Docs followed in #1042 (10c58b652).
74%
#921 Add support for hooks. snapcraft closed PR #921 (declarative `hooks:` with generated hook scripts) was closed unmerged after redesign discussion with snapd's niemeyer; hook support instead landed in #1026 (commit 01880ee8d) with docs in #1042.
71%
#3812 architectures: add schema support snapcraft merged Merged as commit 629e4ce51: adds core22 architectures schema support to snapcraft.yaml (build_to renamed to build_for), part 1 of CRAFT-1163; full feature followed in #3821 (4876b53).
70%