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 Dec 4, 2023
2 parents d008cbd + 114c871 commit 901c196
Show file tree
Hide file tree
Showing 53 changed files with 140 additions and 5,532 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/pythonTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
strategy:
fail-fast: false
matrix:
suite: [ pip, pipenv, poetry ]
suite: [ pip, pipenv ]
os: [ ubuntu, windows, macos ]
runs-on: ${{ matrix.os }}-latest
steps:
Expand All @@ -35,9 +35,6 @@ jobs:
- name: Setup Pipenv
if: ${{ matrix.suite == 'pipenv' }}
run: python -m pip install pipenv
- name: Setup Poetry
if: ${{ matrix.suite == 'poetry' }}
run: python -m pip install poetry
- name: Checkout code
uses: actions/checkout@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scriptTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ jobs:
- name: "Get latest release"
id: latest-release
run: |
export LATEST_RELEASE=`curl https://api.github.com/repos/jfrog/jfrog-cli/releases/latest -s | jq .name -r | cut -c 2-`
export LATEST_RELEASE=`curl https://api.github.com/repos/jfrog/jfrog-cli/releases/latest -s --retry 10 | jq .name -r | cut -c 2-`
echo "LATEST_RELEASE=$LATEST_RELEASE" >> "$GITHUB_OUTPUT"
shell: bash

Expand Down
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ The available test types are:
| `-test.go` | Go tests |
| `-test.pip` | Pip tests |
| `-test.pipenv` | Pipenv tests |
| `-test.poetry` | Poetry tests |
| `-test.nuget` | Nuget tests |
| `-test.plugins` | Plugins tests |
| `-test.distribution` | Distribution tests |
Expand Down
34 changes: 34 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,18 @@ node("docker") {
}
}

state('synchronize branches') {
if ("$EXECUTION_MODE".toString().equals("Build CLI")) {
masterBranch = 'v2'
devBranch = 'dev'
if (BRANCH?.trim() == 'v1') {
masterBranch = 'v1'
devBranch = 'dev-v1'
}
synchronizeBranches(masterBranch, devBranch)
}
}

stage('install npm') {
installNpm(nodeVersion)
}
Expand Down Expand Up @@ -148,6 +160,28 @@ def runRelease(architectures) {
}
}

def synchronizeBranches(masterBranch, devBranch) {
dir("$cliWorkspace/$repo") {
releaseTag = "v$RELEASE_VERSION"
withCredentials([string(credentialsId: 'ecosystem-github-automation', variable: 'GITHUB_ACCESS_TOKEN')]) {
stage("Merge to $masterBranch") {
sh """#!/bin/bash
git merge origin/$devBranch --no-edit
git push "https://$GITHUB_ACCESS_TOKEN@github.com/jfrog/jfrog-cli.git"
"""
}
stage("Merge to $devBranch") {
sh """#!/bin/bash
git checkout $devBranch
git merge origin/$masterBranch --no-edit
git push "https://$GITHUB_ACCESS_TOKEN@github.com/jfrog/jfrog-cli.git"
git checkout $masterBranch
"""
}
}
}
}

def createTag() {
stage('Create a tag and a GitHub release') {
dir("$jfrogCliRepoDir") {
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,11 @@ the [JFrog CLI User Guide](https://jfrog.com/help/r/jfrog-cli).

# JFrog CLI Plugins

JFrog CLI plugins support enhancing the functionality of JFrog CLI to meet the specific user and organization needs. The
[JFrog CLI Plugins](https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli/cli-plugins) support enhancing the functionality of JFrog CLI to meet the specific user and organization needs. The
source code of a plugin is maintained as an open source Go project on GitHub. All public plugins are registered in JFrog
CLI's Plugins Registry, which is hosted in the [jfrog-cli-plugins-reg](https://github.com/jfrog/jfrog-cli-plugins-reg)
GitHub repository. We encourage you, as developers, to create plugins and share them publicly with the rest of the
community. Read more about this in the [JFrog CLI Plugin Developer Guide](guides/jfrog-cli-plugins-developer-guide.md).
community. Read more about this in the [JFrog CLI Plugin Developer Guide](https://docs.jfrog-applications.jfrog.io/jfrog-applications/jfrog-cli/cli-plugins/developer-guide).

# Release Notes

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.51.1",
"version": "2.52.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.51.1",
"version": "2.52.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
24 changes: 23 additions & 1 deletion distribution_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ func TestUpdateBundleProps(t *testing.T) {
cleanDistributionTest(t)
}

func TestBundlePathMapping(t *testing.T) {
func TestBundlePathMappingFromPatternAndTarget(t *testing.T) {
initDistributionTest(t)

// Upload files
Expand All @@ -465,6 +465,28 @@ func TestBundlePathMapping(t *testing.T) {
cleanDistributionTest(t)
}

func TestBundlePathMappingFromPatternAndTargetUsingSpec(t *testing.T) {
initDistributionTest(t)

// Upload files
specFile, err := tests.CreateSpec(tests.DistributionUploadSpecB)
assert.NoError(t, err)
runRt(t, "u", "--spec="+specFile)

// Create and distribute release bundle with path mapping from <DistRepo1>/data/ to <DistRepo2>/target/
spec, err := tests.CreateSpec(tests.DistributionCreateWithPatternAndTarget)
assert.NoError(t, err)
runDs(t, "rbc", tests.BundleName, bundleVersion, "--sign", "--spec="+spec)
runDs(t, "rbd", tests.BundleName, bundleVersion, "--site=*", "--sync")

// Validate files are distributed to the target mapping
spec, err = tests.CreateSpec(tests.DistributionMappingDownload)
assert.NoError(t, err)
inttestutils.VerifyExistInArtifactory(tests.GetBundleMappingExpected(), spec, serverDetails, t)

cleanDistributionTest(t)
}

func TestBundlePathMappingUsingSpec(t *testing.T) {
initDistributionTest(t)

Expand Down
Loading

0 comments on commit 901c196

Please sign in to comment.