Fix thread-dump command #83
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build, Test and Snapshot Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| pull_request: | |
| schedule: | |
| - cron: "0 0 * * 0" # Weekly on Sunday at midnight | |
| workflow_dispatch: # Allows manual triggering | |
| jobs: | |
| lint-and-test-python: | |
| name: Lint Python Test Suite | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' || github.event_name == 'push' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.11" | |
| - name: Setup Python test environment | |
| run: | | |
| cd test | |
| python -m venv venv | |
| source venv/bin/activate | |
| python -m pip install --upgrade pip | |
| python -m pip install -r requirements.txt | |
| - name: Run Python linting | |
| run: | | |
| cd test | |
| source venv/bin/activate | |
| ../scripts/lint-python.sh ci | |
| build: | |
| name: Build and Test Go Plugin | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| go-version: [">=1.23.5"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Install dependencies | |
| run: go mod tidy -e || true | |
| - name: Run golangci-lint | |
| uses: golangci/golangci-lint-action@v8 | |
| with: | |
| version: latest | |
| - name: Lint and format Go files | |
| run: ./scripts/lint-go.sh ci | |
| - name: Build binary | |
| run: | | |
| echo "🔨 Building binary..." | |
| python3 .github/workflows/build.py | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cf-cli-java-plugin-${{ matrix.os }} | |
| path: dist/ | |
| release: | |
| name: Create Snapshot Release | |
| needs: [build, lint-and-test-python] | |
| runs-on: ubuntu-latest | |
| if: (github.event_name == 'push' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && (needs.lint-and-test-python.result == 'success' || needs.lint-and-test-python.result == 'skipped') | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.11" | |
| - name: Install Python dependencies for plugin repo generation | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install PyYAML | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: dist/ | |
| - name: Combine all artifacts | |
| run: | | |
| mkdir -p dist | |
| mv dist/*/* dist/ || true | |
| - name: Generate plugin repository YAML for snapshot | |
| env: | |
| GITHUB_REF_NAME: snapshot | |
| run: | | |
| echo "📝 Generating plugin repository YAML file..." | |
| python3 -m venv venv | |
| source venv/bin/activate | |
| python3 -m pip install --upgrade pip | |
| pip install PyYAML requests | |
| python3 .github/workflows/generate_plugin_repo.py | |
| echo "✅ Plugin repository YAML generated" | |
| - name: Generate timestamp | |
| id: timestamp | |
| run: echo "timestamp=$(date -u +'%Y-%m-%d %H:%M:%S UTC')" >> $GITHUB_OUTPUT | |
| - uses: thomashampson/delete-older-releases@main | |
| with: | |
| keep_latest: 0 | |
| delete_tag_regex: snapshot | |
| prerelease_only: true | |
| delete_tags: true | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Delete and regenerate tag snapshot | |
| run: | | |
| echo "Deleting existing snapshot tag..." | |
| git tag -d snapshot || true | |
| git push origin :snapshot || true | |
| echo "Regenerating snapshot tag..." | |
| git tag snapshot | |
| git push origin snapshot --force | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: | | |
| dist/* | |
| plugin-repo-entry.yml | |
| plugin-repo-summary.txt | |
| prerelease: false | |
| draft: false | |
| tag_name: snapshot | |
| body: | | |
| This is a snapshot release of the cf-cli-java-plugin. | |
| It includes the latest changes and is not intended for production use. | |
| Please test it and provide feedback. | |
| **Build Timestamp**: ${{ steps.timestamp.outputs.timestamp }} | |
| ## Installation | |
| Download the current snapshot release and install manually: | |
| ```sh | |
| # on Mac arm64 | |
| cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/download/snapshot/cf-cli-java-plugin-macos-arm64 | |
| # on Windows x86 | |
| cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/download/snapshot/cf-cli-java-plugin-windows-amd64 | |
| # on Linux x86 | |
| cf install-plugin https://github.com/SAP/cf-cli-java-plugin/releases/download/snapshot/cf-cli-java-plugin-linux-amd64 | |
| ``` | |
| **Note:** On Linux and macOS, if you get a permission error, run `chmod +x [cf-cli-java-plugin]` on the plugin binary. | |
| On Windows, the plugin will refuse to install unless the binary has the `.exe` file extension. | |
| You can verify that the plugin is successfully installed by looking for `java` in the output of `cf plugins`. | |
| name: Snapshot Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |