Skip to content

Commit 89cb4b8

Browse files
djzagerclaude
andcommitted
✨ Add MTA branding and release tooling
This commit adds Migration Toolkit for Applications (MTA) specific branding, build scripts, and CI workflows to enable downstream distribution with Red Hat branding and tooling. Changes include: - MTA-specific branding assets (icons, avatars) - Pre/post-build scripts for package customization - GitHub Actions workflows for MTA releases - CI environment configuration - Documentation for MTA assets 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: David Zager <david.j.zager@gmail.com>
1 parent 823c045 commit 89cb4b8

File tree

8 files changed

+1014
-0
lines changed

8 files changed

+1014
-0
lines changed
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
name: MTA Build & Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
upload_artifacts:
7+
description: "Upload artifacts as workflow artifacts"
8+
required: false
9+
default: true
10+
type: boolean
11+
push:
12+
tags:
13+
- "mta-*"
14+
- "v*-mta"
15+
16+
concurrency:
17+
group: mta-build-${{ github.event_name }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
20+
env:
21+
HUSKY: 0
22+
23+
jobs:
24+
build-mta-extension:
25+
name: Build MTA Extension
26+
runs-on: ubuntu-latest
27+
28+
steps:
29+
- name: Get GitHub App Token
30+
id: app-token
31+
uses: actions/create-github-app-token@v1
32+
with:
33+
app-id: ${{ vars.MIGTOOLS_BOT_ID }}
34+
private-key: ${{ secrets.MIGTOOLS_BOT_KEY }}
35+
36+
- name: Checkout code
37+
uses: actions/checkout@v4
38+
with:
39+
fetch-depth: 0
40+
token: ${{ steps.app-token.outputs.token }}
41+
42+
- name: Get upstream Konveyor SHA
43+
id: upstream_sha
44+
run: |
45+
# Add konveyor remote if it doesn't exist
46+
git remote add konveyor https://github.com/konveyor/editor-extensions.git 2>/dev/null || true
47+
git fetch konveyor main
48+
49+
# Find the merge base (last common commit) between current branch and konveyor/main
50+
UPSTREAM_SHA=$(git merge-base HEAD konveyor/main)
51+
UPSTREAM_SHA_SHORT=$(git rev-parse --short $UPSTREAM_SHA)
52+
53+
echo "upstream_sha=${UPSTREAM_SHA}" >> $GITHUB_OUTPUT
54+
echo "upstream_sha_short=${UPSTREAM_SHA_SHORT}" >> $GITHUB_OUTPUT
55+
56+
echo "## Upstream Information" >> $GITHUB_STEP_SUMMARY
57+
echo "- **Upstream SHA**: [\`${UPSTREAM_SHA_SHORT}\`](https://github.com/konveyor/editor-extensions/commit/${UPSTREAM_SHA})" >> $GITHUB_STEP_SUMMARY
58+
echo "- **Downstream SHA**: [\`${GITHUB_SHA:0:7}\`](https://github.com/${{ github.repository }}/commit/${GITHUB_SHA})" >> $GITHUB_STEP_SUMMARY
59+
60+
- name: Setup Node.js
61+
uses: actions/setup-node@v4
62+
with:
63+
node-version-file: ".nvmrc"
64+
cache: "npm"
65+
66+
- name: Install workspace dependencies
67+
run: npm ci
68+
69+
- name: Collect runtime assets
70+
run: npm run collect-assets
71+
72+
- name: Build all workspaces
73+
run: npm run build
74+
env:
75+
UPSTREAM_GIT_SHA: ${{ steps.upstream_sha.outputs.upstream_sha }}
76+
77+
- name: Create distribution package
78+
run: npm run dist
79+
80+
- name: Package VSIX
81+
run: npm run package
82+
83+
- name: Get package info
84+
id: package_info
85+
run: |
86+
PACKAGE_NAME=$(node -p "require('./dist/package.json').name")
87+
PACKAGE_VERSION=$(node -p "require('./dist/package.json').version")
88+
VSIX_FILE="${PACKAGE_NAME}-${PACKAGE_VERSION}.vsix"
89+
90+
# Create build metadata
91+
BUILD_INFO="Built from konveyor/editor-extensions@${{ steps.upstream_sha.outputs.upstream_sha_short }}"
92+
93+
echo "package_name=${PACKAGE_NAME}" >> $GITHUB_OUTPUT
94+
echo "package_version=${PACKAGE_VERSION}" >> $GITHUB_OUTPUT
95+
echo "vsix_file=${VSIX_FILE}" >> $GITHUB_OUTPUT
96+
echo "vsix_path=./dist/${VSIX_FILE}" >> $GITHUB_OUTPUT
97+
echo "build_info=${BUILD_INFO}" >> $GITHUB_OUTPUT
98+
99+
- name: Verify VSIX file exists
100+
run: |
101+
if [ ! -f "${{ steps.package_info.outputs.vsix_path }}" ]; then
102+
echo "VSIX file not found: ${{ steps.package_info.outputs.vsix_path }}"
103+
ls -la ./dist/
104+
exit 1
105+
fi
106+
echo "VSIX file found: ${{ steps.package_info.outputs.vsix_path }}"
107+
108+
- name: Upload VSIX as workflow artifact
109+
if: ${{ inputs.upload_artifacts != false }}
110+
uses: actions/upload-artifact@v4
111+
with:
112+
name: ${{ steps.package_info.outputs.vsix_file }}
113+
path: ${{ steps.package_info.outputs.vsix_path }}
114+
retention-days: 30
115+
compression-level: 0 # No compression since VSIX is already compressed
116+
117+
- name: Create GitHub Release (on tag)
118+
if: startsWith(github.ref, 'refs/tags/')
119+
uses: softprops/action-gh-release@v2
120+
with:
121+
files: ${{ steps.package_info.outputs.vsix_path }}
122+
name: MTA Extension ${{ steps.package_info.outputs.package_version }}
123+
body: |
124+
## MTA Extension Release ${{ steps.package_info.outputs.package_version }}
125+
126+
Migration Toolkit for Applications VS Code Extension
127+
128+
### Build Information
129+
- **Based on**: [konveyor/editor-extensions@${{ steps.upstream_sha.outputs.upstream_sha_short }}](https://github.com/konveyor/editor-extensions/commit/${{ steps.upstream_sha.outputs.upstream_sha }})
130+
- **Built**: ${{ github.run_id }} on ${{ github.ref_name }}
131+
132+
### Installation
133+
Download the `.vsix` file and install it in VS Code:
134+
```
135+
code --install-extension ${{ steps.package_info.outputs.vsix_file }}
136+
```
137+
138+
Or use the VS Code Extensions view: Extensions → Views and More Actions → Install from VSIX
139+
env:
140+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
141+
142+
- name: Summary
143+
run: |
144+
echo "## Build Summary" >> $GITHUB_STEP_SUMMARY
145+
echo "- **Package**: ${{ steps.package_info.outputs.package_name }}" >> $GITHUB_STEP_SUMMARY
146+
echo "- **Version**: ${{ steps.package_info.outputs.package_version }}" >> $GITHUB_STEP_SUMMARY
147+
echo "- **VSIX File**: ${{ steps.package_info.outputs.vsix_file }}" >> $GITHUB_STEP_SUMMARY
148+
echo "- **Trigger**: ${{ github.event_name }}" >> $GITHUB_STEP_SUMMARY
149+
if [ "${{ github.event_name }}" = "push" ]; then
150+
echo "- **Tag**: ${{ github.ref_name }}" >> $GITHUB_STEP_SUMMARY
151+
fi
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Sync with konveyor
2+
3+
on:
4+
workflow_dispatch:
5+
# Manual triggering only
6+
7+
jobs:
8+
sync:
9+
name: Rebase onto migtools
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Get GitHub App Token
14+
id: app-token
15+
uses: actions/create-github-app-token@v1
16+
with:
17+
app-id: ${{ vars.MIGTOOLS_BOT_ID }}
18+
private-key: ${{ secrets.MIGTOOLS_BOT_KEY }}
19+
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
with:
23+
# Fetch full history for rebase
24+
fetch-depth: 0
25+
token: ${{ steps.app-token.outputs.token }}
26+
27+
- name: Configure Git
28+
run: |
29+
git config user.name "github-actions[bot]"
30+
git config user.email "github-actions[bot]@users.noreply.github.com"
31+
32+
- name: Add konveyor remote
33+
run: |
34+
git remote add konveyor https://github.com/konveyor/editor-extensions.git
35+
git fetch konveyor ${{ github.ref_name }}
36+
37+
- name: Attempt rebase onto konveyor
38+
run: |
39+
echo "Current branch: $(git branch --show-current)"
40+
echo "Attempting to rebase onto konveyor/${{ github.ref_name }}..."
41+
42+
# This will fail hard if there are conflicts
43+
git rebase konveyor/${{ github.ref_name }}
44+
45+
echo "Rebase successful!"
46+
47+
- name: Push rebased changes
48+
run: |
49+
git push --force-with-lease origin $(git branch --show-current)
50+
env:
51+
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}

assets/README.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Migration Toolkit for Applications (MTA)
2+
3+
A powerful VS Code extension for application modernization and migration analysis. Leverages a rule-based analysis engine to identify modernization opportunities and optionally uses generative AI to help migrate applications to newer platforms or architectures.
4+
5+
---
6+
7+
## Features
8+
9+
- **Code Analysis**: Comprehensive analysis of your codebase for modernization opportunities
10+
- **Customizable Rules**: Configure analysis settings, rulesets, and filters
11+
- **Interactive UI**: Dedicated views for analysis results and solution management
12+
13+
### Red Hat Developer Lightspeed for migration toolkit for applications features
14+
15+
- **AI-Powered Solutions**: Optional generative AI integration for automated fix suggestions
16+
- **Agent Mode**: Experimental automated fixes with diagnostics integration
17+
18+
*Note: Obtaining support for features in Developer Lightspeed for migration toolkit for applications requires a Red Hat Advanced Developer Suite (RHADS) subscription.*
19+
20+
---
21+
22+
## Quick Start
23+
24+
1. Install the extension from the VS Code marketplace
25+
2. Open the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`) and run "MTA: Open Analysis View"
26+
27+
---
28+
29+
## Basic Workflow
30+
31+
### 1. Create Analysis Profile
32+
33+
- Configure analysis settings and rules
34+
- Set up your analysis scope and targets
35+
36+
### 2. Run Analysis
37+
38+
- Start the server
39+
- Run analysis on your code
40+
- View results in the panel
41+
42+
### 3. Configure AI (Optional)
43+
44+
To enable AI-powered solution generation, enable AI features and configure your AI provider through the extension settings.
45+
46+
### 4. Generate Solutions
47+
48+
- Select issues you want to fix
49+
- Generate AI solutions or apply manual fixes
50+
- Review and accept/reject proposed changes
51+
52+
---
53+
54+
## Configuration
55+
56+
The extension can be configured through VS Code settings. Key settings include:
57+
58+
- **Log Level**: Control extension logging verbosity
59+
- **Analyzer Path**: Use custom analyzer binary
60+
- **GenAI Settings**: Configure AI provider and behavior
61+
- **Analysis Options**: Customize analysis scope and rules
62+
63+
## Path Exclusion
64+
65+
The extension supports `.gitignore`-style exclusion patterns:
66+
67+
1. Create an ignore file in your workspace root
68+
2. Use standard gitignore syntax to exclude files/directories
69+
3. Falls back to `.gitignore` if no custom ignore file exists
70+
71+
---
72+
73+
## Requirements
74+
75+
- **Java Projects**: Requires Red Hat Java extension for Java analysis
76+
- **AI Features**: Optional - configure AI provider for solution generation
77+
78+
---
79+
80+
## Troubleshooting
81+
82+
### Logs
83+
84+
Access extension logs through:
85+
86+
- **Command Palette**: "Show Extension Logs Directory"
87+
- **Output Panel**: Select the extension from the dropdown
88+
89+
### Common Issues
90+
91+
- Ensure required language extensions are installed
92+
- Check that analysis server starts successfully
93+
- Verify AI provider configuration if using solution generation
94+
95+
---
96+
97+
## License
98+
99+
This extension is licensed under the [Apache License 2.0](LICENSE).

0 commit comments

Comments
 (0)