-
Notifications
You must be signed in to change notification settings - Fork 841
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2844 from redpanda-data/jackie-nfpm
Release Linux packages
- Loading branch information
Showing
3 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
|
@@ -94,3 +94,32 @@ release: | |
name: connect | ||
prerelease: auto | ||
disable: false | ||
|
||
nfpms: | ||
- id: connect-linux-pkgs | ||
description: Redpanda Connect is a high performance and resilient stream processor. | ||
package_name: redpanda-connect | ||
file_name_template: "{{ .ConventionalFileName }}" | ||
# this is the default value, but specifying explicitly it relates to the symlink creation below | ||
bindir: /usr/bin | ||
contents: | ||
- src: /usr/bin/redpanda-connect | ||
dst: /usr/bin/.rpk-ac.connect | ||
type: symlink | ||
builds: | ||
- connect | ||
vendor: Redpanda Data, Inc. | ||
license: "https://github.com/redpanda-data/connect/blob/main/licenses/README.md" | ||
homepage: redpanda.com | ||
maintainer: Redpanda Data <[email protected]> | ||
formats: | ||
- deb | ||
- rpm | ||
publishers: | ||
# Gets run once per artifact (deb or rpm) | ||
- name: Publish Linux packages to Cloudsmith | ||
ids: | ||
- connect-linux-pkgs | ||
cmd: ./resources/scripts/push_pkg_to_cloudsmith.sh {{ .ArtifactPath }} | ||
env: | ||
- CLOUDSMITH_API_KEY={{ .Env.CLOUDSMITH_API_KEY }} |
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,28 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Push a rpm or deb to Cloudsmith | ||
|
||
set -ex | ||
|
||
PKG_FILE=$1 | ||
|
||
if [[ "$PKG_FILE" == "" ]]; then | ||
echo "Usage: $0 <pkg_file>" | ||
exit 1 | ||
fi | ||
|
||
if [[ "$CLOUDSMITH_API_KEY" == "" ]]; then | ||
echo "CLOUDSMITH_API_KEY is not set" | ||
exit 1 | ||
fi | ||
|
||
if [[ "$PKG_FILE" == *.rpm ]]; then | ||
PKG_TYPE="rpm" | ||
elif [[ "$PKG_FILE" == *.deb ]]; then | ||
PKG_TYPE="deb" | ||
else | ||
echo "Unknown package type" | ||
exit 1 | ||
fi | ||
|
||
cloudsmith push "$PKG_TYPE" redpanda/redpanda/any-distro/any-version "$PKG_FILE" --republish |