executor: set step environment variables (CRAFT-272)
Metadata
Current evaluation
Merged after two approvals and passing CI. Adds project and part environment variables to step execution. Implementation validates names and supports custom prefixes instead of automatic transformation.
Suggested action: —
No scores available.
Issue body
Add variables with project and part-related content to the step execution
environment. The variables are a subset of the variables set by Snapcraft
and are prefixed by the name of the application using craft-parts.
Additional application-specific environment variables can be defined by
the application in the pre-step callback.
The application_name string must be non-empty and contain only letters,
digits or underscore characters. All other characters will be converted
to underscores. If the application name starts with a digit, an
underscore will be prepended to the step environment variable names.
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
- [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)?
-----
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged after two approvals and passing CI. Adds project and part environment variables to step execution. Implementation validates names and supports custom prefixes instead of automatic transformation. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged. Adds step execution environment variables for project and part content. Auto-conversion of invalid application names was flagged; author agreed to refactor for strict validation and optional prefix support. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #220 executor: enable application-defined environment variables | craft-parts | merged | Merged. Enables application-defined environment variables during step scriptlet execution via pre-step and prologue callbacks. Code refactored to separate global and step variables. Documentation deferred until API stability. | |
| #186 executor: standardize environment variable prefix | craft-parts | merged | Merged. Standardized part scriptlet environment variables to a common CRAFT_ prefix, replacing application-specific prefixes. Added CRAFT_PROJECT_DIR, rebased on main, and approved by reviewer. | |
| #53 executor: create environment for step execution | craft-parts | merged | Merged. Adds environment generation for step execution using built-in, plugin, and user-defined variables. Logic ported from snapcraft. Approved by two reviewers, passed CI, and added 585 lines across six files. |