Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Dependabot auto-merge
on:
workflow_dispatch:
pull_request_target:
branches:
- master
Expand All @@ -14,11 +13,46 @@ jobs:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'jfrog/jfrog-cli'
steps:
- name: Add 'ignore for release' label
run: |
gh pr edit ${{ github.event.pull_request.number }} --add-label "ignore for release"
env:
GH_TOKEN: ${{ secrets.CLI_ACTION_TOKEN }}

- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2.4.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"

- name: Checkout PR code
if: steps.metadata.outputs.dependency-group == 'go'
uses: actions/checkout@v5
with:
ref: ${{ github.event.pull_request.head.sha }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Run make update-all for go dependencies
if: steps.metadata.outputs.dependency-group == 'go'
run: make update-all

- name: Check for changes and commit
if: steps.metadata.outputs.dependency-group == 'go'
run: |
if [ -n "$(git status --porcelain)" ]; then
git config --local user.email "action@github.com"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "Update JFrog dependencies via make update-all"
git push
fi

- name: Approve PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.CLI_ACTION_TOKEN}}

- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --squash "$PR_URL"
env:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/stale-issues-and-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ jobs:
steps:
- uses: actions/stale@v10
with:
# Ignore issues with these labels
exempt-issue-labels: "feature request,question"
# Days of inactivity before marking an issue as stale
days-before-stale: 180
# Days of inactivity before closing an issue
Expand Down
105 changes: 105 additions & 0 deletions .github/workflows/update-jf-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Update JFrog Dependencies

on:
workflow_dispatch:

permissions:
contents: write
pull-requests: write

jobs:
update-dependencies:
name: Update JFrog Dependencies
runs-on: ubuntu-latest
steps:
- name: Generate timestamp
id: timestamp
run: echo "timestamp=$(date +%Y%m%d%H%M%S)" >> $GITHUB_OUTPUT

- name: Checkout main branch
uses: actions/checkout@v5
with:
ref: master
token: ${{ secrets.GITHUB_TOKEN }}

- name: Create and checkout new branch
id: branch
run: |
BRANCH_NAME="use-latest-jf-dependencies-${{ steps.timestamp.outputs.timestamp }}"
git config --local user.email "action@github.com"
git config --local user.name "github-actions[bot]"
git checkout -b "$BRANCH_NAME"
echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT

- name: Run make update-all
run: make update-all

- name: Check for changes and commit
id: changes
run: |
if [ -n "$(git status --porcelain)" ]; then
git add .
git commit -m "Update JFrog dependencies to latest versions

- Updated build-info-go to latest main branch
- Updated gofrog to latest main branch
- Updated jfrog-cli-core to latest main branch
- Updated jfrog-cli-artifactory to latest main branch
- Updated jfrog-cli-platform-services to latest main branch
- Updated jfrog-cli-security to latest main branch
- Ran go mod tidy to clean up dependencies

Generated by workflow: ${{ github.workflow }}"
git push origin "${{ steps.branch.outputs.branch_name }}"
echo "has_changes=true" >> $GITHUB_OUTPUT
else
echo "has_changes=false" >> $GITHUB_OUTPUT
echo "No changes detected, skipping PR creation"
fi

- name: Create Pull Request
if: steps.changes.outputs.has_changes == 'true'
run: |
gh pr create \
--title "Update JFrog dependencies to latest versions" \
--body "This PR updates all JFrog dependencies to their latest versions:

