Skip to content

Commit

Permalink
Merge branch 'dev' into v2
Browse files Browse the repository at this point in the history
  • Loading branch information
eyalbe4 committed Aug 23, 2023
2 parents b958e74 + 469a41d commit b59708d
Show file tree
Hide file tree
Showing 16 changed files with 155 additions and 161 deletions.
1 change: 1 addition & 0 deletions .github/workflows/frogbot-scan-and-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ jobs:
# [Mandatory]
# The GitHub token automatically generated for the job
JF_GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JFROG_CLI_LOG_LEVEL: "DEBUG"

1 change: 1 addition & 0 deletions .github/workflows/frogbot-scan-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@ jobs:
# [Mandatory]
# The GitHub token automatically generated for the job
JF_GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JFROG_CLI_LOG_LEVEL: "DEBUG"
2 changes: 1 addition & 1 deletion artifactory/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ func getRetryWaitTime(c *cli.Context) (waitMilliSecs int, err error) {
}

func getRetryWaitTimeVerificationError() error {
return errorutils.CheckError(errors.New("The '--retry-wait-time' option should have a numeric value with 's'/'ms' suffix. " + cliutils.GetDocumentationMessage()))
return errorutils.CheckErrorf("The '--retry-wait-time' option should have a numeric value with 's'/'ms' suffix. " + cliutils.GetDocumentationMessage())
}

func dockerPromoteCmd(c *cli.Context) error {
Expand Down
2 changes: 1 addition & 1 deletion build/npm/v2-jf/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/npm/v2-jf/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jfrog-cli-v2-jf",
"version": "2.45.0",
"version": "2.46.0",
"description": "🐸 Command-line interface for JFrog Artifactory, Xray, Distribution, Pipelines and Mission Control 🐸",
"homepage": "https://github.com/jfrog/jfrog-cli",
"preferGlobal": true,
Expand Down
2 changes: 1 addition & 1 deletion build/npm/v2/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/npm/v2/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jfrog-cli-v2",
"version": "2.45.0",
"version": "2.46.0",
"description": "🐸 Command-line interface for JFrog Artifactory, Xray, Distribution, Pipelines and Mission Control 🐸",
"homepage": "https://github.com/jfrog/jfrog-cli",
"preferGlobal": true,
Expand Down
4 changes: 2 additions & 2 deletions buildtools/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ func GetNpmConfigAndArgs(c *cli.Context) (configFilePath string, args []string,
}

if !exists {
return "", nil, errorutils.CheckError(errors.New("no config file was found! Before running the npm command on a project for the first time, the project should be configured using the npm-config command"))
return "", nil, errorutils.CheckErrorf("no config file was found! Before running the npm command on a project for the first time, the project should be configured using the npm-config command")
}
_, args = getCommandName(c.Args())
return
Expand Down Expand Up @@ -914,7 +914,7 @@ func terraformCmd(c *cli.Context) error {
case "publish", "p":
return terraformPublishCmd(configFilePath, filteredArgs, c)
default:
return errorutils.CheckError(errors.New("Terraform command:\"" + cmdName + "\" is not supported. " + cliutils.GetDocumentationMessage()))
return errorutils.CheckErrorf("Terraform command:\"" + cmdName + "\" is not supported. " + cliutils.GetDocumentationMessage())
}
}

Expand Down
2 changes: 1 addition & 1 deletion docs/general/login/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package login
var Usage = []string{"login"}

func GetDescription() string {
return "Log in to a JFrog Platform via your web browser. Available for Artifactory 7.63.1 and above"
return "Log in to a JFrog Platform via your web browser. Available for Artifactory 7.64.0 and above"
}
98 changes: 44 additions & 54 deletions documentation/CLI-for-JFrog-Lifecycle.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
JFrog CLI : CLI for JFrog Release Lifecycle Management
======================================
# JFrog CLI: CLI for JFrog Release Lifecycle Management


