Skip to content

Commit

Permalink
Merge pull request #25 from tibroc/plugin-deb-package
Browse files Browse the repository at this point in the history
Build deb packages for the html-plugin
  • Loading branch information
tibroc authored Aug 2, 2024
2 parents 98635aa + 324e5ea commit 69574fd
Show file tree
Hide file tree
Showing 11 changed files with 150 additions and 1 deletion.
60 changes: 60 additions & 0 deletions .github/workflows/build-plugin-deb-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
---
name: 📦 Build .deb-package for html-plugin
on:
push:
branches: [ "main"]
paths:
- 'html-plugin/**'
pull_request:
branches: [ "main" ]
paths:
- 'html-plugin/**'

jobs:
build-deb-package:
runs-on: ubuntu-22.04
defaults:
run:
working-directory: ./html-plugin
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Install build dependencies
run: sudo ./.setup-build-dependencies.sh

- run: node --version

- name: Build Debian package
run: sudo dpkg-buildpackage -us -uc

- name: Upload Debian Package
uses: actions/upload-artifact@v4
with:
name: html-plugin-ubuntu-22.04
path: "${{ github.workspace }}/*.deb"

release:
name: "Upload assets to release"
needs: build-deb-package
runs-on: ubuntu-latest
if: ${{ github.ref_type == 'tag' }}
permissions:
contents: write
actions: read

steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v4
with:
name: html-plugin-ubuntu-22.04
path: html-plugin-ubuntu-22.04

- name: Create release asset archives
run: zip --junk-paths --recurse-paths --compression-method store "html-plugin-ubuntu-22.04.zip" "html-plugin-ubuntu-22.04"

- name: Upload release assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.ref_name }} "html-plugin-ubuntu-22.04.zip"
2 changes: 2 additions & 0 deletions .github/workflows/publish-on-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: Publish the pairing server 📦 to PyPI and TestPyPI

on:
push:
paths:
- 'pairing-server/**'

defaults:
run:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/test-pairing-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ on:
push:
branches-ignore:
- 'dependabot/**'
paths:
- 'pairing-server/**'
pull_request:
paths:
- 'pairing-server/**'

defaults:
run:
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
html-plugin/.idea
html-plugin/dist
html-plugin/node_modules
html-plugin/debian/bbb-room-connector-plugin/
html-plugin/debian/bbb-room-connector-plugin.substvars
html-plugin/debian/files
html-plugin/debian/debhelper-build-stamp
.DS_Store
appliance-application/dist
appliance-application/node_modules
Expand Down Expand Up @@ -35,3 +39,4 @@ venv/

__pycache__
.pytest_cache/

14 changes: 14 additions & 0 deletions html-plugin/.setup-build-dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/bash

# This script installs the build dependencies for the HTML plugin debian package.
# Do not use the github action node-setup, because it will not work with the debian package build.

set -eux

apt-get update
apt-get install -y build-essential devscripts debhelper lintian ca-certificates curl gnupg
mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
apt-get update
apt-get install -y nodejs
14 changes: 13 additions & 1 deletion html-plugin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public:
- name: RoomMediaPlugin
url: <<PLUGIN_URL>>
settings:
pairingWebsocketUrl: wss://your-bbb-server.org/hybrid/ws
pairingWebsocketUrl: wss://your-pairing-server.org/hybrid/ws
```
#### Hosting the Plugin on a BBB Server
Expand All @@ -67,3 +67,15 @@ While the plugin can be hosted on any Server, it is also possible to host the bu
a BigBlueButton server.
For that you copy the `dist/RoomMediaPlugin.js` to the folder `/var/www/bigbluebutton-default/assets/plugins`.
In this case, the `<<PLUGIN_URL>>` above will be `https://<your-host>/plugins/RoomMediaPlugin.js`.
### Installation as a .deb-Package
We build debian packages for the main branch and releases.
For releases you can download them from the assets on the releases page.
For commits and PRs on the main-branch you can download them as artifacts from the respective actions workflow.
You can then install the package on your BBB server using something like `dpkg -i bbb-room-connector-plugin_0.1.0_all.deb`
(verify the actual file name of the .deb-package).
The plugin is then automatically installed to `/var/www/bigbluebutton-default/assets/plugins` and is delivered by BBB.
You then only need to configure it according to the example above.
5 changes: 5 additions & 0 deletions html-plugin/debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bbb-room-connector-plugin (0.1.0) jammy; urgency=medium

* initial build

-- Timo Nogueira Brockmeyer <timb@uos.de> Thu, 20 Jun 2024 14:56:14 -0400
1 change: 1 addition & 0 deletions html-plugin/debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
13
13 changes: 13 additions & 0 deletions html-plugin/debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Source: bbb-room-connector-plugin
Section: web
Priority: extra
Maintainer: Timo Nogueira Brockmeyer <timb@uos.de>
Build-Depends: debhelper (>= 13), nodejs (>= 18)
Standards-Version: 4.1.4

Package: bbb-room-connector-plugin
Architecture: all
Depends: ${misc:Depends}, nodejs
Description: The BigBlueButton room connector plugin
A BigBlueButton plugin to connect a meeting to a room appliance
(as a bring-your-own-meeting functionality).
21 changes: 21 additions & 0 deletions html-plugin/debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Format: http://dep.debian.net/deps/dep5
Upstream-Name: bbb-room-connector-plugin

Files: *
Copyright: 2024 BigBlueButton Inc. and by respective authors
License: GPL-3.0+
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.

This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
Public License for more details.

You should have received a copy of the GNU General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General Public License
version 3.0 can be found in "/usr/share/common-licenses/GPL-3.0".
12 changes: 12 additions & 0 deletions html-plugin/debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/make -f

%:
dh $@ --no-parallel --verbose

override_dh_auto_build:
npm install
npm run build-bundle

override_dh_auto_install:
install -d debian/bbb-room-connector-plugin/var/www/bigbluebutton-default/assets/plugins/bbb-room-connector-plugin
cp -r dist/* debian/bbb-room-connector-plugin/var/www/bigbluebutton-default/assets/plugins/bbb-room-connector-plugin

0 comments on commit 69574fd

Please sign in to comment.