Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
jackietung-redpanda committed Sep 3, 2024
1 parent 8db36f9 commit 148fe00
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/workflows/upload_plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- 'v[0-9]+.[0-9]+.[0-9]+'
- 'v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+'
pull_request:
# Keep CI snappy for unrelated PRs
paths:
- 'resources/plugin_uploader/**'
- '.github/workflows/upload_plugin.yml'
Expand Down
21 changes: 10 additions & 11 deletions resources/plugin_uploader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,24 @@ upload-manifest Create manifest.json and upload to S3

Primary use case is in GitHub Actions in response to creation of a GitHub release.

Here are more details about running this in other contexts (e.g. local testing, manual release interventions)
See `.github/workflows/upload_plugin.yml` to see this in action.

It's expected that you have used goreleaser to build a set of binaries for a given release tag (such as following a
GitHub release tag creation).

Goreleaser creates a `$DIST` directory at the project root dir containing all built binaries and two JSON files:
Goreleaser creates a `$DIST` directory (`dist/` by default) at the project root dir containing all built binaries and
two JSON files:

* `$DIST/<build-name>-<os>-<arch>/<binary-filename>`
* ...
* `$DIST/artifacts.json`
* `$DIST/metadata.json`


### Create archives from binaries and upload them

Locate the `artifact.json` and `metadata.json` files produced by goreleaser.
Locate the `artifact.json` and `metadata.json` files produced by Goreleaser.
E.g. `$DIST/artifacts.json`, `$DIST/metadata.json`.

`$DIST="dist"`, by default, but may be overridden to something else in goreleaser configs.

```shell
./plugin_uploader.py upload-archives \
--artifacts-file=$DIST/artifacts.json \
Expand All @@ -58,13 +56,14 @@ E.g. `$DIST/artifacts.json`, `$DIST/metadata.json`.
--goarch=<ARCH1,ARCH2,...>
```

`PROJECT_ROOT` should be the root directory of the Golang project (by default, wherer `.goreleaser.yml` lives)
`PROJECT_ROOT` should be the root directory of the Golang project (by default, where `.goreleaser.yml` lives)

`PLUGIN_NAME` should match the `<build-id>` as defined in goreleaser configs.

`PLUGIN_NAME` should match the `<build-name>` as defined in goreleaser configs.
It's assumed that the binary filename is always `redpanda-<build-name>`. E.g. for `connect`:
It's assumed that the output binary filename is `redpanda-<build-id>`. E.g. for the **connect** project:

* `build-name` is `connect`
* Binary filename is `redpanda-connect`
* `build-id` is `connect`
* Binary is `redpanda-connect`

A binary is included for archival / upload only if it matches some `--goos` AND some `--goarch`.

Expand Down

0 comments on commit 148fe00

Please sign in to comment.