Overview
--------
## Overview

This page describes how to use JFrog CLI with [JFrog Release Lifecycle Management](https://jfrog.com/help/r/jfrog-artifactory-documentation/jfrog-release-lifecycle-management-solution).

Expand All @@ -14,20 +11,14 @@ Read more about JFrog CLI [here](https://jfrog.com/help/r/jfrog-cli).
> JFrog Release Lifecycle Management is only available since [Artifactory 7.63.2](https://jfrog.com/help/r/jfrog-release-information/artifactory-7.63.2-cloud).
---

### Syntax

When used with JFrog Release Lifecycle Management, JFrog CLI uses the following syntax:

$ jf command-name global-options command-options arguments

### Commands

The following sections describe the commands available in JFrog CLI for use with JFrog Release Lifecycle Management.
The following sections describe the commands available in JFrog CLI when performing Release Lifecycle Management operations on Release Bundles v2.

### Creating a release bundle from builds or from existing release bundles
### Creating a Release Bundle v2 from builds or from existing Release Bundles

This commands allows creating a release bundle from one of two sources:
1. Published build infos. To use, provide the `--builds` option, which accepts a path to a JSON file of the following syntax:
This command creates a Release Bundle v2 from a published build-info or from an existing Release Bundle.
1. To create a Release Bundle from published build-infos, provide the `--builds` option, which accepts a path to a file using the following JSON format:
```json
{
"builds": [
Expand All @@ -39,11 +30,11 @@ This commands allows creating a release bundle from one of two sources:
]
}
```
`number` is optional, latest build will be used if empty.
`number` is optional (if left empty, the latest build will be used)

`project` is optional, default project will be used if empty.
`project` is optional (if left empty, the default project will be used)

2. Existing release bundles. To use, provide the `--release-bundles` option, which accepts a path to a JSON file of the following syntax:
2. To create a Release Bundle v2 from existing Release Bundles, provide the `--release-bundles` option, which accepts a path to a file using the following JSON format:
```json
{
"releaseBundles": [
Expand All @@ -55,56 +46,56 @@ This commands allows creating a release bundle from one of two sources:
]
}
```
`project` is optional, default project will be used if empty.
`project` is optional (if left empty, the default project will be used)

| | |
|------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Command-name | release-bundle-create |
| Abbreviation | rbc |
| Command options | |
| --builds | \[Optional\]<br><br>Path to a JSON file containing information of the source builds from which to create a release bundle. |
| --project | \[Optional\]<br><br>Project key associated with the Release Bundle version. |
| --release-bundles | \[Optional\]<br><br>Path to a JSON file containing information of the source release bundles from which to create a release bundle. |
| --server-id | \[Optional\]<br><br>Platform server ID configured using the config command. |
| --builds | \[Optional\]<br><br>Path to a JSON file containing information about the source builds from which to create a Release Bundle. |
| --project | \[Optional\]<br><br>JFrog Project key associated with the Release Bundle version. |
| --release-bundles | \[Optional\]<br><br>Path to a JSON file containing information about the source Release Bundles from which to create a Release Bundle. |
| --server-id | \[Optional\]<br><br>Platform server ID configured using the `jf c add` command. |
| --signing-key | \[Mandatory\]<br><br>The GPG/RSA key-pair name given in Artifactory. |
| --sync | \[Default: false\]<br><br>Set to true to run synchronously. |
| Command arguments | |
| release bundle name | Name of the newly created Release Bundle. |
| release bundle version | Version of the newly created Release Bundle. |

##### Examples
#### Examples

##### Example 1

Create a release bundle with name "myApp" and version "1.0.0", with signing key pair "myKeyPair".
The release bundle will include artifacts of the builds that were provided in the builds spec.

jf rbc --builds=/path/to/builds-spec.json --signing-key=myKeyPair myApp 1.0.0

Create a Release Bundle v2 with the name "myApp" and version "1.0.0", with signing key pair "myKeyPair".
The Release Bundle will include the artifacts of the builds that were provided in the builds spec.
```
jf rbc --builds=/path/to/builds-spec.json --signing-key=myKeyPair myApp 1.0.0
```
##### Example 2
Create a release bundle with name "myApp" and version "1.0.0", with signing key pair "myKeyPair".
The release bundle will include artifacts of the release bundles that were provided in the release bundles spec.

jf ds rbc --spec=/path/to/release-bundles-spec.json --signing-key=myKeyPair myApp 1.0.0

Create a Release Bundle v2 with the name "myApp" and version "1.0.0", with signing key pair "myKeyPair".
The Release Bundle will include the artifacts of the Release Bundles that were provided in the Release Bundles spec.
```
jf rbc --spec=/path/to/release-bundles-spec.json --signing-key=myKeyPair myApp 1.0.0
```
##### Example 3
Create a release bundle synchronously with name "myApp" and version "1.0.0", in project "project0", with signing key pair "myKeyPair".
The release bundle will include artifacts of the release bundles that were provided in the release bundles spec.
Create a Release Bundle v2 synchronously with the name "myApp" and version "1.0.0", in project "project0", with signing key pair "myKeyPair".
The Release Bundle will include the artifacts of the Release Bundles that were provided in the Release Bundles spec.
```
jf rbc --spec=/path/to/release-bundles-spec.json --signing-key=myKeyPair --sync=true --project=project0 myApp 1.0.0
```
### Promoting a Release Bundle v2
jf ds rbc --spec=/path/to/release-bundles-spec.json --signing-key=myKeyPair --sync=true --project=project0 myApp 1.0.0

### Promoting a release bundle

This commands allows promoting a release bundle to a target environment.
This command promotes a Release Bundle v2 to a target environment.
| | |
|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Command-name | release-bundle-promote |
| Abbreviation | rbp |
| Command options | |
| --overwrite | \[Default: false\]<br><br>Set to true to replace artifacts with the same name but a different checksum if such already exist at the promotion targets. By default, the promotion is stopped in a case of such conflict |
| --overwrite | \[Default: false\]<br><br>Set to true to replace artifacts with the same name but a different checksum, if such already exist at the promotion targets. By default, the promotion is stopped when a conflict occurs.|
| --project | \[Optional\]<br><br>Project key associated with the Release Bundle version. |
| --server-id | \[Optional\]<br><br>Platform server ID configured using the config command. |
| --signing-key | \[Mandatory\]<br><br>The GPG/RSA key-pair name given in Artifactory. |
Expand All @@ -114,20 +105,19 @@ This commands allows promoting a release bundle to a target environment.
| release bundle version | Version of the Release Bundle to promote. |
| environment | Name of the target environment for the promotion. |

##### Examples

#### Examples
##### Example 1
Promote a release bundle named "myApp" version "1.0.0" to environment "PROD".
Promote a Release Bundle v2 named "myApp" version "1.0.0" to environment "PROD".
Use signing key pair "myKeyPair".

jf rbp --signing-key=myKeyPair myApp 1.0.0 PROD

```
jf rbp --signing-key=myKeyPair myApp 1.0.0 PROD
```
##### Example 2
Promote a release bundle synchronously to environment "PROD".
The release bundle is named "myApp", version "1.0.0", of project "project0".
Use signing key pair "myKeyPair" and overwrite at conflict.

jf rbp --signing-key=myKeyPair --project=project0 --overwrite=true --sync=true myApp 1.0.0 PROD
Promote a Release Bundle v2 synchronously to environment "PROD".
The Release Bundle is named "myApp", version "1.0.0", of project "project0".
Use signing key pair "myKeyPair" and overwrite in case of conflicts.
```
jf rbp --signing-key=myKeyPair --project=project0 --overwrite=true --sync=true myApp 1.0.0 PROD
```
Loading

0 comments on commit b59708d

Please sign in to comment.