Skip to content

Commit

Permalink
feat: publish PackageSet on Fluvio Publish (#3694)
Browse files Browse the repository at this point in the history
* feat: publish PackageSet on Fluvio Publish

* feat: use makefile instead

* fix: bump version along with publish pkgset

* Update actions/publish-pkgset.sh

Co-authored-by: T.J. Telan <[email protected]>

* fix: set static value on very top

---------

Co-authored-by: T.J. Telan <[email protected]>
  • Loading branch information
EstebanBorai and tjtelan authored Nov 13, 2023
1 parent 03806c2 commit 86fbb94
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ jobs:

- name: Publish artifacts
env:
BPKG_TOKEN: ${{ secrets.BPKG_TOKEN }}
FLUVIO_BIN: ~/.fluvio/bin/fluvio
run: make publish-artifacts-dev

- name: Slack Notification
uses: 8398a7/action-slack@v3
if: failure()
Expand Down
33 changes: 33 additions & 0 deletions actions/publish-pkgset.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash
set -u

curl -v -X "POST" "https://hub.infinyon.cloud/hub/v1/fvm/pkgset" \
-H "Authorization: $BPKG_TOKEN" \
-H 'Content-Type: application/json; charset=utf-8' \
--data-binary @- << EOF
{
"artifacts": [
{
"name": "fluvio",
"version": "$FLUVIO_VERSION"
},
{
"name": "fluvio-cloud",
"version": "$FLUVIO_CLOUD_VERSION"
},
{
"name": "fluvio-run",
"version": "$FLUVIO_VERSION"
},
{
"name": "cdk",
"version": "$FLUVIO_VERSION"
},
{
"name": "smdk",
"version": "$FLUVIO_VERSION"
}
],
"pkgset": "$PKGSET_NAME"
}
EOF
13 changes: 12 additions & 1 deletion makefiles/release.mk
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ TARGET?=
PACKAGE?=
ARTIFACT?=

# Fluvio Cloud Version used to publish pkgsets
FLUVIO_CLOUD_VERSION="0.2.15"

#### Testing only

get-version:
Expand Down Expand Up @@ -171,7 +174,7 @@ publish-artifacts: install-fluvio-package unzip-gh-release-artifacts
$$ARTIFACT; \
)

publish-artifacts: PUBLIC_VERSION=$(subst -$(GIT_COMMIT_SHA),+$(GIT_COMMIT_SHA),$(VERSION))
publish-artifacts-hub: PUBLIC_VERSION=$(subst -$(GIT_COMMIT_SHA),+$(GIT_COMMIT_SHA),$(VERSION))
publish-artifacts-hub: unzip-gh-release-artifacts
@echo "Publish to hub"
$(foreach bin, $(PUBLISH_BINARIES_HUB), \
Expand Down Expand Up @@ -213,10 +216,18 @@ bump-fluvio: install-fluvio-package
bump-fluvio-stable: CHANNEL_TAG=stable
bump-fluvio-stable: VERSION=$(REPO_VERSION)
bump-fluvio-stable: bump-fluvio
export PKGSET_NAME=$(VERSION)
export FLUVIO_VERSION=$(VERSION)
export FLUVIO_CLOUD_VERSION=$(FLUVIO_CLOUD_VERSION)
./actions/publish-pkgset.sh

bump-fluvio-latest: CHANNEL_TAG=latest
bump-fluvio-latest: VERSION=$(subst -$(GIT_COMMIT_SHA),+$(GIT_COMMIT_SHA),$(DEV_VERSION_TAG))
bump-fluvio-latest: bump-fluvio
export PKGSET_NAME=$(VERSION)
export FLUVIO_VERSION=$(VERSION)
export FLUVIO_CLOUD_VERSION=$(FLUVIO_CLOUD_VERSION)
./actions/publish-pkgset.sh

update-public-installer-script-s3:
$(DRY_RUN_ECHO) aws s3 cp ./install.sh s3://packages.fluvio.io/v1/install.sh --acl public-read
Expand Down

0 comments on commit 86fbb94

Please sign in to comment.