Skip to content
Merged
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
96 changes: 96 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Release

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: write
pull-requests: write
packages: write

concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false

jobs:
release-please:
runs-on: ubuntu-22.04
outputs:
release_created: ${{ steps.release.outputs.release_created }}
version: ${{ steps.release.outputs.version }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- name: Release Please
id: release
uses: googleapis/release-please-action@v4
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json

publish:
needs: release-please
if: needs.release-please.outputs.release_created == 'true'
runs-on: ubuntu-22.04
steps:
- name: Checkout release tag
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
ref: ${{ needs.release-please.outputs.tag_name }}

- name: Log in to GHCR for Docker
uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 # v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build release image
shell: bash
env:
IMAGE_TAG: ghcr.io/nomed/rustdesk-web-stack:${{ needs.release-please.outputs.version }}
run: bash build/build-baseline-image.sh

- name: Publish release image
shell: bash
run: |
set -euo pipefail
version='${{ needs.release-please.outputs.version }}'
docker push "ghcr.io/nomed/rustdesk-web-stack:${version}"
docker tag "ghcr.io/nomed/rustdesk-web-stack:${version}" "ghcr.io/nomed/rustdesk-web-stack:v${version}"
docker tag "ghcr.io/nomed/rustdesk-web-stack:${version}" ghcr.io/nomed/rustdesk-web-stack:latest
docker push "ghcr.io/nomed/rustdesk-web-stack:v${version}"
docker push ghcr.io/nomed/rustdesk-web-stack:latest

- name: Set up Helm
uses: azure/setup-helm@v4.3.1

- name: Validate Helm chart
shell: bash
run: |
set -euo pipefail
helm lint charts/rustdesk-web
helm template rustdesk-web charts/rustdesk-web >/dev/null

- name: Package Helm chart
shell: bash
run: |
set -euo pipefail
version='${{ needs.release-please.outputs.version }}'
test "$(awk '/^version:/ {print $2}' charts/rustdesk-web/Chart.yaml)" = "${version}"
test "$(awk -F'"' '/^appVersion:/ {print $2}' charts/rustdesk-web/Chart.yaml)" = "${version}"
mkdir -p dist/chart
helm package charts/rustdesk-web --destination dist/chart

- name: Log in to GHCR for Helm
shell: bash
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io --username "${{ github.actor }}" --password-stdin

- name: Publish Helm chart as OCI
shell: bash
run: |
set -euo pipefail
version='${{ needs.release-please.outputs.version }}'
helm push "dist/chart/rustdesk-web-${version}.tgz" oci://ghcr.io/nomed/charts
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.0.0"
}
62 changes: 40 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,36 @@ Unofficial, reproducible packaging and deployment stack for the RustDesk Web Cli

RustDesk still actively maintains browser-specific application code, and its main GitHub Actions workflow still contains a `build-rustdesk-web` job. However, that job is currently disabled (`if: False`) and the current OSS tree no longer ships the `flutter/web` scaffold that the disabled job assumes is present.

This repository therefore separates the build into two pinned inputs:
This repository keeps the current-source reconstruction as an experimental track and uses a pinned, known web-capable RustDesk baseline for the deployable OCI artifacts.

1. the current official RustDesk source revision, which remains authoritative for the Dart/Rust application code;
2. a pinned RustDesk-derived historical web scaffold used only to restore `flutter/web` (HTML/bootstrap/JS build sources).
## Release artifacts

The historical scaffold's vendored codec/runtime binaries are discarded. The build downloads RustDesk's official `web_deps.tar.gz`, rebuilds the JavaScript bridge against the pinned current RustDesk source, and then runs the Flutter web build.
Releases are managed by Release Please and use one semantic version across the repository, container image and Helm chart.

For a release such as `v0.1.0` the workflow publishes:

```text
ghcr.io/nomed/rustdesk-web-stack:0.1.0
ghcr.io/nomed/rustdesk-web-stack:v0.1.0
ghcr.io/nomed/rustdesk-web-stack:latest
oci://ghcr.io/nomed/charts/rustdesk-web --version 0.1.0
```

Install the Helm chart directly from GHCR:

```bash
helm install rustdesk-web \
oci://ghcr.io/nomed/charts/rustdesk-web \
--version 0.1.0
```

By default the chart uses the image version matching `Chart.appVersion`. Override `image.tag` only when intentionally testing a different image.

## Goals

