### swctl metrics top command example Source: https://github.com/apache/skywalking-cli/blob/master/CHANGES.md Shows how to query the top N entities for a metric, e.g., service_sla. ```bash swctl metrics top 5 --name service_sla ``` -------------------------------- ### swctl metrics multiple-linear command example Source: https://github.com/apache/skywalking-cli/blob/master/CHANGES.md Shows how to query multiple linear metrics with display and debug flags. ```bash swctl --display=graph --debug metrics multiple-linear --name all_percentile ``` -------------------------------- ### swctl metrics thermodynamic command example Source: https://github.com/apache/skywalking-cli/blob/master/CHANGES.md Shows how to query thermodynamic metrics using the metrics thermodynamic command. ```bash swctl metrics thermodynamic --name all_heatmap ``` -------------------------------- ### Install latest version on Linux Source: https://github.com/apache/skywalking-cli/blob/master/README.md Downloads and runs the official install script for the latest SkyWalking CLI version on Linux. ```shell /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/apache/skywalking-cli/master/scripts/install.sh)" ``` -------------------------------- ### Install swctl on Windows Source: https://github.com/apache/skywalking-cli/blob/master/README.md Downloads and runs the install.bat script. Requires administrator mode in cmd or PowerShell. ```shell curl -LO "https://raw.githubusercontent.com/apache/skywalking-cli/master/scripts/install.bat" && .\install.bat ``` -------------------------------- ### Install swctl on macOS via Homebrew Source: https://github.com/apache/skywalking-cli/blob/master/README.md Updates Homebrew and installs the swctl package on macOS. ```shell brew update brew install swctl ``` -------------------------------- ### GitHub Actions workflow to report events with skywalking-cli Source: https://github.com/apache/skywalking-cli/blob/master/README.md Use this GitHub Actions workflow step to wrap deployment steps and report events to the OAP backend. It requires an OAP URL and service name, and optionally accepts an auth token, instance, endpoint, message, parameters, and layer. The example uses a matrix strategy for multiple instances. ```yaml ```yaml # ... jobs: deploy: strategy: matrix: instance: - asia-southeast - asia-northeast name: Deploy Product Service runs-on: ubuntu-latest steps: # other steps such as checkout ... - name: Wrap the deployment steps with skywalking-cli uses: apache/skywalking-cli@main # we always suggest using a revision instead of `main` with: oap-url: ${{ secrets.OAP_URL }} # Required. Set the OAP backend URL, such as example.com:11800 auth-token: ${{ secrets.OAP_AUTH_TOKEN }} # Optional. OAP auth token if you enable authentication in OAP service: product # Required. Name of the service to be deployed instance: ${{ matrix.instance }} # Required. Name of the instance to be deployed endpoint: "" # Optional. Endpoint of the service, if any message: "Upgrade from {fromVersion} to {toVersion}" # Optional. The message of the event parameters: "" # Optional. The parameters in the message, if any layer: "GENERAL" # Required. Name of the layer to which the event belongs (case-insensitive) # your package / deployment steps... ``` ``` -------------------------------- ### Internal announcement email template Source: https://github.com/apache/skywalking-cli/blob/master/docs/How-to-release.md Use this text template to send the internal announcement email to the dev@ mailing list. It includes placeholders for the version, release candidate URLs, checksums, release tag, commit hash, and links to the KEYS file and release guide. Ensure all links are checked before sending. ```text Subject: [ANNOUNCEMENT] SkyWalking CLi $VERSION test build available Content: The test build of SkyWalking CLI $VERSION is now available. We welcome any comments you may have, and will take all feedback into account if a quality vote is called for this build. Release notes: * https://github.com/apache/skywalking-cli/blob/$VERSION/CHANGES.md Release Candidate: * https://dist.apache.org/repos/dist/dev/skywalking/cli/$VERSION * sha512 checksums - sha512xxxxyyyzzz apache-skywalking-cli-bin-x.x.x.tgz - sha512xxxxyyyzzz apache-skywalking-cli-src-x.x.x.tgz Release Tag : * (Git Tag) $VERSION Release Commit Hash : * https://github.com/apache/skywalking-cli/tree/ Keys to verify the Release Candidate : * https://dist.apache.org/repos/dist/release/skywalking/KEYS Guide to build the release from source : * https://github.com/apache/skywalking-cli/blob/$VERSION/docs/How-to-release.md A vote regarding the quality of this test build will be initiated within the next couple of days. ``` -------------------------------- ### Build the project with make Source: https://github.com/apache/skywalking-cli/blob/master/CONTRIBUTING.md Run `make` in the source directory to download dependencies, run tests, lint, and build three binary files in `./bin/` for Windows, Linux, and MacOS. ```shell make ``` -------------------------------- ### Build and sign the source code package Source: https://github.com/apache/skywalking-cli/blob/master/docs/How-to-release.md Run these shell commands from an empty directory to set the release version, clone the repository, tag it, and build the release. The `&&` chain ensures the tag is pushed only after `make release` succeeds. Use the Go version from CI (`go-version` in `.github/workflows/CI.yaml`) via `GOTOOLCHAIN` to avoid local Go version mismatches. ```shell export VERSION= export GOTOOLCHAIN=go1.26. mkdir release-cli && cd release-cli git clone --recurse-submodules git@github.com:apache/skywalking-cli && cd skywalking-cli git tag -a "$VERSION" -m "Release Apache SkyWalking-CLI $VERSION" make clean && make release && git push origin "$VERSION" ``` -------------------------------- ### Build swctl from source Source: https://github.com/apache/skywalking-cli/blob/master/README.md Clones the repository and builds swctl using the Makefile. The resulting binary is placed in ./bin/. ```shell git clone https://github.com/apache/skywalking-cli cd skywalking-cli make ``` -------------------------------- ### Check license headers with make license Source: https://github.com/apache/skywalking-cli/blob/master/CONTRIBUTING.md Run this command to verify that every source file contains the required Apache license header. ```shell make license ``` -------------------------------- ### Push Docker images Source: https://github.com/apache/skywalking-cli/blob/master/docs/How-to-release.md Run make docker.push to build and push Docker images. Requires enabling BuildKit in the Docker daemon. ```shell make docker.push ``` -------------------------------- ### Run tests with make test Source: https://github.com/apache/skywalking-cli/blob/master/CONTRIBUTING.md Run this command to execute the test suite locally and ensure all tests pass before submitting a pull request. ```shell make test ``` -------------------------------- ### Run swctl from Docker image Source: https://github.com/apache/skywalking-cli/blob/master/README.md Runs the swctl service ls command using the official Docker image or the snapshot image from GitHub registry. The snapshot image is for testing only and should not be used in production. ```shell docker run -it --rm apache/skywalking-cli service ls # Or to use the snapshot Docker image docker run -it --rm ghcr.io/apache/skywalking-cli/skywalking-cli service ls ``` -------------------------------- ### Upload release artifacts to Apache SVN Source: https://github.com/apache/skywalking-cli/blob/master/docs/How-to-release.md Run these commands from inside the skywalking-cli directory to upload the release artifacts to the Apache SVN dev repository. The script moves up to the release directory, checks out the SVN working copy, creates a versioned directory, copies the tarball and its signature files, then commits and cleans up. The SVN working copy is removed only after the commit succeeds. ```bash cd .. svn co https://dist.apache.org/repos/dist/dev/skywalking/ mkdir -p skywalking/cli/"$VERSION" cp skywalking-cli/skywalking*.tgz skywalking/cli/"$VERSION" cp skywalking-cli/skywalking*.tgz.asc skywalking/cli/"$VERSION" cp skywalking-cli/skywalking-cli*.tgz.sha512 skywalking/cli/"$VERSION" cd skywalking/cli && svn add "$VERSION" && svn commit -m "Draft Apache SkyWalking-CLI release $VERSION" && \ cd ../.. && rm -rf skywalking ``` -------------------------------- ### Lint code with make lint Source: https://github.com/apache/skywalking-cli/blob/master/CONTRIBUTING.md Run `make lint` to check code style locally before opening a pull request. If errors appear, use `make fix` to automatically fix obvious style issues. ```shell make lint ``` -------------------------------- ### Move release artifacts to Apache release repository Source: https://github.com/apache/skywalking-cli/blob/master/docs/How-to-release.md Use svn mv to move the release candidate from the dev repository to the release repository. This step requires PMC membership. ```shell svn mv https://dist.apache.org/repos/dist/dev/skywalking/cli/$VERSION https://dist.apache.org/repos/dist/release/skywalking/cli -m"Release SkyWalking CLI $VERSION" ``` -------------------------------- ### Verify GPG signatures of release tarballs Source: https://github.com/apache/skywalking-cli/blob/master/docs/How-to-release.md Use this command to verify the GPG signatures of the source and binary tarballs using the provided .asc files. ```bash gpg --verify skywalking-cli-$VERSION-{src,bin}.tgz.asc skywalking-cli-$VERSION-{src,bin}.tgz ``` -------------------------------- ### Enable PowerShell autocompletion for swctl Source: https://github.com/apache/skywalking-cli/blob/master/README.md Sets the execution policy and appends the completion script to the PowerShell profile. If the profile file does not exist, create it with New-Item. ```powershell set-executionpolicy remotesigned -Scope CurrentUser swctl completion powershell >> $profile ``` ```powershell New-Item -Type file -Force $profile ``` -------------------------------- ### Verify SHA512 checksums of release tarballs Source: https://github.com/apache/skywalking-cli/blob/master/docs/How-to-release.md Use this command to verify the SHA512 checksums of the source and binary tarballs against the provided .sha512 files. ```bash shasum -c skywalking-cli-$VERSION-{src,bin}.tgz.sha512 ``` -------------------------------- ### Enable bash autocompletion for swctl Source: https://github.com/apache/skywalking-cli/blob/master/README.md Generates the bash completion script, copies it to /etc/bash_completion.d/, and adds the PROG environment variable to ~/.bashrc. Reload your shell afterwards. ```shell swctl completion bash > bash_autocomplete && sudo cp ./bash_autocomplete /etc/bash_completion.d/swctl && echo >> ~/.bashrc && echo "export PROG=swctl" >> ~/.bashrc ``` -------------------------------- ### Command to check for macOS metadata files in release tarball Source: https://github.com/apache/skywalking-cli/blob/master/docs/How-to-release.md Run this command to verify that the source tarball contains no macOS metadata files such as ._ files, .DS_Store, or __MACOSX directories. The command should print nothing if the package is clean. On macOS, use the alternative with --options '!mac-ext'. ```bash tar -tzf skywalking-cli-$VERSION-src.tgz | grep -E '(^|/)(\._|(\.DS_Store|__MACOSX)(/|$))' ``` -------------------------------- ### Alternative macOS command to check for macOS metadata files Source: https://github.com/apache/skywalking-cli/blob/master/docs/How-to-release.md On macOS, the system bsdtar hides AppleDouble ._ entries when listing an archive, so use this alternative command to check for macOS metadata files in the tarball. ```bash tar --options '!mac-ext' -tzf ... ``` -------------------------------- ### Announcement email template Source: https://github.com/apache/skywalking-cli/blob/master/docs/How-to-release.md Template for the ANNOUNCE email to be sent to dev@skywalking.apache.org and announce@apache.org. The sender must use their Apache email account and check all links before sending. ```text Subject: [ANNOUNCEMENT] Apache SkyWalking CLI $VERSION Released Content: Hi the SkyWalking Community On behalf of the SkyWalking Team, I’m glad to announce that SkyWalking CLI $VERSION is now released. SkyWalking CLI: A Command Line Interface for Apache SkyWalking. SkyWalking: APM (application performance monitor) tool for distributed systems, especially designed for microservices, cloud native and container-based (Docker, Kubernetes, Mesos) architectures. Download Links: http://skywalking.apache.org/downloads/ Release Notes : https://github.com/apache/skywalking-cli/blob/$VERSION/CHANGES.md Website: http://skywalking.apache.org/ SkyWalking CLI Resources: - Issue: https://github.com/apache/skywalking/issues - Mailing list: dev@skywalking.apache.org - Documents: https://github.com/apache/skywalking-cli/blob/$VERSION/README.md The Apache SkyWalking Team ``` -------------------------------- ### Closing vote email template for Apache SkyWalking CLI release Source: https://github.com/apache/skywalking-cli/blob/master/docs/How-to-release.md Use this email template to announce the result of the release vote. Replace $VERSION and $NUMBER with actual values, and list the names of voters in the appropriate sections. ```text [RESULT][VOTE] Release Apache SkyWalking CLI version $VERSION 3 days passed, we’ve got ($NUMBER) +1 bindings (and ... +1 non-bindings): (list names) +1 bindings: xxx ... +1 non-bindings: xxx ... Thank you for voting, I’ll continue the release process. ``` -------------------------------- ### Vote call email template for Apache SkyWalking CLI release Source: https://github.com/apache/skywalking-cli/blob/master/docs/How-to-release.md Use this email template to call for a vote on the dev@skywalking.apache.org mailing list. Replace $VERSION and other placeholders with actual values. The email includes release notes, release candidate links, checksums, tag, commit hash, and voting instructions. ```text Subject: [VOTE] Release Apache SkyWalking CLI version $VERSION Content: Hi the SkyWalking Community: This is a call for vote to release Apache SkyWalking CLI version $VERSION. Release notes: * https://github.com/apache/skywalking-cli/blob/$VERSION/CHANGES.md Release Candidate: * https://dist.apache.org/repos/dist/dev/skywalking/cli/$VERSION * sha512 checksums - sha512xxxxyyyzzz skywalking-cli-x.x.x-src.tgz - sha512xxxxyyyzzz skywalking-cli-x.x.x-bin.tgz Release Tag : * (Git Tag) $VERSION Release Commit Hash : * https://github.com/apache/skywalking-cli/tree/ Keys to verify the Release Candidate : * https://dist.apache.org/repos/dist/release/skywalking/KEYS Guide to build the release from source : * https://github.com/apache/skywalking-cli/blob/$VERSION/docs/How-to-release.md Voting will start now and will remain open for at least 72 hours, all PMC members are required to give their votes. [ ] +1 Release this package. [ ] +0 No opinion. [ ] -1 Do not release this package because.... Thanks. [1] https://github.com/apache/skywalking-cli/blob/master/docs/How-to-release.md#vote-check ```