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
43 changes: 28 additions & 15 deletions .github/workflows/update-demos.yaml
Original file line number Diff line number Diff line change
@@ -1,39 +1,52 @@
name: update-demos

on:
schedule:
- cron: '0 3 * * *' # Runs every day at 03:00 UTC
workflow_dispatch:
push:
branches: [main]
paths:
- 'api/*'
- 'config/*'
- 'hack/demo/*'
- 'test/e2e/features/demos.feature'
- 'test/e2e/steps/demo_steps.go'
- 'test/e2e/steps/asciicast_*.go'
- '.github/workflows/update-demos.yaml'
pull_request:
paths:
- 'api/*'
- 'config/*'
- 'hack/demo/*'
- 'test/e2e/features/demos.feature'
- 'test/e2e/steps/demo_steps.go'
- 'test/e2e/steps/asciicast_*.go'
- '.github/workflows/update-demos.yaml'

jobs:
demo:
generate-demos:
runs-on: ubuntu-latest
permissions:
contents: ${{ github.event_name == 'push' && 'write' || 'read' }}
env:
TERM: linux
steps:
- run: sudo apt update && sudo apt install -y asciinema curl
- uses: actions/checkout@v7.0.0
- uses: actions/setup-go@v6.4.0
with:
go-version-file: "go.mod"
- name: Run Demo Update
run: |
env -i \
HOME="$HOME" \
PATH="$PATH" \
TERM="xterm-256color" \
SHELL="/bin/bash" \
make update-demos
- uses: actions/setup-python@v6.2.0
with:
python-version: 3.x
cache: pip
- name: Generate demo recordings
run: make update-demos

