-
Notifications
You must be signed in to change notification settings - Fork 79
Tool to help creating distributions of packages #1335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
a7f3b21
Add scripts to prepare distributions
jsoriano 6e0af0f
Merge remote-tracking branch 'origin/main' into cmd-distribution-scripts
jsoriano e70a21c
Run actions in parallel
jsoriano 10118ea
Select lite packages per version
jsoriano b31b25e
Add 8.19 and 9.1
jsoriano 0b47e15
linting
jsoriano d93fdf9
Merge remote-tracking branch 'origin/main' into cmd-distribution-scripts
jsoriano 10b90f5
Merge remote-tracking branch 'origin/main' into cmd-distribution-scripts
jsoriano 9cc14d4
Support pinned package versions
jsoriano a967daa
Reuse existing packages
jsoriano 8aa3e5b
Add Dockerfile
jsoriano 1148a75
Add sample for pinned versions
jsoriano 3ac5e33
Use ProtonMail fork of opengpg
jsoriano e6ca112
Use github.com/Masterminds/semver/v3
jsoriano 973d306
Merge remote-tracking branch 'origin/main' into cmd-distribution-scripts
jsoriano ce4573e
Merge remote-tracking branch 'origin/main' into cmd-distribution-scripts
jsoriano 468598f
Remove unused dockerfile
jsoriano ff94b0d
Merge remote-tracking branch 'origin/main' into cmd-distribution-scripts
jsoriano 5ecac86
Apply comments from review
jsoriano dcc6d5e
Add tests, fix race condition
jsoriano a4bc751
Fix tests
jsoriano 35463c9
Move cmd/distribution to its own module
jsoriano 135ac07
Merge remote-tracking branch 'origin/main' into cmd-distribution-scripts
jsoriano edcd868
Update AGENTS.md with recommendations about the use of require and as…
jsoriano e9ee6c9
Update magefile
jsoriano 002720e
Remove too specific readme section
jsoriano 27ae7af
Address some small issues
jsoriano e628e53
Fix test names
jsoriano 787984d
Apply suggestions from review
jsoriano File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,6 @@ | ||
| .DS_Store | ||
| package-registry | ||
| cmd/distribution/distribution | ||
|
|
||
| .idea | ||
| *.iml | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| -----BEGIN PGP PUBLIC KEY BLOCK----- | ||
|
|
||
| mQENBFI3HsoBCADXDtbNJnxbPqB1vDNtCsqhe49vFYsZN9IOZsZXgp7aHjh6CJBD | ||
| A+bGFOwyhbd7at35jQjWAw1O3cfYsKAmFy+Ar3LHCMkV3oZspJACTIgCrwnkic/9 | ||
| CUliQe324qvObU2QRtP4Fl0zWcfb/S8UYzWXWIFuJqMvE9MaRY1bwUBvzoqavLGZ | ||
| j3SF1SPO+TB5QrHkrQHBsmX+Jda6d4Ylt8/t6CvMwgQNlrlzIO9WT+YN6zS+sqHd | ||
| 1YK/aY5qhoLNhp9G/HxhcSVCkLq8SStj1ZZ1S9juBPoXV1ZWNbxFNGwOh/NYGldD | ||
| 2kmBf3YgCqeLzHahsAEpvAm8TBa7Q9W21C8vABEBAAG0RUVsYXN0aWNzZWFyY2gg | ||
| KEVsYXN0aWNzZWFyY2ggU2lnbmluZyBLZXkpIDxkZXZfb3BzQGVsYXN0aWNzZWFy |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LEeBzsjwDT9yVceYekrBEqUVyRMSVYj+UeZK2s4LbXm9b4jxXVtaivmkMA | ||
| jtznndrD7kmm8ak+UsZplf6p6uZS9TZ9hjwoMmw5oMaS6TZkLT4KYGWeyzHJSUBX | ||
| YikY6vssDQu4SJ07m1f4Hz81J39QOcHln5I5HTK8Rh/VUFcxNnGg9360g55wWpiF | ||
| eUTeMyoXpOtffiUhiOtbRYsmSYC0D4Fd5yJnO3n1pwnVVVsM7RAC22rc5j/Dw8dR | ||
| GIHikRcYWeXTYW7veewK5Ss= | ||
| =ftS0 | ||
| -----END PGP PUBLIC KEY BLOCK----- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| include ../../Makefile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| # Distribution Tool | ||
|
|
||
| A utility for downloading packages from Elastic Package Registry (EPR). | ||
|
|
||
| ## Overview | ||
|
|
||
| The distribution tool allows you to collect and download integration packages from an EPR instance based on configurable search queries. It supports filtering by package type, Kibana version, spec version, and other parameters. | ||
|
|
||
| ## Building | ||
|
|
||
| ```bash | ||
| cd cmd/distribution | ||
| go build | ||
| ``` | ||
|
|
||
| Or install directly: | ||
|
|
||
| ```bash | ||
| go install github.com/elastic/package-registry/cmd/distribution@latest | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| ```bash | ||
| ./distribution <config.yaml> | ||
| ``` | ||
|
|
||
| The tool requires a YAML configuration file that defines: | ||
| - **address**: EPR endpoint to query (defaults to `https://epr.elastic.co`) | ||
| - **queries**: Search parameters to filter packages | ||
| - **matrix**: Parameter combinations to expand queries | ||
| - **packages**: Specific packages to include by name and version | ||
| - **actions**: Operations to perform (print, download, validate) | ||
|
|
||
| See `minimal.yaml` and `lite-all.yaml` for example configurations. | ||
|
|
||
| ## Configuration Examples | ||
|
|
||
| ### Minimal Configuration | ||
| ```yaml | ||
| address: https://epr.elastic.co | ||
| queries: | ||
| - package: nginx | ||
| actions: | ||
| - print: {} | ||
| ``` | ||
|
|
||
| ### Download with Validation | ||
| ```yaml | ||
| address: https://epr.elastic.co | ||
| queries: | ||
| - type: integration | ||
| kibana.version: 8.0.0 | ||
| actions: | ||
| - download: | ||
| destination: ./packages | ||
| validate: true | ||
| ``` | ||
|
|
||
| ## Actions | ||
|
|
||
| - **print**: Output package names and versions to console | ||
| - **download**: Download package ZIP files and signatures | ||
| - `destination`: Target directory for downloads | ||
| - `validate`: Verify package signatures using GPG | ||
|
|
||
| ## Dependencies | ||
|
|
||
| Managed via Go modules. Run `go mod tidy` to update dependencies. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need a copy of Makefile from root here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To have the same release targets, though I could remove it as this is not used by now...