Skip to content

Commit

Permalink
Merge branch 'dev' of https://github.com/jfrog/jfrog-cli into rb-dist
Browse files Browse the repository at this point in the history
# Conflicts:
#	go.mod
#	go.sum
  • Loading branch information
RobiNino committed Aug 30, 2023
2 parents b0e9a02 + d71026b commit a0f97ea
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 26 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/frogbot-scan-and-fix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ jobs:
# The repository scanning will be triggered periodically on the following branches.
branch: [ "dev" ]
steps:
- uses: actions/checkout@v3
with:
ref: ${{ matrix.branch }}

# Install prerequisites
- name: Setup Go
uses: actions/setup-go@v3
Expand All @@ -40,3 +36,7 @@ jobs:
JF_GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JFROG_CLI_LOG_LEVEL: "DEBUG"

# [Mandatory]
# The name of the branch on which Frogbot will perform the scan
JF_GIT_BASE_BRANCH: ${{ matrix.branch }}

23 changes: 19 additions & 4 deletions .github/workflows/frogbot-scan-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ jobs:
# "frogbot" GitHub environment can approve the pull request to be scanned.
environment: frogbot
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}

# Install prerequisites
- name: Setup Go
uses: actions/setup-go@v3
Expand All @@ -36,3 +32,22 @@ jobs:
# The GitHub token automatically generated for the job
JF_GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JFROG_CLI_LOG_LEVEL: "DEBUG"

# [Optional]
# Configure the SMTP server to enable Frogbot to send emails with detected secrets in pull request scans.
# SMTP server URL including should the relevant port: (Example: smtp.server.com:8080)
JF_SMTP_SERVER: ${{ secrets.JF_SMTP_SERVER }}

# [Mandatory if JF_SMTP_SERVER is set]
# The username required for authenticating with the SMTP server.
JF_SMTP_USER: ${{ secrets.JF_SMTP_USER }}

# [Mandatory if JF_SMTP_SERVER is set]
# The password associated with the username required for authentication with the SMTP server.
JF_SMTP_PASSWORD: ${{ secrets.JF_SMTP_PASSWORD }}