- **build-info-go**: Updated to latest main branch
- **gofrog**: Updated to latest main branch
- **jfrog-cli-core**: Updated to latest main branch
- **jfrog-cli-artifactory**: Updated to latest main branch
- **jfrog-cli-platform-services**: Updated to latest main branch
- **jfrog-cli-security**: Updated to latest main branch
- **go.mod**: Cleaned up with \`go mod tidy\`

Generated automatically by workflow: \`${{ github.workflow }}\`

**Branch**: \`${{ steps.branch.outputs.branch_name }}\`
**Timestamp**: \`${{ steps.timestamp.outputs.timestamp }}\`" \
--base master \
--head "${{ steps.branch.outputs.branch_name }}"
env:
GH_TOKEN: ${{ secrets.CLI_ACTION_TOKEN }}

- name: Get PR number
if: steps.changes.outputs.has_changes == 'true'
id: pr_number
run: |
PR_NUMBER=$(gh pr list --head "${{ steps.branch.outputs.branch_name }}" --json number --jq '.[0].number')
echo "pr_number=$PR_NUMBER" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ secrets.CLI_ACTION_TOKEN }}

- name: Approve Pull Request
if: steps.changes.outputs.has_changes == 'true'
run: |
gh pr review --approve "${{ steps.pr_number.outputs.pr_number }}"
env:
GH_TOKEN: ${{ secrets.CLI_ACTION_TOKEN }}

- name: Enable auto-merge
if: steps.changes.outputs.has_changes == 'true'
run: |
gh pr merge --auto --squash "${{ steps.pr_number.outputs.pr_number }}"
env:
GH_TOKEN: ${{ secrets.CLI_ACTION_TOKEN }}
83 changes: 83 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Makefile for jfrog-client-go

.PHONY: $(MAKECMDGOALS)

# Default target
help:
@echo "Available targets:"
@echo " update-all - Update all JFrog dependencies to latest versions"
@echo " update-build-info-go - Update build-info-go to latest main branch"
@echo " update-client-go - Update client-go to latest main branch"
@echo " update-gofrog - Update gofrog to latest main branch"
@echo " update-core - Update jfrog-cli-core to latest main branch"
@echo " update-artifactory - Update jfrog-cli-artifactory to latest main branch"
@echo " update-platform-services - Update jfrog-cli-platform-services to latest main branch"
@echo " update-security - Update jfrog-cli-security to latest main branch"
@echo " clean - Clean build artifacts"
@echo " test - Run tests"
@echo " build - Build the project"

# Update all JFrog dependencies
update-all: update-build-info-go update-client-go update-gofrog update-core update-artifactory update-platform-services update-security
@echo "All JFrog dependencies updated successfully!"
@GOPROXY=direct go mod tidy

# Update build-info-go to latest main branch (using direct proxy to bypass Artifactory)
update-build-info-go:
@echo "Updating build-info-go to latest main branch..."
@GOPROXY=direct go get github.com/jfrog/build-info-go@main
@echo "build-info-go updated successfully!"

# Update gofrog to latest main branch
update-client-go:
@echo "Updating client-go to latest main branch..."
@GOPROXY=direct go get github.com/jfrog/jfrog-client-go@master
@echo "client-go updated successfully!"

# Update gofrog to latest main branch
update-gofrog:
@echo "Updating gofrog to latest main branch..."
@GOPROXY=direct go get github.com/jfrog/gofrog@master
@echo "gofrog updated successfully!"

# Update jfrog-cli-core to latest main branch
update-core:
@echo "Updating jfrog-cli-core to latest main branch..."
@GOPROXY=direct go get github.com/jfrog/jfrog-cli-core/v2@master
@echo "jfrog-cli-core updated successfully!"

# Update jfrog-cli-artifactory to latest main branch
update-artifactory:
@echo "Updating jfrog-cli-artifactory to latest main branch..."
@GOPROXY=direct go get github.com/jfrog/jfrog-cli-artifactory@main
@echo "jfrog-cli-artifactory updated successfully!"

# Update jfrog-cli-platform-services to latest main branch
update-platform-services:
@echo "Updating jfrog-cli-platform-services to latest main branch..."
@GOPROXY=direct go get github.com/jfrog/jfrog-cli-platform-services@main
@echo "jfrog-cli-platform-services updated successfully!"

# Update jfrog-cli-security to latest main branch
update-security:
@echo "Updating jfrog-cli-security to latest main branch..."
@GOPROXY=direct go get github.com/jfrog/jfrog-cli-security@main
@echo "jfrog-cli-security updated successfully!"


# Clean build artifacts
clean:
@echo "Cleaning build artifacts..."
@go clean
@go clean -cache
@go clean -modcache

# Run tests
test:
@echo "Running tests..."
@go test ./...

# Build the project
build:
@echo "Building project..."
@go build ./...
53 changes: 27 additions & 26 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ require (
github.com/jfrog/archiver/v3 v3.6.1
github.com/jfrog/build-info-go v1.11.0
github.com/jfrog/gofrog v1.7.6
github.com/jfrog/jfrog-cli-artifactory v0.7.3-0.20250917120635-6e83963acb2f
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20250916125111-76d9929c5d07
github.com/jfrog/jfrog-cli-artifactory v0.7.3-0.20250919153452-dd92b2c8f024
github.com/jfrog/jfrog-cli-core/v2 v2.60.1-0.20250918084044-2eb3f15d08c1
github.com/jfrog/jfrog-cli-platform-services v1.10.0
github.com/jfrog/jfrog-cli-security v1.21.7
github.com/jfrog/jfrog-client-go v1.55.0
github.com/jfrog/jfrog-client-go v1.55.1-0.20250922120823-e64346ea079b
github.com/jszwec/csvutil v1.10.0
github.com/manifoldco/promptui v0.9.0
github.com/stretchr/testify v1.11.1
github.com/testcontainers/testcontainers-go v0.35.0
github.com/urfave/cli v1.22.17
github.com/xeipuuv/gojsonschema v1.2.0
golang.org/x/exp v0.0.0-20250305212735-054e65f0b394
golang.org/x/exp v0.0.0-20250911091902-df9299821621
gopkg.in/yaml.v2 v2.4.0
)

Expand All @@ -43,8 +43,8 @@ require (
github.com/ProtonMail/go-crypto v1.1.6 // indirect
github.com/VividCortex/ewma v1.2.0 // indirect
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect
github.com/andybalholm/brotli v1.1.1 // indirect
github.com/apache/camel-k/v2 v2.7.0 // indirect
github.com/andybalholm/brotli v1.2.0 // indirect
github.com/apache/camel-k/v2 v2.8.0 // indirect
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 // indirect
github.com/beevik/etree v1.4.0 // indirect
github.com/blang/semver v3.5.1+incompatible // indirect
Expand Down Expand Up @@ -84,7 +84,7 @@ require (
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/go-openapi/analysis v0.23.0 // indirect
github.com/go-openapi/errors v0.22.1 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonpointer v0.21.1 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/loads v0.22.0 // indirect
github.com/go-openapi/runtime v0.28.0 // indirect
Expand All @@ -103,7 +103,6 @@ require (
github.com/google/go-github/v56 v56.0.0 // indirect
github.com/google/go-github/v74 v74.0.0 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/uuid v1.6.0 // indirect
github.com/gookit/color v1.6.0 // indirect
github.com/grokify/mogo v0.64.12 // indirect
Expand All @@ -125,7 +124,7 @@ require (
github.com/json-iterator/go v1.1.12 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.18.0 // indirect
github.com/klauspost/cpuid/v2 v2.2.9 // indirect
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
github.com/klauspost/pgzip v1.2.6 // indirect
github.com/ktrysmt/go-bitbucket v0.9.80 // indirect
github.com/letsencrypt/boulder v0.0.0-20240620165639-de9c06129bec // indirect
Expand Down Expand Up @@ -184,7 +183,7 @@ require (
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
github.com/spf13/afero v1.15.0 // indirect
github.com/spf13/cast v1.10.0 // indirect
github.com/spf13/cobra v1.9.1 // indirect
github.com/spf13/cobra v1.10.1 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/spf13/viper v1.21.0 // indirect
github.com/stoewer/go-strcase v1.3.1 // indirect
Expand All @@ -209,39 +208,41 @@ require (
github.com/yusufpapurcu/wmi v1.2.3 // indirect
go.mongodb.org/mongo-driver v1.14.0 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.60.0 // indirect
go.opentelemetry.io/otel v1.35.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.62.0 // indirect
go.opentelemetry.io/otel v1.37.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.34.0 // indirect
go.opentelemetry.io/otel/metric v1.35.0 // indirect
go.opentelemetry.io/otel/trace v1.35.0 // indirect
go.opentelemetry.io/otel/metric v1.37.0 // indirect
go.opentelemetry.io/otel/trace v1.37.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
go.yaml.in/yaml/v3 v3.0.4 // indirect
golang.org/x/crypto v0.38.0 // indirect
golang.org/x/mod v0.26.0 // indirect
golang.org/x/net v0.40.0 // indirect
golang.org/x/oauth2 v0.30.0 // indirect
golang.org/x/sync v0.16.0 // indirect
golang.org/x/crypto v0.41.0 // indirect
golang.org/x/mod v0.28.0 // indirect
golang.org/x/net v0.43.0 // indirect
golang.org/x/oauth2 v0.31.0 // indirect
golang.org/x/sync v0.17.0 // indirect
golang.org/x/sys v0.36.0 // indirect
golang.org/x/term v0.35.0 // indirect
golang.org/x/text v0.28.0 // indirect
golang.org/x/text v0.29.0 // indirect
golang.org/x/time v0.12.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250414145226-207652e42e2e // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250414145226-207652e42e2e // indirect
google.golang.org/grpc v1.72.2 // indirect
google.golang.org/protobuf v1.36.6 // indirect
google.golang.org/protobuf v1.36.8 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/api v0.32.3 // indirect
k8s.io/apimachinery v0.32.3 // indirect
k8s.io/api v0.33.4 // indirect
k8s.io/apimachinery v0.33.4 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/utils v0.0.0-20250321185631-1f6e0b77f77e // indirect
sigs.k8s.io/controller-runtime v0.20.4 // indirect
k8s.io/utils v0.0.0-20250604170112-4c0f3b243397 // indirect
sigs.k8s.io/controller-runtime v0.21.0 // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.7.0 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
sigs.k8s.io/yaml v1.6.0 // indirect
)

// replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20250907205057-2bfe50c014b7
Expand Down
Loading