Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into v2
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrog-ecosystem committed Oct 11, 2024
2 parents 1cc0201 + 43a0a92 commit 53b9d04
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 36 deletions.
21 changes: 17 additions & 4 deletions .github/workflows/nugetTests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: NuGet Tests

on:
push:
branches:
Expand All @@ -8,10 +9,12 @@ on:
# Triggers the workflow on labeled PRs only.
pull_request_target:
types: [ labeled ]

# Ensures that only the latest commit is running for each PR at a time.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.ref }}
cancel-in-progress: true

jobs:
NuGet-Tests:
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.event_name == 'push'
Expand All @@ -27,16 +30,26 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}

# Install Mono on Ubuntu to run nuget.exe
- name: Install Mono on Ubuntu
if: matrix.os == 'ubuntu'
run: |
sudo apt-get update
sudo apt-get install -y apt-transport-https dirmngr gnupg ca-certificates
sudo apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt-get update
sudo apt-get install -y mono-complete
- name: Install NuGet
uses: nuget/setup-nuget@v2
with:
nuget-version: 6.x
nuget-version: '6.x'

- name: Install dotnet
- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: "6.x"

dotnet-version: '6.x'

- name: Setup Go with cache
uses: jfrog/.github/actions/install-go-with-cache@main
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ node("docker-xxlarge") {
repo = 'jfrog-cli'
sh 'rm -rf temp'
sh 'mkdir temp'
def goRoot = tool 'go-1.23.1'
def goRoot = tool 'go-1.23.2'
env.GOROOT="$goRoot"
env.PATH+=":${goRoot}/bin:/tmp/node-${nodeVersion}-linux-x64/bin"
env.GO111MODULE="on"
Expand Down
2 changes: 1 addition & 1 deletion build/docker/slim/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG repo_name_21
# Remove ${repo_name_21} to pull from Docker Hub.
FROM ${repo_name_21}/jfrog-docker/golang:1.23.1-alpine as builder
FROM ${repo_name_21}/jfrog-docker/golang:1.23.2-alpine as builder
ARG image_name=jfrog-cli
ARG cli_executable_name
WORKDIR /${image_name}
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.70.0",
"version": "2.71.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.70.0",
"version": "2.71.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
23 changes: 16 additions & 7 deletions general/ai/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,15 @@ func HowCmd(c *cli.Context) error {
}
log.Output(coreutils.PrintLink("This AI-powered interface converts natural language inputs into AI-generated JFrog CLI commands.\n" +
"For more information about this interface, see https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli/cli-ai\n" +
"NOTE: This is an experimental version and it supports mostly Artifactory and Xray commands.\n"))
"Note: JFrog AI Assistant is in beta and currently supports primarily Artifactory and Xray commands.\n"))

// Ask the user to agree to the terms and conditions. If the user does not agree, the command will not proceed.
// Ask this only once per JFrog CLI installation, unless the terms are updated.
if agreed, err := handleAiTermsAgreement(); err != nil || !agreed {
if agreed, err := handleAiTermsAgreement(); err != nil {
return err
} else if !agreed {
// If the user does not agree to the terms, the command will not proceed.
return reportTermsDisagreement()
}

for {
Expand Down Expand Up @@ -82,7 +85,7 @@ func HowCmd(c *cli.Context) error {
// If the response is a valid JFrog CLI command, ask the user for feedback.
if validResponse {
log.Output()
if err = sendFeedback(); err != nil {
if err = handleResponseFeedback(); err != nil {
return err
}
}
Expand All @@ -100,16 +103,22 @@ func askQuestion(question string) (response string, err error) {
}

type feedbackBody struct {
IsGoodResponse bool `json:"is_good_response"`
IsGoodResponse bool `json:"is_good_response,omitempty"`
IsAgreedTerms bool `json:"is_agreed_terms,omitempty"`
}

func sendFeedback() (err error) {
func handleResponseFeedback() (err error) {
isGoodResponse, err := getUserFeedback()
if err != nil {
return err
return
}
_, err = sendRestAPI(feedback, feedbackBody{IsGoodResponse: isGoodResponse})
return err
return
}

func reportTermsDisagreement() (err error) {
_, err = sendRestAPI(feedback, feedbackBody{IsAgreedTerms: false})
return
}

func getUserFeedback() (bool, error) {
Expand Down
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/jfrog/jfrog-cli

go 1.23.1
go 1.23.2

replace (
// Should not be updated to 0.2.6 due to a bug (https://github.com/jfrog/jfrog-cli-core/pull/372)
Expand All @@ -11,18 +11,18 @@ replace (
)

require (
github.com/agnivade/levenshtein v1.1.1
github.com/agnivade/levenshtein v1.2.0
github.com/buger/jsonparser v1.1.1
github.com/docker/docker v27.3.1+incompatible
github.com/gocarina/gocsv v0.0.0-20240520201108-78e41c74b4b1
github.com/jfrog/archiver/v3 v3.6.1
github.com/jfrog/build-info-go v1.10.1
github.com/jfrog/build-info-go v1.10.3
github.com/jfrog/gofrog v1.7.6
github.com/jfrog/jfrog-cli-artifactory v0.1.6
github.com/jfrog/jfrog-cli-core/v2 v2.56.1
github.com/jfrog/jfrog-cli-core/v2 v2.56.3
github.com/jfrog/jfrog-cli-platform-services v1.3.0
github.com/jfrog/jfrog-cli-security v1.11.0
github.com/jfrog/jfrog-client-go v1.47.1
github.com/jfrog/jfrog-cli-security v1.11.3
github.com/jfrog/jfrog-client-go v1.47.2
github.com/jszwec/csvutil v1.10.0
github.com/manifoldco/promptui v0.9.0
github.com/stretchr/testify v1.9.0
Expand Down
24 changes: 12 additions & 12 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -621,8 +621,8 @@ github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1o
github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4=
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8=
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d/go.mod h1:asat636LX7Bqt5lYEZ27JNDcqxfjdBQuJ/MM4CN/Lzo=
github.com/agnivade/levenshtein v1.1.1 h1:QY8M92nrzkmr798gCo3kmMyqXFzdQVpxLlGPRBij0P8=
github.com/agnivade/levenshtein v1.1.1/go.mod h1:veldBMzWxcCG2ZvUTKD2kJNRdCk5hVbJomOvKkmgYbo=
github.com/agnivade/levenshtein v1.2.0 h1:U9L4IOT0Y3i0TIlUIDJ7rVUziKi/zPbrJGaFrtYH3SY=
github.com/agnivade/levenshtein v1.2.0/go.mod h1:QVVI16kDrtSuwcpd0p1+xMC6Z/VfhtCyDIjcwga4/DU=
github.com/ajstarks/deck v0.0.0-20200831202436-30c9fc6549a9/go.mod h1:JynElWSGnm/4RlzPXRlREEwqTHAN3T56Bv2ITsFT3gY=
github.com/ajstarks/deck/generate v0.0.0-20210309230005-c3f852c02e19/go.mod h1:T13YZdzov6OU0A1+RfKZiZN9ca6VeKdBdyDV+BY97Tk=
github.com/ajstarks/svgo v0.0.0-20180226025133-644b8db467af/go.mod h1:K08gAheRH3/J6wwsYMMT4xOr94bZjxIelGM0+d/wbFw=
Expand Down Expand Up @@ -703,8 +703,8 @@ github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1VwoXQT9A3Wy9MM3WgvqSxFWenqJduM=
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48 h1:fRzb/w+pyskVMQ+UbP35JkH8yB7MYb4q/qhBarqZE6g=
github.com/dgryski/trifles v0.0.0-20200323201526-dd97f9abfb48/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA=
github.com/dgryski/trifles v0.0.0-20230903005119-f50d829f2e54 h1:SG7nF6SRlWhcT7cNTs5R6Hk4V2lcmLz2NsG2VnInyNo=
github.com/dgryski/trifles v0.0.0-20230903005119-f50d829f2e54/go.mod h1:if7Fbed8SFyPtHLHbg49SI7NAdJiC5WIA09pe59rfAA=
github.com/distribution/reference v0.6.0 h1:0IXCQ5g4/QMHHkarYzh5l+u8T3t73zM5QvfrDyIgxBk=
github.com/distribution/reference v0.6.0/go.mod h1:BbU0aIcezP1/5jX/8MP0YiH4SdvB5Y4f/wlDRiLyi3E=
github.com/docker/docker v27.3.1+incompatible h1:KttF0XoteNTicmUtBO0L2tP+J7FGRFTjaEF4k6WdhfI=
Expand Down Expand Up @@ -931,8 +931,8 @@ github.com/jedib0t/go-pretty/v6 v6.5.9 h1:ACteMBRrrmm1gMsXe9PSTOClQ63IXDUt03H5U+
github.com/jedib0t/go-pretty/v6 v6.5.9/go.mod h1:zbn98qrYlh95FIhwwsbIip0LYpwSG8SUOScs+v9/t0E=
github.com/jfrog/archiver/v3 v3.6.1 h1:LOxnkw9pOn45DzCbZNFV6K0+6dCsQ0L8mR3ZcujO5eI=
github.com/jfrog/archiver/v3 v3.6.1/go.mod h1:VgR+3WZS4N+i9FaDwLZbq+jeU4B4zctXL+gL4EMzfLw=
github.com/jfrog/build-info-go v1.10.1 h1:5nLrpFjbV2zuBdmJXW2nybAz5vyu+qDkOtR7v0ehi8s=
github.com/jfrog/build-info-go v1.10.1/go.mod h1:JcISnovFXKx3wWf3p1fcMmlPdt6adxScXvoJN4WXqIE=
github.com/jfrog/build-info-go v1.10.3 h1:9nqBdZD6xkuxiOvxg+idZ79QLFWQNuucvKkl8Xb42kw=
github.com/jfrog/build-info-go v1.10.3/go.mod h1:JcISnovFXKx3wWf3p1fcMmlPdt6adxScXvoJN4WXqIE=
github.com/jfrog/froggit-go v1.16.1 h1:FBIM1qevX/ag9unfmpGzfmZ36D8ulOJ+DPTSFUk3l5U=
github.com/jfrog/froggit-go v1.16.1/go.mod h1:TEJSzgiV+3D/GVGE8Y6j46ut1jrBLD1FL6WdMdKwwCE=
github.com/jfrog/gofrog v1.7.6 h1:QmfAiRzVyaI7JYGsB7cxfAJePAZTzFz0gRWZSE27c6s=
Expand All @@ -941,14 +941,14 @@ github.com/jfrog/jfrog-apps-config v1.0.1 h1:mtv6k7g8A8BVhlHGlSveapqf4mJfonwvXYL
github.com/jfrog/jfrog-apps-config v1.0.1/go.mod h1:8AIIr1oY9JuH5dylz2S6f8Ym2MaadPLR6noCBO4C22w=
github.com/jfrog/jfrog-cli-artifactory v0.1.6 h1:bMfJsrLQJw0dZp4nqUf1xOmtY0rpCatW/I5q88x+fhQ=
github.com/jfrog/jfrog-cli-artifactory v0.1.6/go.mod h1:jbNb22ebtupcjdhrdGq0VBew2vWG6VUK04xxGNDfynE=
github.com/jfrog/jfrog-cli-core/v2 v2.56.1 h1:+Me+RQx8BYKib+RZLFtGWFftLjEd3NrjVVxJbSYElKU=
github.com/jfrog/jfrog-cli-core/v2 v2.56.1/go.mod h1:+a9VRDizwc+SK2Io6e4Yp8j7hkTeQstQTmNVwrxdh6Q=
github.com/jfrog/jfrog-cli-core/v2 v2.56.3 h1:9ZZ7TGpobk4XShPzrHkRGfpYzs1w0rg7Hqtfg51iNRg=
github.com/jfrog/jfrog-cli-core/v2 v2.56.3/go.mod h1:xL9b2DrH5FemiTuk2bfUBfbQYC/RvpBkPxxV6XxssXs=
github.com/jfrog/jfrog-cli-platform-services v1.3.0 h1:IblSDZFBjL7WLRi37Ni2DmHrXJJ6ysSMxx7t41AvyDA=
github.com/jfrog/jfrog-cli-platform-services v1.3.0/go.mod h1:Ky4SDXuMeaiNP/5zMT1YSzIuXG+cNYYOl8BaEA7Awbc=
github.com/jfrog/jfrog-cli-security v1.11.0 h1:Zb8GrBt0TLJ2ApA4qFxxslN76jZRxLyWfCLbD7pT+l8=
github.com/jfrog/jfrog-cli-security v1.11.0/go.mod h1:0vBYBP1jztDf5e25Ww3CkQAA1C609CAccz9NJLoSoRk=
github.com/jfrog/jfrog-client-go v1.47.1 h1:VT2v28/usTSP56+i3MC3fgRvZoh6vjRgQgs8xTk+sYU=
github.com/jfrog/jfrog-client-go v1.47.1/go.mod h1:7M/vgei7VGcLjUxwQ/3r9pH3lvDHlt6Q+Gw+YMis/mc=
github.com/jfrog/jfrog-cli-security v1.11.3 h1:6tijXL6vUgPzl7zxOneB0G/7/uvpqAOL6iZDtIwZlzY=
github.com/jfrog/jfrog-cli-security v1.11.3/go.mod h1:E+1bdDoN5isP6loyTRQu2UNdu9S38Hz/zq2LidWmZZI=
github.com/jfrog/jfrog-client-go v1.47.2 h1:Lu+2n4EU+MzNfotV1VOvF/ZQIWsQJg11Z4YSVhumFy0=
github.com/jfrog/jfrog-client-go v1.47.2/go.mod h1:fx2fq5XwZ7e2pzpBB9pXsP8+ZdKLB8g+A6fjGU6F2XI=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/jszwec/csvutil v1.10.0 h1:upMDUxhQKqZ5ZDCs/wy+8Kib8rZR8I8lOR34yJkdqhI=
Expand Down
2 changes: 1 addition & 1 deletion utils/cliutils/cli_consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import "time"

const (
// General CLI constants
CliVersion = "2.70.0"
CliVersion = "2.71.0"
ClientAgent = "jfrog-cli-go"

// CLI base commands constants:
Expand Down

0 comments on commit 53b9d04

Please sign in to comment.