# [Optional]
# List of comma separated email addresses to receive email notifications about secrets
# detected during pull request scanning. The notification is also sent to the email set
# in the committer git profile regardless of whether this variable is set or not.
JF_EMAIL_RECEIVERS: "eco-system@jfrog.com"
5 changes: 3 additions & 2 deletions .github/workflows/gradleTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@ concurrency:
jobs:
Gradle-Tests:
if: contains(github.event.pull_request.labels.*.name, 'safe to test') || github.event_name == 'push'
name: ${{ matrix.os }}
name: ${{ matrix.os }}-gradle-${{ matrix.gradle-version }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
gradle-version: [5.6.4, 8.3]
runs-on: ${{ matrix.os }}
env:
GRADLE_OPTS: -Dorg.gradle.daemon=false
Expand All @@ -31,7 +32,7 @@ jobs:
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
with:
gradle-version: 7.6
gradle-version: ${{ matrix.gradle-version }}
- name: Checkout code
uses: actions/checkout@v3
with:
Expand Down
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ require (
github.com/buger/jsonparser v1.1.1
github.com/go-git/go-git/v5 v5.8.1
github.com/gocarina/gocsv v0.0.0-20230616125104-99d496ca653d
github.com/jfrog/build-info-go v1.9.8
github.com/jfrog/build-info-go v1.9.9
github.com/jfrog/gofrog v1.3.0
github.com/jfrog/jfrog-cli-core/v2 v2.41.2
github.com/jfrog/jfrog-client-go v1.31.5
github.com/jfrog/jfrog-cli-core/v2 v2.41.4
github.com/jfrog/jfrog-client-go v1.31.6
github.com/jszwec/csvutil v1.8.0
github.com/mholt/archiver/v3 v3.5.1
github.com/stretchr/testify v1.8.4
Expand Down Expand Up @@ -122,10 +122,10 @@ require (
gopkg.in/yaml.v3 v3.0.1 // indirect
)

// replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230820165857-52ff32c4d8eb
// replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230828134416-f0db33dd9344

replace github.com/jfrog/jfrog-cli-core/v2 => github.com/RobiNino/jfrog-cli-core/v2 v2.0.0-20230827133749-f7f81f8845f8
replace github.com/jfrog/jfrog-cli-core/v2 => github.com/RobiNino/jfrog-cli-core/v2 v2.0.0-20230830111032-1e5cb3226554

// replace github.com/jfrog/gofrog => github.com/jfrog/gofrog v1.2.6-0.20230418122323-2bf299dd6d27

replace github.com/jfrog/jfrog-client-go => github.com/RobiNino/jfrog-client-go v0.0.0-20230827133404-6bf4a0b1d72a
replace github.com/jfrog/jfrog-client-go => github.com/RobiNino/jfrog-client-go v0.0.0-20230830110857-ebef368b9d5c
12 changes: 6 additions & 6 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5
github.com/Microsoft/hcsshim v0.10.0-rc.8 h1:YSZVvlIIDD1UxQpJp0h+dnpLUw+TrY0cx8obKsp3bek=
github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95 h1:KLq8BE0KwCL+mmXnjLWEAOYO+2l2AE4YMmqG1ZpZHBs=
github.com/ProtonMail/go-crypto v0.0.0-20230717121422-5aa5874ade95/go.mod h1:EjAoLdwvbIOoOQr3ihjnSoLZRtE8azugULFRteWMNc0=
github.com/RobiNino/jfrog-cli-core/v2 v2.0.0-20230827133749-f7f81f8845f8 h1:cfCj/O4EtgO+R9O45AebQP7zUFrGrnDllGom3QOunEo=
github.com/RobiNino/jfrog-cli-core/v2 v2.0.0-20230827133749-f7f81f8845f8/go.mod h1:bCzU2Nqu8KfWBA4ZwjgNsmW+Czpmsb3Y3UEz0F3xy2c=
github.com/RobiNino/jfrog-client-go v0.0.0-20230827133404-6bf4a0b1d72a h1:GMaEzhPNmTGhwe3Mk5fnwHi/U+Y0+oqjnYtnu3MIIS8=
github.com/RobiNino/jfrog-client-go v0.0.0-20230827133404-6bf4a0b1d72a/go.mod h1:icb00ZJN/mMMNkQduHDkzpqsXH9Flwi3f3COYexq3Nc=
github.com/RobiNino/jfrog-cli-core/v2 v2.0.0-20230830111032-1e5cb3226554 h1:7jtvtRnsHovfxjjYdjZh1C5eslKHPOq7b+l7/OHi0fE=
github.com/RobiNino/jfrog-cli-core/v2 v2.0.0-20230830111032-1e5cb3226554/go.mod h1:j4VZwUp+oQiZfxM5Q07z0/J+lMnMWWRDj/SOOzhaadM=
github.com/RobiNino/jfrog-client-go v0.0.0-20230830110857-ebef368b9d5c h1:SYx8yyeQhkkNKqjxDxebvlbMRJ9ijsT7wEG79pzSkYs=
github.com/RobiNino/jfrog-client-go v0.0.0-20230830110857-ebef368b9d5c/go.mod h1:icb00ZJN/mMMNkQduHDkzpqsXH9Flwi3f3COYexq3Nc=
github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow=
github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4=
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d h1:licZJFw2RwpHMqeKTCYkitsPqHNxTmd4SNR5r94FGM8=
Expand Down Expand Up @@ -241,8 +241,8 @@ github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOl
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
github.com/jedib0t/go-pretty/v6 v6.4.6 h1:v6aG9h6Uby3IusSSEjHaZNXpHFhzqMmjXcPq1Rjl9Jw=
github.com/jedib0t/go-pretty/v6 v6.4.6/go.mod h1:Ndk3ase2CkQbXLLNf5QDHoYb6J9WtVfmHZu9n8rk2xs=
github.com/jfrog/build-info-go v1.9.8 h1:D8/ga+YgQpqp/CJj2zteS4/twmSy8zvm1v9lCd2Kv1M=
github.com/jfrog/build-info-go v1.9.8/go.mod h1:t31QRpH5xUJKw8XkQlAA+Aq7aanyS1rrzpcK8xSNVts=
github.com/jfrog/build-info-go v1.9.9 h1:YMA9okHawBNL8SrCWzqULSf5M4W+YnWyUhmkWSjoXEE=
github.com/jfrog/build-info-go v1.9.9/go.mod h1:t31QRpH5xUJKw8XkQlAA+Aq7aanyS1rrzpcK8xSNVts=
github.com/jfrog/gofrog v1.3.0 h1:o4zgsBZE4QyDbz2M7D4K6fXPTBJht+8lE87mS9bw7Gk=
github.com/jfrog/gofrog v1.3.0/go.mod h1:IFMc+V/yf7rA5WZ74CSbXe+Lgf0iApEQLxRZVzKRUR0=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
Expand Down
4 changes: 2 additions & 2 deletions inttestutils/buildinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (

coreutils "github.com/jfrog/jfrog-cli-core/v2/artifactory/utils"

"github.com/jfrog/jfrog-client-go/artifactory/services/utils"
"github.com/jfrog/jfrog-client-go/http/httpclient"
"github.com/jfrog/jfrog-client-go/utils"
"github.com/jfrog/jfrog-client-go/utils/io/httputils"
"github.com/jfrog/jfrog-client-go/utils/log"
"github.com/stretchr/testify/assert"
Expand All @@ -27,7 +27,7 @@ func DeleteBuild(artifactoryUrl, buildName string, artHttpDetails httputils.Http

restApi := path.Join("api/build/", buildName)
params := map[string]string{"deleteAll": "1"}
requestFullUrl, err := utils.BuildArtifactoryUrl(artifactoryUrl, restApi, params)
requestFullUrl, err := utils.BuildUrl(artifactoryUrl, restApi, params)
if err != nil {
log.Error(err)
return
Expand Down
16 changes: 15 additions & 1 deletion testdata/gradle/projectwithplugin/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ buildscript {
apply plugin: 'groovy'
apply plugin: 'idea'
apply plugin: 'com.jfrog.artifactory'
apply plugin: 'maven-publish'

version = 1.0
task initProject(description: 'Initialize project directory structure.') {
doLast {
Expand All @@ -28,6 +30,18 @@ task initProject(description: 'Initialize project directory structure.') {
}
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}
}

tasks.withType(GenerateModuleMetadata) {
enabled = false
}

artifactory {
contextUrl = "${URL}"
publish {
Expand All @@ -40,7 +54,7 @@ artifactory {
// Reference to Gradle publications defined in the build script.
// This is how we tell the Artifactory Plugin which artifacts should be
// published to Artifactory.
publishConfigs('archives', 'published')
publications('mavenJava')
publishArtifacts = true
// Properties to be attached to the published artifacts.
properties = ['qa.level': 'basic', 'dev.team' : 'core']
Expand Down
2 changes: 1 addition & 1 deletion xray_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ func validateXrayVersion(t *testing.T, minVersion string) {
assert.NoError(t, err)
return
}
err = coreutils.ValidateMinimumVersion(coreutils.Xray, xrayVersion.GetVersion(), minVersion)
err = clientUtils.ValidateMinimumVersion(clientUtils.Xray, xrayVersion.GetVersion(), minVersion)
if err != nil {
t.Skip(err)
}
Expand Down

0 comments on commit a0f97ea

Please sign in to comment.