Skip to content

Commit

Permalink
Merge branch 'jfrog:dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
bhanurp authored Aug 28, 2023
2 parents 0ae5015 + e42bc31 commit 27795af
Show file tree
Hide file tree
Showing 115 changed files with 4,265 additions and 2,399 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/embedded-jar-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This test verifies that gradle-dep-tree.jar and maven-dep-tree.jar are kept up-to-date with the version specified in buildscripts/download-jars.js.
# It accomplishes this by downloading the JARs and executing a "git diff" command.
# In case there are any differences detected, the test will result in failure.
name: Embedded Jars Tests
on:
push:
branches:
- '**'
tags-ignore:
- '**'
pull_request:
jobs:
test:
runs-on: ubuntu-latest
env:
GOPROXY: direct
steps:
- uses: actions/checkout@v3

- name: Download JARs
run: buildscripts/download-jars.sh

- name: Check Diff
run: git diff --exit-code

- name: Log if Failure
run: echo "::warning::Please run ./buildscripts/download-jars to use compatible Maven and Gradle dependency tree JARs."
if: ${{ failure() }}

4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ on:
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
os: [ ubuntu, windows, macOS ]
env:
GOPROXY: direct
GRADLE_OPTS: -Dorg.gradle.daemon=false
Expand Down
3 changes: 2 additions & 1 deletion artifactory/commands/buildinfo/adddependencies.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ func getLocalDependencies(addDepsParams *specutils.CommonParams) ([]string, erro

func collectPatternMatchingFiles(addDepsParams *specutils.CommonParams, rootPath string) ([]string, error) {
addDepsParams.SetPattern(clientutils.ConvertLocalPatternToRegexp(addDepsParams.Pattern, addDepsParams.GetPatternType()))
excludePathPattern := fspatterns.PrepareExcludePathPattern(addDepsParams)
excludePathPattern := fspatterns.PrepareExcludePathPattern(addDepsParams.Exclusions, addDepsParams.GetPatternType(), addDepsParams.IsRecursive())
patternRegex, err := regxp.Compile(addDepsParams.Pattern)
if errorutils.CheckError(err) != nil {
return nil, err
Expand Down Expand Up @@ -286,6 +286,7 @@ func (badc *BuildAddDependenciesCommand) savePartialBuildInfo(dependencies []bui
populateFunc := func(partial *buildinfo.Partial) {
partial.ModuleType = buildinfo.Generic
partial.Dependencies = dependencies
partial.ModuleId = badc.buildConfiguration.GetModule()
}
buildName, err := badc.buildConfiguration.GetBuildName()
if err != nil {
Expand Down
10 changes: 5 additions & 5 deletions artifactory/commands/buildinfo/publish_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ func TestPrintBuildInfoLink(t *testing.T) {
config.ServerDetails{ArtifactoryUrl: "http://localhost:8082/artifactory/"}, "http://localhost:8082/ui/builds/test/1/" + buildTime + "/published?buildRepo=cli-build-info&projectKey=cli"},
}

for _, linkType := range linkTypes {
for i := range linkTypes {
buildPubConf := &BuildPublishCommand{
linkType.buildInfoConf,
&linkType.serverDetails,
linkTypes[i].buildInfoConf,
&linkTypes[i].serverDetails,
nil,
true,
nil,
}
buildPubComService, err := buildPubConf.getBuildInfoUiUrl(linkType.majorVersion, linkType.buildTime)
buildPubComService, err := buildPubConf.getBuildInfoUiUrl(linkTypes[i].majorVersion, linkTypes[i].buildTime)
assert.NoError(t, err)
assert.Equal(t, buildPubComService, linkType.expected)
assert.Equal(t, buildPubComService, linkTypes[i].expected)
}
}
Loading

0 comments on commit 27795af

Please sign in to comment.