### Check Go Installation Source: https://github.com/jfrog/jfrog-cli/blob/master/CONTRIBUTING.md Verify that Go is installed on your system before proceeding with the build. ```sh go version ``` -------------------------------- ### Install Chocolatey Package Source: https://github.com/jfrog/jfrog-cli/blob/master/build/chocolatey/v2-jf/README.md After building the package, you can install it using the 'choco install' command. Replace '' with the actual package version. ```powershell choco install jfrog-cli..nupkg ``` -------------------------------- ### Install JFrog CLI with npm Source: https://github.com/jfrog/jfrog-cli/blob/master/build/npm/v2/README.md Install the JFrog CLI globally using npm. This command is for standard installations. ```bash npm install -g jfrog-cli-v2 ``` -------------------------------- ### Gradle Install and Deploy with JFrog CLI Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/getting-started-with-jfrog-using-the-cli.md Execute Gradle install and deploy commands using JFrog CLI for artifact management. ```bash jf gradle artifactoryP ``` -------------------------------- ### NPM Install with JFrog CLI Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/getting-started-with-jfrog-using-the-cli.md Use this command to perform an npm install operation, managed by JFrog CLI. ```bash jf npm install ``` -------------------------------- ### Install a JFrog CLI Plugin Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/jfrog-cli-plugins-developer-guide.md Installs a plugin from the JFrog CLI Plugins Registry. Ensure JFrog CLI version 1.41.1 or above is installed. ```bash jf plugin install the-plugin-name ``` -------------------------------- ### Maven Install and Deploy with JFrog CLI Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/getting-started-with-jfrog-using-the-cli.md Execute Maven install and deploy commands using JFrog CLI for artifact management. ```bash jf mvn install deploy ``` -------------------------------- ### JFrog CLI Plugin Descriptor YAML Example Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/jfrog-cli-plugins-developer-guide.md Example of a plugin descriptor file in YAML format. This file defines mandatory and optional parameters for plugin registration. ```yaml # Mandatory: pluginName: hello-frog version: v1.0.0 repository: https://github.com/my-org/my-amazing-plugin maintainers: - github-username1 - github-username2 # Optional: relativePath: build-info-analyzer # You may set either branch or tag, but noth both branch: my-release-branch tag: my-release-tag ``` -------------------------------- ### Install JFrog CLI on Linux/MacOS Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/getting-started-with-jfrog-using-the-cli.md Use this command to download and install the JFrog CLI on Linux or MacOS systems. ```bash curl -fL https://getcli.jfrog.io/setup | sh ``` -------------------------------- ### Install JFrog CLI v2 with npm (Root User) Source: https://github.com/jfrog/jfrog-cli/blob/master/build/npm/v2-jf/README.md When running npm install as a root user, use the --unsafe-perm flag to avoid potential permission issues during global installation. ```bash npm install -g -unsafe-perm jfrog-cli-v2-jf ``` -------------------------------- ### PIP Install with JFrog CLI Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/getting-started-with-jfrog-using-the-cli.md Use this command to perform a pip install operation, managed by JFrog CLI. ```bash jf pip install ``` -------------------------------- ### Migrate from jfrog-cli-v2 to jfrog-cli-v2-jf Source: https://github.com/jfrog/jfrog-cli/blob/master/build/npm/v2/README.md Uninstall the old package and install the new one to migrate to the `jf` executable. ```bash npm uninstall -g jfrog-cli-v2 npm install -g jfrog-cli-v2-jf ``` -------------------------------- ### Install JFrog CLI on Windows Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/getting-started-with-jfrog-using-the-cli.md Execute this PowerShell command to install the JFrog CLI on Windows systems. It downloads the executable and places it in the system32 directory. ```powershell powershell "Start-Process -Wait -Verb RunAs powershell '-NoProfile iwr https://releases.jfrog.io/artifactory/jfrog-cli/v2-jf/[RELEASE]/jfrog-cli-windows-amd64/jf.exe -OutFile $env:SYSTEMROOT\system32\jf.exe'" ; jf setup ``` -------------------------------- ### Install JFrog CLI v2 with npm Source: https://github.com/jfrog/jfrog-cli/blob/master/build/npm/v2-jf/README.md Use this command to install the JFrog CLI v2 globally on your system. Ensure you have npm version 5.0.0 or above. ```bash npm install -g jfrog-cli-v2-jf ``` -------------------------------- ### Run Transfer Tests Source: https://github.com/jfrog/jfrog-cli/blob/master/CONTRIBUTING.md Execute Transfer tests for the JFrog CLI. Requires specific flags for target URL, admin token, JFrog home directory, and plugin installation. ```bash go test -v github.com/jfrog/jfrog-cli -test.transfer [flags] ``` -------------------------------- ### Clone JFrog CLI Plugin Template Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/jfrog-cli-plugins-developer-guide.md Clones the official JFrog CLI plugin template repository to start developing a new plugin. ```bash git clone https://github.com/jfrog/jfrog-cli-plugin-template.git ``` -------------------------------- ### Display Build Script Help Source: https://github.com/jfrog/jfrog-cli/blob/master/build/deb_rpm/v2-jf/README.md Run this command to see available options and usage instructions for the JFrog CLI v2 packaging script. ```bash ./build-scripts/pack.sh --help ``` -------------------------------- ### Format Plugin Code with Go Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/jfrog-cli-plugins-developer-guide.md Ensure consistent code formatting for your plugin sources using the Go fmt command. Run this in the root directory of your project. ```bash go fmt ./... ``` -------------------------------- ### Initialize JFrog Project Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/getting-started-with-jfrog-using-the-cli.md Run this command within the root directory of your source code project to initialize it for JFrog integration. ```bash jf project init ``` -------------------------------- ### Run Plugin Tests with Go Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/jfrog-cli-plugins-developer-guide.md Execute plugin tests using Go's built-in testing tools. This command is used by the Registry to verify plugin integrity. ```bash go vet -v ./... && go test -v ./... ``` -------------------------------- ### Go Build with JFrog CLI Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/getting-started-with-jfrog-using-the-cli.md Execute Go build commands using JFrog CLI. ```bash jf go build ``` -------------------------------- ### Run NuGet Tests Source: https://github.com/jfrog/jfrog-cli/blob/master/CONTRIBUTING.md Execute NuGet tests for the Jfrog CLI. Requires the NuGet executable in the system's PATH. ```go go test -v github.com/jfrog/jfrog-cli -test.nuget [flags] ``` -------------------------------- ### Check Plugin Version Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/jfrog-cli-plugins-developer-guide.md Verify the version of your built plugin by running the executable with the -v flag. The version should be prefixed with 'v' and follow semantic versioning. ```bash ./my-plugin -v ``` -------------------------------- ### Go Publish with JFrog CLI Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/getting-started-with-jfrog-using-the-cli.md Publish a Go module version using JFrog CLI. ```bash jf gp v1.0.0 ``` -------------------------------- ### Run Distribution Tests Source: https://github.com/jfrog/jfrog-cli/blob/master/CONTRIBUTING.md Execute Distribution tests for the Jfrog CLI. ```go go test -v github.com/jfrog/jfrog-cli -test.distribution [flags] ``` -------------------------------- ### Run Maven Tests Source: https://github.com/jfrog/jfrog-cli/blob/master/CONTRIBUTING.md Execute Maven tests for the Jfrog CLI. Requires Java in PATH or JAVA_HOME set. ```go go test -v github.com/jfrog/jfrog-cli -test.maven [flags] ``` -------------------------------- ### Run Plugins Tests Source: https://github.com/jfrog/jfrog-cli/blob/master/CONTRIBUTING.md Execute Plugins tests for the Jfrog CLI. ```go go test -v github.com/jfrog/jfrog-cli -test.plugins ``` -------------------------------- ### Build and Run JFrog CLI Plugin Template Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/jfrog-cli-plugins-developer-guide.md Builds the template plugin executable and runs it with different arguments to test its functionality. ```bash cd jfrog-cli-plugin-template go build -o hello-frog ./hello-frog --help ./hello-frog hello --help ./hello-frog hello Yey! ``` -------------------------------- ### Build Chocolatey Package with Choco on Windows Source: https://github.com/jfrog/jfrog-cli/blob/master/build/chocolatey/v2-jf/README.md Use this command to build the Chocolatey package directly on Windows using the 'choco' command. The JFrog CLI executable must be present in the 'build/chocolatey/tools' directory. ```powershell cd build\chocolatey choco pack version= ``` -------------------------------- ### Scan Project Dependencies Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/getting-started-with-jfrog-using-the-cli.md Scan your project's dependencies for security vulnerabilities from the root directory of your project. ```bash jf audit ``` -------------------------------- ### Run Gradle Tests Source: https://github.com/jfrog/jfrog-cli/blob/master/CONTRIBUTING.md Execute Gradle tests for the Jfrog CLI. Requires Gradle and Java in PATH or JAVA_HOME set. ```go go test -v github.com/jfrog/jfrog-cli -test.gradle [flags] ``` -------------------------------- ### Run Podman Tests Source: https://github.com/jfrog/jfrog-cli/blob/master/CONTRIBUTING.md Execute Podman tests for the Jfrog CLI. Requires Artifactory container registry domain. ```go go test -v github.com/jfrog/jfrog-cli -test.podman [flags] ``` -------------------------------- ### Run Npm Tests Source: https://github.com/jfrog/jfrog-cli/blob/master/CONTRIBUTING.md Execute Npm tests for the Jfrog CLI. Requires npm in PATH and compatibility with npm 7+. ```go go test -v github.com/jfrog/jfrog-cli -test.npm [flags] ``` -------------------------------- ### Publish Build Info Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/getting-started-with-jfrog-using-the-cli.md Publish build information for your current build to your JFrog environment. ```bash jf rt bp ``` -------------------------------- ### Expected Package Output Source: https://github.com/jfrog/jfrog-cli/blob/master/build/deb_rpm/v2/README.md This shows the naming convention for the generated Debian (.deb) and RPM (.rpm) packages, including version and architecture. ```bash pkg/jfrog-cli-v2-..deb pkg/jfrog-cli-v2-..rpm ``` -------------------------------- ### Scan Local Software Package Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/getting-started-with-jfrog-using-the-cli.md Scan any software package or directory on your local machine for security vulnerabilities. ```bash jf scan path/to/dir/or/package ``` -------------------------------- ### Run JFrog CLI Tests Source: https://github.com/jfrog/jfrog-cli/blob/master/CONTRIBUTING.md Execute tests for JFrog CLI using the 'go test' command. Specify test types and flags as needed. Builds and repositories created during tests are cleaned up afterward. ```sh go test -v github.com/jfrog/jfrog-cli [test-types] [flags] ``` -------------------------------- ### NPM Publish with JFrog CLI Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/getting-started-with-jfrog-using-the-cli.md Use this command to publish npm packages, managed by JFrog CLI. ```bash jf npm publish ``` -------------------------------- ### Run Xray Tests Source: https://github.com/jfrog/jfrog-cli/blob/master/CONTRIBUTING.md Execute Xray tests for the JFrog CLI, including Docker scan. Pass necessary flags as required. ```bash go test -v github.com/jfrog/jfrog-cli -test.xray -test.dockerScan [flags] ``` -------------------------------- ### Run Pip Tests Source: https://github.com/jfrog/jfrog-cli/blob/master/CONTRIBUTING.md Execute Pip tests for the Jfrog CLI. Requires Python and pip executables in the system's PATH. ```go go test -v github.com/jfrog/jfrog-cli -test.pip [flags] ``` -------------------------------- ### Run Artifactory Tests Source: https://github.com/jfrog/jfrog-cli/blob/master/CONTRIBUTING.md Execute Artifactory tests for the Jfrog CLI. Ensure necessary flags are provided. ```go go test -v github.com/jfrog/jfrog-cli -test.artifactory [flags] ``` -------------------------------- ### Build JFrog CLI on Windows Source: https://github.com/jfrog/jfrog-cli/blob/master/CONTRIBUTING.md Execute the build script to compile JFrog CLI on Windows operating systems. ```bat .\build\build.bat ``` -------------------------------- ### Run Docker Tests Source: https://github.com/jfrog/jfrog-cli/blob/master/CONTRIBUTING.md Execute Docker tests for the Jfrog CLI. Requires RTLIC environment variable and a running Artifactory container. ```go go test -v github.com/jfrog/jfrog-cli -test.docker [flags] ``` -------------------------------- ### Run Go Commands Tests Source: https://github.com/jfrog/jfrog-cli/blob/master/CONTRIBUTING.md Execute Go commands tests for the Jfrog CLI. Compatible with Artifactory 6.10 and higher. ```go go test -v github.com/jfrog/jfrog-cli -test.go [flags] ``` -------------------------------- ### Publish a JFrog CLI Plugin Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/jfrog-cli-plugins-developer-guide.md Builds and publishes a JFrog CLI plugin to a configured Artifactory registry. Ensure you are in the plugin's root directory before running. ```bash jf plugin publish the-plugin-name the-plugin-version ``` -------------------------------- ### Build Chocolatey Package with Docker Source: https://github.com/jfrog/jfrog-cli/blob/master/build/chocolatey/v2-jf/README.md Use this command to build the Chocolatey package in a Linux environment using Docker. Ensure the JFrog CLI executable is placed in the 'build/chocolatey/tools' directory before running. ```bash cd build/chocolatey docker run --rm -it -v $(pwd):/work -w /work linuturk/mono-choco pack version= ``` -------------------------------- ### macOS Application Bundle Structure Source: https://github.com/jfrog/jfrog-cli/blob/master/build/apple_release/jf.app/Contents/MacOs/README.md This is the standard directory structure for a macOS application bundle. Ensure your application's executable is placed in the MacOS directory and named correctly. ```text YOUR_APP.app ├── Contents ├── MacOS │ └── YOUR_APP (executable file) └── Info.plist ``` -------------------------------- ### Build JFrog CLI on Unix-based Systems Source: https://github.com/jfrog/jfrog-cli/blob/master/CONTRIBUTING.md Execute the build script to compile JFrog CLI on Linux, macOS, or other Unix-like operating systems. ```sh ./build/build.sh ``` -------------------------------- ### Scan Local Docker Image Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/getting-started-with-jfrog-using-the-cli.md Scan a local Docker image for security vulnerabilities by providing its name and tag. ```bash jf docker scan : ``` -------------------------------- ### PIP Publish with JFrog CLI Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/getting-started-with-jfrog-using-the-cli.md Upload a Python package file to a JFrog Artifactory repository using JFrog CLI. ```bash jf rt u default-pypi-local ``` -------------------------------- ### Access JFrog CLI Plugin Resources Directory Source: https://github.com/jfrog/jfrog-cli/blob/master/guides/jfrog-cli-plugins-developer-guide.md Retrieves the directory path for a plugin's resources, which are downloaded under the JFrog CLI home directory. This is useful for accessing external files packaged with the plugin. ```go import ( "github.com/jfrog/jfrog-cli-core/v2/utils/coreutils" ) ... dir, err := coreutils.GetJfrogPluginsResourcesDir("my-plugin-name") ... ``` -------------------------------- ### Clone JFrog CLI Repository Source: https://github.com/jfrog/jfrog-cli/blob/master/CONTRIBUTING.md Clone the JFrog CLI source code from GitHub and navigate to the project's root directory. ```sh git clone https://github.com/jfrog/jfrog-cli.git cd jfrog-cli ``` -------------------------------- ### Replace Local Dependency in go.mod Source: https://github.com/jfrog/jfrog-cli/blob/master/CONTRIBUTING.md Modify the go.mod file to use a local clone of a JFrog module for development purposes. Ensure to run 'go mod tidy' afterwards. ```go replace github.com/jfrog/jfrog-cli-core/v2 => /local/path/in/your/machine/jfrog-cli-core ``` -------------------------------- ### Replace Dependency with GitHub Fork in go.mod Source: https://github.com/jfrog/jfrog-cli/blob/master/CONTRIBUTING.md Update the go.mod file to point a dependency to your GitHub fork and branch. This is useful for testing changes in other modules before submitting pull requests. Run 'go mod tidy' after modification. ```go replace github.com/jfrog/jfrog-cli-core/v2 => github.com/galusben/jfrog-cli-core/v2 dev ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.