-
Notifications
You must be signed in to change notification settings - Fork 853
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5fa7f3
commit 6c63923
Showing
2 changed files
with
116 additions
and
0 deletions.
There are no files selected for viewing
72 changes: 72 additions & 0 deletions
72
.github/workflows/actions/upload_managed_plugin/action.yml
This file contains 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,72 @@ | ||
name: upload-managed-plugin | ||
description: Upload binaries as rpk managed plugin | ||
inputs: | ||
aws_access_key_id: | ||
required: true | ||
aws_secret_access_key: | ||
required: true | ||
aws_region: | ||
required: true | ||
aws_s3_bucket: | ||
required: true | ||
artifacts_file: | ||
required: true | ||
metadata_file: | ||
required: true | ||
plugin_name: | ||
required: true | ||
goos: | ||
description: CSV list of target OS's | ||
required: true | ||
goarch: | ||
description: CSV list of target arch's | ||
required: true | ||
repo_hostname: | ||
required: true | ||
dry_run: | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-access-key-id: ${{ inputs.aws_access_key_id }} | ||
aws-secret-access-key: ${{ inputs.aws_secret_access_key }} | ||
aws-region: ${{ inputs.aws_region }} | ||
|
||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.12' | ||
|
||
- name: install deps | ||
working-directory: resources/plugin_uploader | ||
run: pip install -r requirements.txt | ||
|
||
- name: Upload archives | ||
working-directory: resources/plugin_uploader | ||
run: | | ||
DRY_RUN_FLAG=${{ inputs.dry_run && '--dry-run' || '' }} | ||
./plugin_uploader.py upload-archives \ | ||
--artifacts-file target/dist/artifacts.json \ | ||
--metadata-file target/dist/metadata.json \ | ||
--project-root-dir $(pwd) \ | ||
--region=${{ inputs.aws_region }} \ | ||
--bucket=${{ inputs.aws_s3_bucket }} \ | ||
--plugin=${{ inputs.plugin_name }} \ | ||
--goos=${{ inputs.goos }} \ | ||
--goarch=${{ inputs.goarch }} \ | ||
$DRY_RUN_FLAG | ||
- name: Upload manifest | ||
working-directory: resources/plugin_uploader | ||
run: | | ||
DRY_RUN_FLAG=${{ inputs.dry_run && '--dry-run' || '' }} | ||
./plugin_uploader.py upload-manifest \ | ||
--region=${{ inputs.aws_region }} \ | ||
--bucket=${{ inputs.aws_s3_bucket }} \ | ||
--plugin=${{ inputs.plugin_name }} \ | ||
--repo-hostname=${{ inputs.repo_hostname }} \ | ||
$DRY_RUN_FLAG |
This file contains 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,44 @@ | ||
name: Release rpk connect plugin (managed) | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
dry_run: | ||
description: 'Dry run' | ||
required: true | ||
default: true | ||
type: 'boolean' | ||
|
||
jobs: | ||
build_and_push_rpk_connect_plugin: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check Out Repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.22.x | ||
check-latest: true | ||
|
||
- name: Build binaries | ||
uses: goreleaser/goreleaser-action@v6 | ||
with: | ||
version: latest | ||
args: build --timeout 120m | ||
|
||
- name: Upload binaries as rpk managed plugin | ||
uses: ./.github/actions/upload_managed_plugin | ||
with: | ||
aws_access_key_id: "TODO" | ||
aws_secret_access_key: "TODO" | ||
aws_region: "us-west-2" | ||
aws_s3_bucket: "rpk-plugins-repo" | ||
artifacts_file: target/dist/artifacts.json | ||
metadata_file: target/dist/metadata.json | ||
plugin_name: "connect" | ||
goos: linux,darwin | ||
goarch: amd64,arm64 | ||
repo_hostname: rpk-plugins.redpanda.com | ||
dry_run: ${{ inputs.dry_run }} |