- uses: actions/upload-artifact@v7
if: always()
with:
name: demo-recordings
path: |
docs/demos/*.cast
docs/demos/*.svg

- name: Deploy docs with updated demos
if: github.event_name == 'push'
run: make deploy-docs
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ vendor/
# documentation website asset folder
site

# generated demo asciicast recordings
docs/demos/

.tiltbuild/
.catalogd-tmp/
.vscode
Expand Down
38 changes: 29 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -413,11 +413,11 @@ ifeq ($(strip $(GODOG_ARGS)),)
set +e; \
KUBECONFIG=$(E2E_KUBECONFIG) \
PROMETHEUS_URL=http://localhost:$$E2E_PROMETHEUS_PORT \
go test -count=1 -v ./test/e2e/features_test.go -timeout $(or $(E2E_TIMEOUT),20m) -args --godog.tags="~@Serial" --godog.concurrency=100; \
go test -count=1 -v ./test/e2e/features_test.go -timeout $(or $(E2E_TIMEOUT),20m) -args --godog.tags="~@Serial && ~@demo" --godog.concurrency=100; \
parallelExit=$$?; \
KUBECONFIG=$(E2E_KUBECONFIG) \
PROMETHEUS_URL=http://localhost:$$E2E_PROMETHEUS_PORT \
go test -count=1 -v ./test/e2e/features_test.go -timeout $(or $(E2E_TIMEOUT),20m) -args --godog.tags="@Serial" --godog.concurrency=1; \
go test -count=1 -v ./test/e2e/features_test.go -timeout $(or $(E2E_TIMEOUT),20m) -args --godog.tags="@Serial && ~@demo" --godog.concurrency=1; \
serialExit=$$?; \
if [[ $$parallelExit -ne 0 ]] || [[ $$serialExit -ne 0 ]]; then \
echo "e2e tests failed: parallel=$$parallelExit serial=$$serialExit"; \
Expand Down Expand Up @@ -693,13 +693,33 @@ deploy-docs: venv
. $(VENV)/activate; \
mkdocs gh-deploy --force --strict

# The demo script requires to install asciinema with: brew install asciinema to run on mac os envs.
# Please ensure that all demos are named with the demo name and the suffix -demo-script.sh
.PHONY: update-demos #EXHELP Validate demo recordings.
update-demos:
@for script in hack/demo/*-demo-script.sh; do \
nm=$$(basename $$script -script.sh); \
./hack/demo/generate-asciidemo.sh -n $$nm $$(basename $$script); \
DEMO_OUTPUT_DIR ?= $(ROOT_DIR)/docs/demos

.PHONY: update-demos
update-demos: SOURCE_MANIFEST := $(EXPERIMENTAL_E2E_MANIFEST)
update-demos: export MANIFEST := $(EXPERIMENTAL_RELEASE_MANIFEST)
update-demos: export DEFAULT_CATALOG := $(CATALOGS_MANIFEST)
update-demos: export INSTALL_DEFAULT_CATALOGS := true
update-demos: export CATALOG_WAIT_TIMEOUT := 5m
update-demos: wait-operator-controller-experimental-e2e demo-e2e demo-svg experimental-e2e-teardown #EXHELP Record demo scenarios as asciicast and SVG files.

.PHONY: demo-e2e
demo-e2e:
@command -v curl >/dev/null 2>&1 || { echo "Error: curl not found in PATH."; exit 1; }
@command -v jq >/dev/null 2>&1 || { echo "Error: jq not found in PATH."; exit 1; }
@mkdir -p $(DEMO_OUTPUT_DIR)
KUBECONFIG=$(KUBECONFIG_DIR)/operator-controller-experimental-e2e.kubeconfig \
DEMO_OUTPUT_DIR=$(DEMO_OUTPUT_DIR) go test -count=1 -v ./test/e2e/features_test.go -timeout 30m \
-args --godog.tags="@demo" --godog.concurrency=1

.PHONY: demo-svg
demo-svg: #EXHELP Convert asciicast recordings to SVG.
@command -v docker >/dev/null 2>&1 || { echo "Error: docker not found in PATH."; exit 1; }
@for cast in $(DEMO_OUTPUT_DIR)/*.cast; do \
svg=$${cast%.cast}.svg; \
echo "Converting $$(basename $$cast) -> $$(basename $$svg)"; \
docker run --rm -v $(DEMO_OUTPUT_DIR):/data node:alpine \
npx --yes svg-term-cli --in /data/$$(basename $$cast) --out /data/$$(basename $$svg) --window; \
done

include Makefile.venv
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ To get started with OLM v1, please see our [Getting Started](https://operator-fr

### Quickstart DEMO

[![asciicast](https://asciinema.org/a/682344.svg)](https://asciinema.org/a/682344)
[![ClusterCatalog Demo](https://operator-framework.github.io/operator-controller/demos/clustercatalog-quickstart.svg)](https://operator-framework.github.io/operator-controller/)

### ClusterCatalog Quickstart Steps

Expand Down
6 changes: 5 additions & 1 deletion docs/draft/howto/enable-webhook-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,8 @@ There's no change in the installation flow. Just install a bundle containing web
As there is no difference in usage or experience between the CertManager and Openshift-ServiceCA variants, only
the cert-manager variant is demoed.

[![asciicast](https://asciinema.org/a/GyjsB129GkUadeuxFhNuG4FcS.svg)](https://asciinema.org/a/GyjsB129GkUadeuxFhNuG4FcS)
```asciinema-player
{
"file": "../../../demos/webhook-support.cast"
}
```
12 changes: 10 additions & 2 deletions docs/draft/howto/single-ownnamespace-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,19 @@ include *installModes*.

### SingleNamespace Install

[![SingleNamespace Install Demo](https://asciinema.org/a/w1IW0xWi1S9cKQFb9jnR07mgh.svg)](https://asciinema.org/a/w1IW0xWi1S9cKQFb9jnR07mgh)
```asciinema-player
{
"file": "../../../demos/singlenamespace-install-mode.cast"
}
```

### OwnNamespace Install

[![OwnNamespace Install Demo](https://asciinema.org/a/Rxx6WUwAU016bXFDW74XLcM5i.svg)](https://asciinema.org/a/Rxx6WUwAU016bXFDW74XLcM5i)
```asciinema-player
{
"file": "../../../demos/ownnamespace-install-mode.cast"
}
```

## Enabling the Feature-Gate

Expand Down
38 changes: 0 additions & 38 deletions hack/demo/catalogd-demo-script.sh

This file was deleted.

44 changes: 0 additions & 44 deletions hack/demo/catalogd-metas-demo-script.sh

This file was deleted.

91 changes: 0 additions & 91 deletions hack/demo/generate-asciidemo.sh

This file was deleted.

Loading