Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Sync with template to include packaging #4

Open
wants to merge 20 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
23 changes: 2 additions & 21 deletions .github/ISSUE_TEMPLATE/bigbluebutton-plugin-issue.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: BBB-Plugin-SDK
about: Template for creating BBB-Plugin-SDK Issue (SDK to create plugins for Bigbluebutton).
about: Template for creating BBB-Plugin-SDK Issue (SDK to create plugins for BigBlueButton).
title: ''
labels: 'module: client'
assignees: ''
Expand Down Expand Up @@ -30,23 +30,4 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**BBB version, plugin in which The bug happened and SDK version:**
BigBlueButton continually evolves. Providing the version/build helps us to pinpoint when an issue was introduced.
Example:
$ sudo bbb-conf --check | grep BigBlueButton
BigBlueButton Server 2.2.2 (1816)

The SDK version is mentioned in the package.json file of the plugin, so search for "bigbluebutton-html-plugin-sdk" inside that file.

**Desktop (please complete the following information):**
- OS: [e.g. Windows, Mac]
- Browser [e.g. Chrome, Safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, Safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
Please specify the version of BigBlueButton and the version of the plugin/SDK used.
99 changes: 99 additions & 0 deletions .github/workflows/build-plugin-deb-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
name: "📦 Build .deb package for plugin"
on:
push:
branches: [ "main"]
paths-ignore:
- debian/changelog
pull_request:
branches: [ "main" ]
paths-ignore:
- debian/changelog

jobs:
build-deb-package:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-22.04]

env:
OS_VERSION: ${{ matrix.os }}
defaults:
run:
working-directory: .
steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Extract and print repository name
run: |
echo "REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2)" >> $GITHUB_ENV

- name: Set up Node.js
run: |
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs

- name: Verify Node.js installation
run: |
node -v
npm -v

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y devscripts debhelper

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

