Compare commits

...
Author SHA1 Message Date
OmkarDeshpande7 3347da7b42 Add release v0.1.1 2026-09-15 22:44:08 +05:30
OmkarDeshpande7andClaude Sonnet 5 6ef6e413d9 fix: remove dead Swagger UI generation steps from Pages workflow
Steps referenced scripts/generate_all_openapi.sh and
scripts/generate_swagger_links.sh, which don't exist in this repo
(copied over from platform9/vjailbreak's workflow). This made the
build job fail on every run, so Pages fell back to serving whatever
was last manually committed to gh-pages instead of a fresh build.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-09-12 22:57:39 +05:30
OmkarDeshpande7 52b0f2e5ac add github actions 2026-09-12 22:36:10 +05:30
14 changed files with 2491 additions and 0 deletions
+93
View File
@@ -0,0 +1,93 @@
name: Rebase PR
on:
issue_comment:
types: [created]
workflow_dispatch: # Enable manual triggering
inputs:
branch:
description: 'Select the branch to rebase the PR too'
required: true
jobs:
check-comment:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
is_rebase: ${{ steps.check-rebase.outputs.is_rebase }}
steps:
- name: Check comment is rebase
if: ${{ github.event.issue.pull_request }} && startsWith(github.event.comment.body || '', '/rebase')
id: check-rebase
run: |
echo "User Comment: $COMMENT_BODY"
echo "is_rebase=true" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMMENT_BODY: ${{ github.event.comment.body }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
rebase:
needs: check-comment
if: ${{ needs.check-comment.outputs.is_rebase }}
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
id-token: write
steps:
- name: Check user permissions
id: check-permissions
run: |
USER_LOGIN="${{ github.event.comment.user.login }}"
COLLABORATORS=$(gh api "/repos/${{ github.repository }}/collaborators" \
--jq '.[] | select(.permissions.admin == true or .permissions.maintain == true or .permissions.push == true) | .login')
if [[ "$COLLABORATORS" =~ "$USER_LOGIN" ]]; then
echo "is_authorized=true" >> $GITHUB_OUTPUT
else
echo "::error::User $USER_LOGIN lacks required permissions"
gh pr comment ${{ github.event.issue.number }} --body "$USER_LOGIN lacks required permissions. Please contact a maintainer."
exit 1
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout code
uses: actions/checkout@v4
- name: Install GitHub CLI
run: |
sudo apt-get update
sudo apt-get install gh
echo "gh cli installed"
- name: Find latest release branch
id: find_release_branch
run: |
git fetch origin
LATEST_BRANCH=$(git branch -r | grep 'origin/release-v' | sed 's/origin\///' | sort -V | tail -n 1)
echo "Latest release branch: $LATEST_BRANCH"
echo "latest_branch=$LATEST_BRANCH" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Rebase current PR onto latest release branch
if: ${{ needs.check-comment.outputs.is_rebase }} && steps.check-permissions.outputs.is_authorized == 'true'
run: |
# Configure Git
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub Actions Bot"
echo "going to branch: $TARGET_BRANCH"
git fetch origin $TARGET_BRANCH
#git rebase origin/$TARGET_BRANCH
gh pr edit ${{ github.event.issue.number }} --base $TARGET_BRANCH
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.event.repository.name }}
TARGET_BRANCH: ${{ steps.find_release_branch.outputs.latest_branch }}
@@ -0,0 +1,161 @@
name: Update Release Notes on Release Event
env:
QCOW2_IMG: ${{ vars.REGISTRY }}/${{ vars.REPO }}/vjailbreak
on:
release:
types: [published]
workflow_dispatch:
inputs:
logLevel:
description: 'Log level'
required: true
default: 'info'
type: choice
options:
- info
- warning
- debug
environment:
description: 'Environment to run in'
type: environment
required: true
branch:
description: 'Branch to use'
required: true
default: 'gh-pages'
release_tag:
description: 'Manually run for a specific release tag'
required: true
type: text
jobs:
check-and-wait-for-artifacts:
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.get_tag.outputs.tag }}
steps:
- name: Set Tag for Release Event
if: github.event_name == 'release'
id: set_release_tag
run: echo "tag=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
- name: Set Tag for Manual Trigger
if: github.event_name == 'workflow_dispatch'
id: set_manual_tag
run: echo "tag=${{ github.event.inputs.release_tag }}" >> $GITHUB_OUTPUT
- name: Get Tag
id: get_tag
run: echo "tag=${{ steps.set_release_tag.outputs.tag || steps.set_manual_tag.outputs.tag }}" >> $GITHUB_OUTPUT
- name: Install Dependencies
run: |
curl -LO https://github.com/oras-project/oras/releases/download/v1.2.1/oras_1.2.1_linux_amd64.tar.gz
sudo tar -C /usr/local/bin/ -xzvf oras_1.2.1_linux_amd64.tar.gz oras
- name: Wait and check for QCOW image (Max 45 mins)
run: |
RELEASE_TAG="${{ steps.get_tag.outputs.tag }}"
QCOW_IMAGE_URL="${{ env.QCOW2_IMG }}:${RELEASE_TAG}"
echo "Waiting for artifact to be available at $QCOW_IMAGE_URL"
for i in $(seq 1 135); do
if oras manifest fetch "$QCOW_IMAGE_URL" &>/dev/null; then
echo ""
echo "Success! Artifact found."
exit 0
fi
if [[ $i -eq 135 ]]; then
break
fi
sleep 20
done
echo ""
echo "Artifact not found after 45 minutes. Failing workflow."
exit 1
update-release-notes:
needs: check-and-wait-for-artifacts
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: gh-pages
fetch-depth: 0
- name: Install GitHub CLI and jq
run: |
sudo apt-get update
sudo apt-get install -y gh jq
- name: Set Tag from Previous Event
id: set_tag
run: echo "tag=${{ needs.check-and-wait-for-artifacts.outputs.tag }}" >> $GITHUB_OUTPUT
- name: Generate Notes for New Release
id: process_release
run: |
RELEASE_TAG="${{ steps.set_tag.outputs.tag }}"
echo ">>> Processing new release: $RELEASE_TAG"
RELEASE_NOTES=$(gh release view "$RELEASE_TAG" --json body --template '{{.body}}' || echo "")
if [ -z "$RELEASE_NOTES" ]; then
echo "No release notes found for $RELEASE_TAG, skipping."
echo "processed_release=false" >> $GITHUB_OUTPUT
exit 0
fi
# find the previous tag
ALL_TAGS_SORTED=$(git tag --sort=version:refname)
LAST_TAG=$(echo "$ALL_TAGS_SORTED" | grep -B 1 -x "$RELEASE_TAG" | head -n 1)
if [[ -n "$LAST_TAG" && "$LAST_TAG" != "$RELEASE_TAG" ]]; then
echo "Found previous version: $LAST_TAG. Updating version numbers in docs..."
sed -i "s|$LAST_TAG|$RELEASE_TAG|g" docs/src/content/docs/introduction/getting_started.mdx
sed -i "s|$LAST_TAG|$RELEASE_TAG|g" docs/src/components/githubRelease.astro
sed -i "s|$LAST_TAG|$RELEASE_TAG|g" docs/src/content/docs/index.mdx
fi
# Create the new release note file
FILE_NAME="docs/src/content/docs/release_docs/$RELEASE_TAG.md"
mkdir -p "$(dirname "$FILE_NAME")"
{
echo "---"
echo "title: $RELEASE_TAG"
echo "description: Release Notes for $RELEASE_TAG"
echo "---"
echo ""
echo "$RELEASE_NOTES"
} > "$FILE_NAME"
echo "processed_release=true" >> $GITHUB_OUTPUT
echo "release_tag=$RELEASE_TAG" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Archive and Delete Old Release Notes
if: steps.process_release.outputs.processed_release == 'true'
uses: platform9/vjailbreak/.github/actions/archive-old-release-notes@main
- name: Create PR with changes
if: steps.process_release.outputs.processed_release == 'true'
uses: platform9/vjailbreak/.github/actions/create-docs-pr@main
with:
branch-prefix: update-release-docs
commit-message: "docs: Update for release ${{ steps.process_release.outputs.release_tag }}"
pr-title: "docs: Update for release ${{ steps.process_release.outputs.release_tag }}"
pr-body: "This PR was automatically generated."
retry: 'false'
github-token: ${{ secrets.GITHUB_TOKEN }}
+105
View File
@@ -0,0 +1,105 @@
name: Manual Docs Backfill
env:
QCOW2_IMG: ${{ vars.REGISTRY }}/${{ vars.REPO }}/vjailbreak
on:
workflow_dispatch:
inputs:
release_tag:
description: 'Single release tag to process'
required: false
process_all_recent:
description: 'Process all missing releases'
required: true
default: true
type: boolean
jobs:
backfill-release-notes:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout gh-pages Branch
uses: actions/checkout@v4
with:
ref: gh-pages
fetch-depth: 0
- name: Install GitHub CLI and jq
run: sudo apt-get update && sudo apt-get install -y gh jq skopeo
- name: Process and Generate Release Notes
id: process_releases
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# This function processes a single release tag
process_release() {
local RELEASE_TAG=$1
if [ -f "docs/src/content/docs/release_docs/$RELEASE_TAG.md" ]; then
echo "Documentation for $RELEASE_TAG already exists, skipping."
return 0
fi
local QCOW_IMAGE_URI="docker://${{ env.QCOW2_IMG }}:${RELEASE_TAG}"
echo "--> Checking for image: $QCOW_IMAGE_URI"
if ! skopeo inspect "$QCOW_IMAGE_URI" &>/dev/null; then
echo "::warning::Image not found for tag $RELEASE_TAG. Skipping doc generation for this release."
return 0
fi
echo "--> Image found. Proceeding with doc generation."
echo ">>> Processing release: $RELEASE_TAG"
RELEASE_NOTES=$(gh release view "$RELEASE_TAG" --json body --template '{{.body}}' || echo "")
if [ -z "$RELEASE_NOTES" ]; then
echo "No release notes found for $RELEASE_TAG, skipping."; return 0
fi
local ALL_TAGS_SORTED=$(git tag --sort=version:refname)
local LAST_TAG=$(echo "$ALL_TAGS_SORTED" | grep -B 1 -x "$RELEASE_TAG" | head -n 1)
if [[ -n "$LAST_TAG" && "$LAST_TAG" != "$RELEASE_TAG" ]]; then
echo "Found previous version: $LAST_TAG. Updating docs..."
sed -i "s|$LAST_TAG|$RELEASE_TAG|g" docs/src/content/docs/introduction/getting_started.mdx
sed -i "s|$LAST_TAG|$RELEASE_TAG|g" docs/src/components/githubRelease.astro
sed -i "s|$LAST_TAG|$RELEASE_TAG|g" docs/src/content/docs/index.mdx
fi
local FILE_NAME="docs/src/content/docs/release_docs/$RELEASE_TAG.md"
mkdir -p "$(dirname "$FILE_NAME")"
{ echo "---"; echo "title: $RELEASE_TAG"; echo "description: Release Notes for $RELEASE_TAG"; echo "---"; echo ""; echo "$RELEASE_NOTES"; } > "$FILE_NAME"
echo "Created documentation file: $FILE_NAME"
PROCESSED_LIST_TEMP+="$RELEASE_TAG "
}
export -f process_release
PROCESSED_LIST_TEMP=""
if [[ -n "${{ github.event.inputs.release_tag }}" ]]; then
echo "Processing single specified release..."
process_release "${{ github.event.inputs.release_tag }}"
elif [[ "${{ github.event.inputs.process_all_recent }}" == "true" ]]; then
echo "Processing all recent missing releases..."
ALL_RELEASES=$(gh release list --limit 100 --json tagName --jq '.[].tagName' | sort -V)
for TAG in $ALL_RELEASES; do process_release "$TAG"; done
fi
echo "PROCESSED_RELEASES=${PROCESSED_LIST_TEMP}" >> $GITHUB_OUTPUT
- name: Archive and Delete Old Release Notes
if: steps.process_releases.outputs.PROCESSED_RELEASES != ''
uses: platform9/vjailbreak/.github/actions/archive-old-release-notes@main
- name: Create PR with changes
if: steps.process_releases.outputs.PROCESSED_RELEASES != ''
uses: platform9/vjailbreak/.github/actions/create-docs-pr@main
with:
branch-prefix: backfill-docs
commit-message: "docs: Backfill missing release documentation for ${{ steps.process_releases.outputs.PROCESSED_RELEASES }}"
pr-title: "docs: Backfill release documentation for ${{ steps.process_releases.outputs.PROCESSED_RELEASES }}"
pr-body: "This PR was automatically generated to backfill documentation for one or more releases."
retry: 'true'
github-token: ${{ secrets.GITHUB_TOKEN }}
+48
View File
@@ -0,0 +1,48 @@
name: Deploy Docs
on:
# Trigger the workflow every time you push to the `gh-pages` branch
# Using a different branch name? Replace `gh-pages` with your branch's name
push:
branches: [ gh-pages ]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:
inputs:
branch:
description: 'Branch to use'
required: true
default: 'gh-pages'
# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install, build, and upload your site
env:
SITE_URL: ${{ env.SITE_URL }}
BASE: ${{ github.event.repository.name }}
uses: withastro/action@v4
with:
path: docs/ # The root location of your Astro project inside the repository. (optional)
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
+76
View File
@@ -0,0 +1,76 @@
name: Pre-Release
on:
workflow_dispatch:
inputs:
tag:
description: "Release tag (e.g. v0.4.0)"
required: true
type: string
branch:
description: "Branch to use (default: main)"
required: false
default: "main"
type: string
permissions:
contents: write
pull-requests: write
jobs:
generate-crds:
name: Generate CRDs and Installer
runs-on: ubuntu-latest
steps:
- name: Checkout branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.branch || 'main' }}
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: k8s/migration/go.mod
cache-dependency-path: k8s/migration/go.sum
- name: Install controller-gen
run: |
go install sigs.k8s.io/controller-tools/cmd/[email protected]
- name: Setup Kustomize
uses: imranismail/setup-kustomize@v2
with:
kustomize-version: '5.3.0'
- name: Run build-installer
run: |
cd k8s/migration
make build-installer TAG=${{ github.event.inputs.tag }}
- name: Check for changes
id: changes
run: |
if [[ -n "$(git status --porcelain)" ]]; then
echo "changes=true" >> $GITHUB_OUTPUT
else
echo "changes=false" >> $GITHUB_OUTPUT
fi
- name: Disable git hooks
if: steps.changes.outputs.changes == 'true'
run: git config core.hooksPath /dev/null
- name: Create Pull Request
if: steps.changes.outputs.changes == 'true'
uses: peter-evans/create-pull-request@v6
with:
branch: pre-release/${{ github.event.inputs.tag }}
base: main
commit-message: "chore: generate CRDs and installer for ${{ github.event.inputs.tag }}"
title: "chore: Pre-release CRD generation for ${{ github.event.inputs.tag }}"
body: |
Auto-generated CRDs and installer manifests for `${{ github.event.inputs.tag }}`.
Please review and merge before creating the release.
+1837
View File
File diff suppressed because it is too large Load Diff
+12
View File
@@ -0,0 +1,12 @@
apiVersion: vjailbreak.k8s.pf9.io/v1alpha1
kind: OpenstackCreds
metadata:
name: openstackcreds
namespace: migration-system
spec:
OS_AUTH_URL:
OS_DOMAIN_NAME:
OS_USERNAME:
OS_PASSWORD:
OS_REGION_NAME:
OS_TENANT_NAME:
+10
View File
@@ -0,0 +1,10 @@
apiVersion: vjailbreak.k8s.pf9.io/v1alpha1
kind: VMwareCreds
metadata:
name: vmwarecreds
namespace: migration-system
spec:
VCENTER_HOST:
VCENTER_INSECURE: true
VCENTER_PASSWORD:
VCENTER_USERNAME:
+11
View File
@@ -0,0 +1,11 @@
apiVersion: vjailbreak.k8s.pf9.io/v1alpha1
kind: NetworkMapping
metadata:
name: networkmapping
namespace: migration-system
spec:
networks:
- source: VM Network
target: vlan1
- source: VM Network 2
target: vlan2
+9
View File
@@ -0,0 +1,9 @@
apiVersion: vjailbreak.k8s.pf9.io/v1alpha1
kind: StorageMapping
metadata:
name: storagemapping
namespace: migration-system
spec:
storages:
- source: vcenter-datastore-1
target: lvm
+14
View File
@@ -0,0 +1,14 @@
apiVersion: vjailbreak.k8s.pf9.io/v1alpha1
kind: MigrationTemplate
metadata:
name: migrationtemplate-windows
namespace: migration-system
spec:
networkMapping: networkmapping
storageMapping: storagemapping
osType: windows
source:
datacenter: Datacenter Name
vmwareRef: vmwarecreds
destination:
openstackRef: openstackcreds
+18
View File
@@ -0,0 +1,18 @@
apiVersion: vjailbreak.k8s.pf9.io/v1alpha1
kind: MigrationPlan
metadata:
name: vm-migration-windows-app
namespace: migration-system
spec:
migrationTemplate: migrationtemplate-windows
retry: true
migrationStrategy:
type: hot
dataCopyStart: 2024-08-2717:30:25.230Z
vmCutoverStart: 2024-08-27T17:30:25.230Z
vmCutoverEnd: 2024-08-28T17:30:25.230Z
virtualmachines:
- - winserver2k12
- winserver2k26
- - winserver2k16
- winserver2k19
+76
View File
@@ -0,0 +1,76 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: vjailbreak-ui
namespace: migration-system
spec:
replicas: 1
selector:
matchLabels:
app: vjailbreak-ui
template:
metadata:
labels:
app: vjailbreak-ui
spec:
serviceAccountName: migration-controller-manager
containers:
- name: vjailbreak-ui-container
image: platform9/vjailbreak-ui:v0.1
imagePullPolicy: Always
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: vjailbreak-ui-service
namespace: migration-system
spec:
selector:
app: vjailbreak-ui
type: ClusterIP
ports:
- protocol: TCP
port: 80
targetPort: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: vjailbreak-ui-ingress
namespace: migration-system
annotations:
nginx.ingress.kubernetes.io/backend-protocol: "HTTP"
spec:
ingressClassName: nginx
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: vjailbreak-ui-service
port:
number: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: vjailbreak-api-ingress
namespace: default
annotations:
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
spec:
ingressClassName: nginx
rules:
- http:
paths:
- path: /apis
pathType: Prefix
backend:
service:
name: kubernetes
port:
number: 443
+21
View File
@@ -0,0 +1,21 @@
# v0.1.1
- **Tag:** `v0.1.1`
- **Published:** 2024-11-19T18:36:35Z
- **Source release:** https://github.com/platform9/vjailbreak/releases/tag/v0.1.1
## Release Notes
## Release Notes
Initial release of vJailbreak.
vJailbreak qcow2 image: `quay.io/platform9/vjailbreak:0.1.1-refs-tags-v0.1.1`
Download it with [oras](https://oras.land/docs/installation)
`oras pull quay.io/platform9/vjailbreak:0.1.1-refs-tags-v0.1.1`
## vJailbreak Components
vjailbreak-controller: `quay.io/platform9/vjailbreak-controller:0.1.1-refs-tags-v0.1.1`
vjailbreak-ui: `quay.io/platform9/vjailbreak-ui:0.1.1-refs-tags-v0.1.1`
vjailbreak-v2v-helper: `quay.io/platform9/vjailbreak-v2v-helper:0.1.1-refs-tags-v0.1.1`
virt-v2v version: `virt-v2v 2.6.0fedora=40,release=1.fc40`