Skip to content
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
119 changes: 119 additions & 0 deletions .github/workflows/example-node21-websocket-stable.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: examples/node21-websocket (stable)

on:
workflow_dispatch:

push:
branches: [main]
paths:
- '.github/workflows/example-node21-websocket-stable.yaml'
- 'node21-websocket/**'
- '!node21-websocket/README.md'

pull_request:
types: [opened, synchronize, reopened]
branches: [main]
paths:
- '.github/workflows/example-node21-websocket-stable.yaml'
- 'node21-websocket/**'
- '!node21-websocket/README.md'

schedule:
- cron: '0 4 * * 1-6' # Every work day at 4AM

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

env:
UKC_METRO: ${{ vars.UKC_METRO }}
UKC_TOKEN: ${{ secrets.UKC_TOKEN }}
KRAFTKIT_NO_CHECK_UPDATES: true
KRAFTKIT_LOG_LEVEL: debug

jobs:
integration:
timeout-minutes: 60
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Test
id: test
uses: unikraft/kraftkit@staging
continue-on-error: true
with:
run: |
set -xe;

cd node21-websocket;
wget https://github.com/vi/websocat/releases/download/v1.14.0/websocat.x86_64-unknown-linux-musl;
chmod a+x websocat.x86_64-unknown-linux-musl;

kraft cloud deploy \
--no-start \
--memory 1Gi \
--name node21-websocket-stable-${GITHUB_RUN_ID} \
--runtime index.unikraft.io/official-testing/node:21 \
--subdomain node21-websocket-stable-${GITHUB_RUN_ID} \
-p 443:8080 \
.;

# wait for the instance to start
kraft cloud vm start -w 60s node21-websocket-stable-${GITHUB_RUN_ID};
sleep 5;

echo "hello" | ./websocat.x86_64-unknown-linux-musl wss://node21-websocket-stable-${GITHUB_RUN_ID}.${UKC_METRO}.kraft.host | grep "hello" > /dev/null

- name: Cleanup
uses: unikraft/kraftkit@staging
if: always()
with:
run: |
set -xe;

kraft cloud vm stop node21-websocket-stable-${GITHUB_RUN_ID} || true;
kraft cloud vm logs node21-websocket-stable-${GITHUB_RUN_ID} || true;
kraft cloud vm rm node21-websocket-stable-${GITHUB_RUN_ID} || true;
kraft cloud img rm index.unikraft.io/test/node21-websocket-stable-${GITHUB_RUN_ID} || true;

- name: Re-test with debug info
id: re-test
if: ${{ success() && steps.test.outcome == 'failure' }}
uses: unikraft/kraftkit@staging
with:
run: |
set -xe;

cd node21-websocket;
wget https://github.com/vi/websocat/releases/download/v1.14.0/websocat.x86_64-unknown-linux-musl;
chmod a+x websocat.x86_64-unknown-linux-musl;

kraft cloud deploy \
--no-start \
--memory 1Gi \
--name node21-websocket-stable-${GITHUB_RUN_ID}-dbg \
--runtime index.unikraft.io/official-testing/node:21-dbg \
--subdomain node21-websocket-stable-${GITHUB_RUN_ID}-dbg \
-p 443:8080 \
.;

# wait for the instance to start
kraft cloud vm start -w 60s node21-websocket-stable-${GITHUB_RUN_ID}-dbg
sleep 5;

echo "hello" | ./websocat.x86_64-unknown-linux-musl wss://node21-websocket-stable-${GITHUB_RUN_ID}.${UKC_METRO}.kraft.host | grep "hello" > /dev/null

- name: Cleanup Debug
uses: unikraft/kraftkit@staging
if: always()
with:
run: |
set -xe;

kraft cloud vm stop node21-websocket-stable-${GITHUB_RUN_ID}-dbg || true;
kraft cloud vm logs node21-websocket-stable-${GITHUB_RUN_ID}-dbg || true;
kraft cloud vm rm node21-websocket-stable-${GITHUB_RUN_ID}-dbg || true;
kraft cloud img rm index.unikraft.io/test/node21-websocket-stable-${GITHUB_RUN_ID}-dbg || true;
119 changes: 119 additions & 0 deletions .github/workflows/example-node21-websocket-staging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
name: examples/node21-websocket (staging)

on:
workflow_dispatch:

push:
branches: [main]
paths:
- '.github/workflows/example-node21-websocket-staging.yaml'
- 'node21-websocket/**'
- '!node21-websocket/README.md'

pull_request:
types: [opened, synchronize, reopened]
branches: [main]
paths:
- '.github/workflows/example-node21-websocket-staging.yaml'
- 'node21-websocket/**'
- '!node21-websocket/README.md'

schedule:
- cron: '0 4 * * 1-6' # Every work day at 4AM

# Automatically cancel in-progress actions on the same branch
concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
cancel-in-progress: true

env:
UKC_METRO: ${{ vars.UKC_METRO }}
UKC_TOKEN: ${{ secrets.UKC_TOKEN }}
KRAFTKIT_NO_CHECK_UPDATES: true
KRAFTKIT_LOG_LEVEL: debug

