elastic / elastic/elastic-package
Revisit usage of _dev/scripts and _dev/shared for custom tooling
- Dominant language
- Go
- Stars
- 72
- Forks
- 141
- Avg merge
- 19h 42m
- Merged PRs (30d)
- 55
Description
## Summary
Track adoption and usage of the `_dev/shared` and `_dev/scripts` directories introduced in the package spec, and decide whether elastic-package should add support (e.g. running scripts, processing shared assets). **Revisit in a couple of months** to make that decision based on real usage.
## Background
Two package-spec changes define new optional `_dev` subdirectories:
1. **`_dev/shared`** (content and integration packages) — [package-spec#1077](https://github.com/elastic/package-spec/pull/1077) (merged)
Catch-all for development-only files (e.g. dashboards-as-YAML, other shared assets). Not shipped in built packages.
2. **`_dev/scripts`** (all package types) — [package-spec#1090](https://github.com/elastic/package-spec/pull/1090) (open)
Optional folder for development tooling (e.g. scripts that generate field files, schemas). Scripts must **not** be executed in CI unless we explicitly decide to support that.
- **Related:** [elastic-package#950](https://github.com/elastic/elastic-package/issues/950) — custom scripts / tooling as part of package development.
## Considerations for revisit
- **CI:** Ensure scripts under `_dev/scripts` are not executed in CI unless we add explicit, opt-in support.
- **Structure:** Consider adding structure to `_dev/scripts` (e.g. conventions or extension points) so elastic-package could later run or orchestrate them in a controlled way.
- **Scope:** Focus on usage of `_dev/shared` (especially in content packages) and `_dev/scripts` for custom tooling; dashboard generator / dashboards-as-YAML compilation is out of scope for this issue.
## Current behavior in elastic-package
- **Build:** All `_dev` directories are skipped when building (e.g. `files.CopyWithoutDev`). So `_dev/shared` and `_dev/scripts` are already excluded from built packages.
- **Known `_dev` usage:** Only `_dev/build`, `_dev/deploy`, `_dev/test`, `_dev/benchmark` are used today. elastic-package does **not** run scripts from `_dev/scripts` or process assets in `_dev/shared`.
## Objective (revisit in a couple of months)
1. **Track usage** of `_dev/shared` and `_dev/scripts` once the spec is finalized and packages adopt them.
2. **Decide support:** Whether to add support in elastic-package (e.g. run scripts from `_dev/scripts` with structure/extension points, process `_dev/shared`), or keep these folders spec-only and document only.
3. **Align** with package-spec and [elastic-package#950](https://github.com/elastic/elastic-package/issues/950).
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.