Skip to content

Commit 1c297db

Browse files
committed
Generate plugin repo YAML in CI
1 parent 16b1b14 commit 1c297db

File tree

2 files changed

+62
-28
lines changed

2 files changed

+62
-28
lines changed

.github/workflows/build-and-snapshot.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,17 +144,34 @@ jobs:
144144
dist/*
145145
plugin-repo-entry.yml
146146
plugin-repo-summary.txt
147-
prerelease: true
147+
prerelease: false
148148
draft: false
149149
tag_name: snapshot
150150
body: |
151151
This is a snapshot release of the cf-cli-java-plugin.
152152
It includes the latest changes and is not intended for production use.
153153
Please test it and provide feedback.
154154
155+
## Installation
156+
157+
Download the current snapshot release and install manually:
158+
159+
```sh
160+
# on Mac arm64
161+
cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/download/snapshot/cf-cli-java-plugin-macos-arm64
162+
# on Windows x86
163+
cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/download/snapshot/cf-cli-java-plugin-windows-amd64
164+
# on Linux x86
165+
cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/download/snapshot/cf-cli-java-plugin-linux-amd64
166+
```
167+
168+
**Note:** On Linux and macOS, if you get a permission error, run `chmod +x [cf-cli-java-plugin]` on the plugin binary.
169+
On Windows, the plugin will refuse to install unless the binary has the `.exe` file extension.
170+
171+
You can verify that the plugin is successfully installed by looking for `java` in the output of `cf plugins`.
172+
155173
## Build Status
156174
- ✅ Go Plugin: Built on Linux, macOS, and Windows
157-
- ✅ Python Tests: Linting and test suite validation completed
158175
- ✅ Plugin Repository: YAML entry generated automatically
159176
160177
## Plugin Repository Entry
@@ -163,6 +180,8 @@ jobs:
163180
164181
## Changes
165182
This snapshot includes the latest commits from the repository.
183+
184+
**Build Timestamp**: $(date -u +"%Y-%m-%d %H:%M:%S UTC")
166185
name: Snapshot Release
167186
env:
168187
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 41 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ jobs:
9090
env:
9191
GITHUB_REF_NAME: v${{ github.event.inputs.version }}
9292
run: |
93+
source venv/bin/activate
9394
echo "📝 Generating plugin repository YAML file for version ${{ github.event.inputs.version }}..."
9495
python3 .github/workflows/generate_plugin_repo.py
9596
echo "✅ Plugin repository YAML generated"
@@ -114,36 +115,50 @@ jobs:
114115
115116
Plugin for profiling Java applications and getting heap and thread-dumps.
116117
117-
### Installation
118-
118+
## Installation
119+
120+
### Installation via CF Community Repository
121+
122+
Make sure you have the CF Community plugin repository configured or add it via:
119123
```bash
120-
cf install-plugin -r CF-Community java
124+
cf add-plugin-repo CF-Community http://plugins.cloudfoundry.org
121125
```
122-
123-
Or download the appropriate binary for your platform and install manually:
124-
126+
127+
Trigger installation of the plugin via:
125128
```bash
126-
cf install-plugin <path-to-binary>
129+
cf install-plugin -r CF-Community "java"
127130
```
128-
129-
### Plugin Repository Entry
130-
131-
The `plugin-repo-entry.yml` file contains the entry that should be added to the CF CLI plugin repository.
132-
133-
**To submit to CF CLI plugin repository:**
134-
1. Fork [cli-plugin-repo](https://github.com/cloudfoundry-incubator/cli-plugin-repo)
135-
2. Add the contents of `plugin-repo-entry.yml` to `repo-index.yml`
136-
3. Create a pull request
137-
138-
### Supported Platforms
139-
140-
- Linux (32-bit and 64-bit)
141-
- macOS (64-bit)
142-
- Windows (32-bit and 64-bit)
143-
144-
### Checksums
145-
146-
All binaries include SHA1 checksums for verification. See `plugin-repo-summary.txt` for details.
131+
132+
### Manual Installation
133+
134+
Download this specific release (v${{ github.event.inputs.version }}) and install manually:
135+
136+
```bash
137+
# on Mac arm64
138+
cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/download/v${{ github.event.inputs.version }}/cf-cli-java-plugin-macos-arm64
139+
# on Windows x86
140+
cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/download/v${{ github.event.inputs.version }}/cf-cli-java-plugin-windows-amd64
141+
# on Linux x86
142+
cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/download/v${{ github.event.inputs.version }}/cf-cli-java-plugin-linux-amd64
143+
```
144+
145+
Or download the latest release:
146+
147+
```bash
148+
# on Mac arm64
149+
cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/latest/download/cf-cli-java-plugin-macos-arm64
150+
# on Windows x86
151+
cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/latest/download/cf-cli-java-plugin-windows-amd64
152+
# on Linux x86
153+
cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/latest/download/cf-cli-java-plugin-linux-amd64
154+
```
155+
156+
**Note:** On Linux and macOS, if you get a permission error, run `chmod +x [cf-cli-java-plugin]` on the plugin binary.
157+
On Windows, the plugin will refuse to install unless the binary has the `.exe` file extension.
158+
159+
You can verify that the plugin is successfully installed by looking for `java` in the output of `cf plugins`.
160+
161+
**Build Timestamp**: $(date -u +"%Y-%m-%d %H:%M:%S UTC")
147162
env:
148163
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
149164

0 commit comments

Comments
 (0)