- build the RustDesk Web Client from a pinned upstream revision;
- build the RustDesk Web Client from pinned, reviewable source inputs;
- package the generated Flutter Web assets as an OCI image;
- publish the Helm chart as an OCI artifact to GHCR;
- expose the web application through a standard HTTP server;
- deploy `hbbs` and `hbbr` with the WebSocket endpoints required by browser clients;
- provide a Kubernetes/Helm deployment path;
Expand Down Expand Up @@ -60,33 +79,32 @@ container/ Runtime container for generated web assets
charts/rustdesk-web/ Helm chart
examples/ Example values/configuration
docs/ Architecture and operational notes
.github/workflows/ CI/build automation
.github/workflows/ CI, Release Please and publication automation
```

## Reproducible web build
## Build tracks

`build/build-baseline-image.sh` is the release path. Its inputs are pinned in `build/baseline.env` and it produces the web runtime image plus `dist/web`.

`build/build-web.sh` is the experimental current-RustDesk reconstruction. Its inputs are pinned in `build/upstream.env`; it restores the historical `flutter/web` scaffold and attempts to regenerate it against current official RustDesk code.

Pinned build inputs live in `build/upstream.env`.
## Versioning

The build implemented by `build/build-web.sh`:
Release Please owns the repository version. Conventional commits drive version bumps and the release PR updates:

1. checks out the pinned official RustDesk revision;
2. applies the Flutter patch used by RustDesk upstream when required;
3. restores only `flutter/web` from the pinned historical scaffold;
4. removes vendored historical web runtime binaries;
5. downloads and extracts RustDesk's official `web_deps.tar.gz`;
6. rebuilds the web JavaScript bridge (`ts-proto`, TypeScript, Vite 2.8);
7. runs `flutter pub get` and `flutter build web --release`;
8. writes provenance to `dist/web/BUILD-INFO.txt`.
- `CHANGELOG.md`;
- `.release-please-manifest.json`;
- `charts/rustdesk-web/Chart.yaml` (`version` and `appVersion`).

The GitHub Actions workflow uploads the web artifact and, on `main`, builds/publishes the static runtime image to GHCR.
When the Release Please PR is merged, the same release workflow creates the GitHub release and publishes both the versioned container image and the Helm chart to GHCR.

## Roadmap

1. Get the reconstructed Web Client build green in CI.
1. Validate the pinned Web Client baseline and OCI release pipeline.
2. Validate a real browser-to-agent session against self-hosted `hbbs`/`hbbr`.
3. Publish a minimal static web container with a tested tag/version policy.
4. Complete Helm templates for the web client plus `hbbs`/`hbbr` services.
5. Add HTTPS/WSS ingress examples and an end-to-end browser connection test.
3. Complete Helm templates for the web client plus `hbbs`/`hbbr` services.
4. Add HTTPS/WSS ingress examples and an end-to-end browser connection test.
5. Continue the current-RustDesk reconstruction until it can replace the baseline release source.

## License and upstream components

Expand Down
6 changes: 4 additions & 2 deletions charts/rustdesk-web/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
apiVersion: v2
name: rustdesk-web
version: 0.1.0
appVersion: "dev"
version: 0.1.0 # x-release-please-version
appVersion: "0.1.0" # x-release-please-version
description: Unofficial Helm chart for the RustDesk Web Client deployment stack
type: application
home: https://github.com/nomed/rustdesk-web-stack
sources:
- https://github.com/nomed/rustdesk-web-stack
- https://github.com/rustdesk/rustdesk
annotations:
artifacthub.io/license: AGPL-3.0
6 changes: 3 additions & 3 deletions charts/rustdesk-web/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ spec:
spec:
containers:
- name: web
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
image: "{{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.service.targetPort }}
protocol: TCP
readinessProbe:
httpGet:
path: /healthz
path: /
port: http
livenessProbe:
httpGet:
path: /healthz
path: /
port: http
resources:
{{ toYaml .Values.resources | indent 12 }}
Expand Down
6 changes: 3 additions & 3 deletions charts/rustdesk-web/values.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
replicaCount: 1

image:
repository: ghcr.io/nomed/rustdesk-web
tag: dev
repository: ghcr.io/nomed/rustdesk-web-stack
tag: ""
pullPolicy: IfNotPresent

service:
type: ClusterIP
port: 80
targetPort: 8080
targetPort: 80

ingress:
enabled: false
Expand Down
20 changes: 20 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"release-type": "simple",
"include-v-in-tag": true,
"include-component-in-tag": false,
"pull-request-title-pattern": "chore: release ${version}",
"packages": {
".": {
"package-name": "rustdesk-web-stack",
"initial-version": "0.1.0",
"changelog-path": "CHANGELOG.md",
"extra-files": [
{
"type": "generic",
"path": "charts/rustdesk-web/Chart.yaml"
}
]
}
}
}
Loading