Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions build-plugin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/sh
# This builds both the OCI image and the plugin tarball
set -e
set -o xtrace

# Ensure we have the plugin and the version
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Usage: $0 <plugin> <version>"
exit 1
fi

PLUGIN=$1
VERSION=$2

# Build the OCI image
echo "Building OCI image for ${PLUGIN}..."
docker buildx build --build-arg PLUGIN=${PLUGIN} -t headlamp-plugin-${PLUGIN}:${VERSION} .

# Build the plugin tarball
echo "Building plugin tarball..."
cd ${PLUGIN}
npm install
npm run build
npx @kinvolk/headlamp-plugin package | tail -n2
cd ..

echo "Finished building OCI image and plugin tarball."
Loading