jobs:
integration:
timeout-minutes: 60
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Test
id: test
uses: unikraft/kraftkit@staging
continue-on-error: true
with:
run: |
set -xe;

cd node21-websocket;
wget https://github.com/vi/websocat/releases/download/v1.14.0/websocat.x86_64-unknown-linux-musl;
chmod a+x websocat.x86_64-unknown-linux-musl;

kraft cloud deploy \
--no-start \
--memory 1Gi \
--name node21-websocket-staging-${GITHUB_RUN_ID} \
--runtime index.unikraft.io/official-staging/node:21 \
--subdomain node21-websocket-staging-${GITHUB_RUN_ID} \
-p 443:8080 \
.;

# wait for the instance to start
kraft cloud vm start -w 60s node21-websocket-staging-${GITHUB_RUN_ID};
sleep 5;

echo "hello" | ./websocat.x86_64-unknown-linux-musl wss://node21-websocket-stable-${GITHUB_RUN_ID}.${UKC_METRO}.kraft.host | grep "hello" > /dev/null

- name: Cleanup
uses: unikraft/kraftkit@staging
if: always()
with:
run: |
set -xe;

kraft cloud vm stop node21-websocket-staging-${GITHUB_RUN_ID} || true;
kraft cloud vm logs node21-websocket-staging-${GITHUB_RUN_ID} || true;
kraft cloud vm rm node21-websocket-staging-${GITHUB_RUN_ID} || true;
kraft cloud img rm index.unikraft.io/test/node21-websocket-staging-${GITHUB_RUN_ID} || true;

- name: Re-test with debug info
id: re-test
if: ${{ success() && steps.test.outcome == 'failure' }}
uses: unikraft/kraftkit@staging
with:
run: |
set -xe;

cd node21-websocket;
wget https://github.com/vi/websocat/releases/download/v1.14.0/websocat.x86_64-unknown-linux-musl;
chmod a+x websocat.x86_64-unknown-linux-musl;

kraft cloud deploy \
--no-start \
--memory 1Gi \
--name node21-websocket-staging-${GITHUB_RUN_ID}-dbg \
--runtime index.unikraft.io/official-staging/node:21-dbg \
--subdomain node21-websocket-staging-${GITHUB_RUN_ID}-dbg \
-p 443:8080 \
.;

# wait for the instance to start
kraft cloud vm start -w 60s node21-websocket-staging-${GITHUB_RUN_ID}-dbg;
sleep 5;

echo "hello" | ./websocat.x86_64-unknown-linux-musl wss://node21-websocket-stable-${GITHUB_RUN_ID}.${UKC_METRO}.kraft.host | grep "hello" > /dev/null

- name: Cleanup Debug
uses: unikraft/kraftkit@staging
if: always()
with:
run: |
set -xe;

kraft cloud vm stop node21-websocket-staging-${GITHUB_RUN_ID}-dbg || true;
kraft cloud vm logs node21-websocket-staging-${GITHUB_RUN_ID}-dbg || true;
kraft cloud vm rm node21-websocket-staging-${GITHUB_RUN_ID}-dbg || true;
kraft cloud img rm index.unikraft.io/test/node21-websocket-staging-${GITHUB_RUN_ID}-dbg || true;
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Example | Unikraft Cloud <br /> `stable` | Unikraft Cloud <br /> `staging` |
[`node18-nextjs`](https://github.com/unikraft-cloud/examples/tree/main/node21-nextjs) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node18-nextjs-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node18-nextjs-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node18-nextjs-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node18-nextjs-staging.yaml) |
[`node21-solidstart`](https://github.com/unikraft-cloud/examples/tree/main/node21-solid-start) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-solidstart-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-solidstart-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-solidstart-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-solidstart-staging.yaml) |
[`node21-remix`](https://github.com/unikraft-cloud/examples/tree/main/node21-remix) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-remix-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-remix-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-remix-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-remix-staging.yaml) |
[`node21-websocket`](https://github.com/unikraft-cloud/examples/tree/main/node21-websocket) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-websocket-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-websocket-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-websocket-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node21-websocket-staging.yaml) |
[`node18-prisma`](https://github.com/unikraft-cloud/examples/tree/main/node18-prisma-rest-express) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node18-prisma-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node18-prisma-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node18-prisma-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node18-prisma-staging.yaml) |
[`node-playwright-chromium`](https://github.com/unikraft-cloud/examples/tree/main/node-playwright-chromium) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-chromium-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-chromium-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-chromium-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-chromium-staging.yaml) |
[`node-playwright-firefox`](https://github.com/unikraft-cloud/examples/tree/main/node-playwright-firefox) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-firefox-stable.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-firefox-stable.yaml) | [![](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-firefox-staging.yaml/badge.svg)](https://github.com/unikraft-cloud/examples/actions/workflows/example-node-playwright-firefox-staging.yaml) |
Expand Down
3 changes: 3 additions & 0 deletions chromium-cdp/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/node_modules/
/.unikraft/
/*.png
3 changes: 3 additions & 0 deletions chromium-cdp/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/node_modules/
/.unikraft/
/*.png
Loading