- name: Create artifacts directory and move .deb files
run: |
mkdir -p artifacts
mv ../*.deb artifacts/ || mv ./*.deb artifacts/
ls -la artifacts

- name: Upload Debian Package
uses: actions/upload-artifact@v4
with:
name: "${{ env.REPO_NAME }}-${{ env.OS_VERSION }}"
path: artifacts/*.deb

release:
name: "Upload assets to release"
needs: build-deb-package
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-22.04]

env:
OS_VERSION: ${{ matrix.os }}
if: ${{ github.ref_type == 'tag' }}
permissions:
contents: write
actions: read
steps:
- uses: actions/checkout@v4

- name: Extract and print repository name
run: |
echo "REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2)" >> $GITHUB_ENV

- uses: actions/download-artifact@v4
with:
name: "${{ env.REPO_NAME }}-${{ env.OS_VERSION }}"
path: "${{ env.REPO_NAME }}-${{ env.OS_VERSION }}"

- name: Create release asset archives
run: zip --junk-paths --recurse-paths --compression-method store "${{ env.REPO_NAME }}-${{ env.OS_VERSION }}.zip" "${{ env.REPO_NAME }}-${{ env.OS_VERSION }}"

- name: Upload release assets
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.ref_name }} "${{ env.REPO_NAME }}-${{ env.OS_VERSION }}.zip"

44 changes: 44 additions & 0 deletions .github/workflows/publish-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Cut a new tag (also auto updates package.json and package-lock.json)

on:
workflow_dispatch:
inputs:
release_type:
description: 'Version bump type (patch, minor, major)'
required: true
default: 'patch'

jobs:
bump-version:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20'

- name: Get triggering user's email
run: |
user_email=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/users/${{ github.actor }} | jq -r '.email')
if [ -z "$user_email" ] || [ "$user_email" == "null" ]; then
user_email="[email protected]"
fi
echo "user_email=$user_email" >> $GITHUB_ENV

- name: Configure Git with the triggering user's info
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"


- name: Bump version and push tag
run: |
npm install
npm version ${{ github.event.inputs.release_type }} -m "chore: bump version to %s"
git push --follow-tags
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,10 @@
node_modules
dist
dist-tsc
debian/.debhelper/
debian/debhelper-build-stamp
debian/files
debian/**/copyright
debian/**/changelog.gz
debian/**/md5sums
debian/**/var/www/*
40 changes: 16 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,36 @@ This plugins adds a button in the options dropdown menu to start a Tour to guide

You can configure some "Learn More" links that are shown in some steps (screenshare, whiteboard, general) in the settings of the plugin, see example below.

## Running the Plugin From Source Code

1. Start the development server:

```bash
npm install
npm start
```

2. Add this to the `settings.yml` of the BBB HTML5-client:
```yaml
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This portion seems to be core configuration of this plugin, it is not supposed to be taken off without being replaced with the newest version of this setting. @germanocaumo Could you take a look and see if it's still used in the plugin?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is still needed, to be able to configure the help links shown in the tour.
@antobinary

public:
plugins:
- name: TourPlugin
url: <<PLUGIN_URL>>
settings:
url:
screenshare: "https://some.url.with.more.information"
whiteboard: "https://some.url.with.more.information"
general: "https://some.url.with.more.information"
```

## Building the Plugin

To build the plugin for production use, follow these steps:

```bash
npm install
npm ci
npm run build-bundle
```

The above command will generate the `dist` folder, containing the bundled JavaScript file named `TourPlugin.js`. This file can be hosted on any HTTPS server.

Alternatively, you can host the bundled file on the BigBlueButton server by copying dist/TourPlugin.js to the folder /var/www/bigbluebutton-default/assets/plugins. In this case, the <<PLUGIN_URL>> will be https://<your-host>/plugins/TourPlugin.js.

If you install the Plugin separated to the manifest, remember to change the `javascriptEntrypointUrl` in the `manifest.json` to the correct endpoint.

To use the plugin in BigBlueButton, send this parameter along in create call:

```
pluginManifests=[{"url":"<your-domain>/path/to/manifest.json"}]
```

Or additionally, you can add this same configuration in the `.properties` file from `bbb-web` in `/etc/bigbluebutton/bbb-web.properties`

## Development mode

As for development mode (running this plugin from source), please, refer back to https://github.com/bigbluebutton/bigbluebutton-html-plugin-sdk section `Running the Plugin from Source`

## Background

BigBlueButton added supports for plugins in 2024 with BBB 3.0.
BigBlueButton added supports for plugins in 2025 with BBB 3.0.
Check the official [documentation website](https://docs.bigbluebutton.org) for more information.

This plugin repository was created using the plugin [template repository for BigBlueButton](https://github.com/bigbluebutton/plugin-template) hosted on GitHub.
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
bbb-plugin-tour (0.1.0) jammy; urgency=medium

* initial build

-- Anton Georgiev <[email protected]> Thu, 13 Feb 2025 14:56:18 -0400
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
13
15 changes: 15 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Source: bbb-plugin-tour
Section: web
Priority: extra
Maintainer: Anton Georgiev <[email protected]>
Build-Depends: debhelper (>= 13), nodejs (>= 18)
Standards-Version: 4.1.4
Homepage: https://github.com/bigbluebutton/plugin-tour

Package: bbb-plugin-tour
Architecture: all
Depends: ${misc:Depends}, nodejs
Description: Share a webpage with all session participants
An official BigBlueButton plugin which allows
the presenter to display a web page to
all viewers inside of a session.
18 changes: 18 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Format: http://dep.debian.net/deps/dep5
Upstream-Name: bbb-plugin-template

Files: *
Copyright: 2024 BigBlueButton Inc. and by respective authors
License: LGPL-3.0+
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser 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 Lesser General Public License along
with this program. If not, see <http://www.gnu.org/licenses/>.
12 changes: 12 additions & 0 deletions 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-plugin-tour/var/www/bigbluebutton-default/assets/plugins/bbb-plugin-tour
cp -r dist/* debian/bbb-plugin-tour/var/www/bigbluebutton-default/assets/plugins/bbb-plugin-tour
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"requiredSdkVersion": "~0.0.66",
"requiredSdkVersion": "~0.0.72",
"name": "TourPlugin",
"javascriptEntrypointUrl": "https://PLUGIN_HOST/TourPlugin.js"
"javascriptEntrypointUrl": "TourPlugin.js"
}
Loading
Loading