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

on:
workflow_dispatch:

push:
branches: [ada-dev1419/java17-springboot3.2.x-workflows]
paths:
- '.github/workflows/example-java17-springboot3.2.x-stable.yaml'
- 'java17-springboot3.2.x/**'
- '!java17-springboot3.2.x/README.md'

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

schedule:
- cron: '0 15 * * 1-5'

# 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: "https://api.${{ vars.UKC_METRO_STABLE }}.unikraft.cloud/v1"
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
with:
run: |
set -xe;
cd java17-springboot3.2.x;
kraft cloud deploy \
--no-start \
--memory 1024 \
--name java17-springboot3.2.x-${GITHUB_RUN_ID} \
--runtime index.unikraft.io/official-testing/base-compat:latest \
--subdomain java17-springboot3.2.x-${GITHUB_RUN_ID} \
-p 443:8080 \
.;
# wait for the instance to start
kraft cloud vm start -w 5s java17-springboot3.2.x-${GITHUB_RUN_ID};
sleep 5;
curl -Lv --fail-with-body --max-time 10 https://java17-springboot3.2.x-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app
- name: Cleanup
uses: unikraft/kraftkit@staging
if: always()
with:
run: |
set -xe;
kraft cloud vm stop java17-springboot3.2.x-${GITHUB_RUN_ID} || true;
kraft cloud vm logs java17-springboot3.2.x-${GITHUB_RUN_ID} || true;
kraft cloud vm rm java17-springboot3.2.x-${GITHUB_RUN_ID} || true;
kraft cloud img rm index.unikraft.io/test/java17-springboot3.2.x-${GITHUB_RUN_ID} || true;
Comment on lines 50 to +71
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
kraft cloud deploy \
--no-start \
--memory 1024 \
--name http-java17-${GITHUB_RUN_ID} \
--name java17-springboot3.2.x-${GITHUB_RUN_ID} \
--runtime index.unikraft.io/official-testing/base-compat:latest \
--subdomain http-java17-${GITHUB_RUN_ID} \
--subdomain java17-springboot3.2.x-${GITHUB_RUN_ID} \
-p 443:8080 \
.;
# wait for the instance to start
kraft cloud vm start -w 5s http-java17-${GITHUB_RUN_ID};
kraft cloud vm start -w 5s java17-springboot3.2.x-${GITHUB_RUN_ID};
sleep 5;
curl -Lv --fail-with-body --max-time 10 https://http-java17-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app
curl -Lv --fail-with-body --max-time 10 https://java17-springboot3.2.x-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app
- name: Cleanup
uses: unikraft/kraftkit@staging
if: always()
with:
run: |
set -xe;
kraft cloud vm stop http-java17-${GITHUB_RUN_ID} || true;
kraft cloud vm logs http-java17-${GITHUB_RUN_ID} || true;
kraft cloud vm rm http-java17-${GITHUB_RUN_ID} || true;
kraft cloud img rm index.unikraft.io/test/http-java17-${GITHUB_RUN_ID} || true;
kraft cloud vm stop java17-springboot3.2.x-${GITHUB_RUN_ID} || true;
kraft cloud vm logs java17-springboot3.2.x-${GITHUB_RUN_ID} || true;
kraft cloud vm rm java17-springboot3.2.x-${GITHUB_RUN_ID} || true;
kraft cloud img rm index.unikraft.io/test/java17-springboot3.2.x-${GITHUB_RUN_ID} || true;
kraft cloud deploy \
--no-start \
--memory 1024 \
--name java17-springboot32x-${GITHUB_RUN_ID} \
--runtime index.unikraft.io/official-testing/base-compat:latest \
--subdomain java17-springboot32x-${GITHUB_RUN_ID} \
-p 443:8080 \
.;
# wait for the instance to start
kraft cloud vm start -w 5s java17-springboot32x-${GITHUB_RUN_ID};
sleep 5;
curl -Lv --fail-with-body --max-time 10 https://java17-springboot32x-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STABLE }}.unikraft.app
- name: Cleanup
uses: unikraft/kraftkit@staging
if: always()
with:
run: |
set -xe;
kraft cloud vm stop java17-springboot32x-${GITHUB_RUN_ID} || true;
kraft cloud vm logs java17-springboot32x-${GITHUB_RUN_ID} || true;
kraft cloud vm rm java17-springboot32x-${GITHUB_RUN_ID} || true;
kraft cloud img rm index.unikraft.io/test/java17-springboot32x-${GITHUB_RUN_ID} || true;

You cannot have dots (.) in the instance nam or domain name.

71 changes: 71 additions & 0 deletions .github/workflows/example-java17-springboot3.2.x-staging.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: examples/java17-springboot3.2.x (staging)

on:
workflow_dispatch:

push:
branches: [ada-dev1419/java17-springboot3.2.x]
paths:
- '.github/workflows/example-java17-springboot3.2.x-staging.yaml'
- 'java17-springboot3.2.x/**'
- '!java17-springboot3.2.x/README.md'

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

schedule:
- cron: '0 15 * * 1-5'

# 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: "https://api.${{ vars.UKC_METRO_STAGING }}.unikraft.cloud/v1"
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
with:
run: |
set -xe;
cd java17-springboot3.2.x;
kraft cloud deploy \
--no-start \
--memory 1024 \
--name java17-springboot3.2.x-${GITHUB_RUN_ID} \
--runtime index.unikraft.io/official-staging/base-compat:latest \
--subdomain java17-springboot3.2.x-${GITHUB_RUN_ID} \
-p 443:8080 \
.;
# wait for the instance to start
kraft cloud vm start -w 5s java17-springboot3.2.x-${GITHUB_RUN_ID};
sleep 5;
curl -Lv --fail-with-body --max-time 10 https://java17-springboot3.2.x-${GITHUB_RUN_ID}.${{ vars.UKC_METRO_STAGING }}.unikraft.app
- name: Cleanup
uses: unikraft/kraftkit@staging
if: always()
with:
run: |
set -xe;
kraft cloud vm stop java17-springboot3.2.x-${GITHUB_RUN_ID} || true;
kraft cloud vm logs java17-springboot3.2.x-${GITHUB_RUN_ID} || true;
kraft cloud vm rm java17-springboot3.2.x-${GITHUB_RUN_ID} || true;
kraft cloud img rm index.unikraft.io/test/java17-springboot3.2.x-${GITHUB_RUN_ID} || true;
Loading