Skip to content

Conversation

@reshmifrog
Copy link
Contributor

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • All static analysis checks passed.
  • Appropriate label is added to auto generate release notes.
  • I used gofmt for formatting the code before submitting the pull request.
  • PR description is clear and concise, and it includes the proposed solution/fix.

Added workflow to run cli e2e testcases.

@reshmifrog reshmifrog added the improvement Automatically generated release notes label Jan 20, 2026
@reshmifrog reshmifrog added the safe to test Approve running integration tests on a pull request label Jan 20, 2026
push:
branches:
- main
- master
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we just have main branch in this repo, no point in keeping both

repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Detect replace directives
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there's a direct golang command for replace directives
go mod edit -replace ://github.com

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better to replace all the dependencies with their forked branch in jfrog-cli, if branch not found, replace with master or leave it

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see goTests and NugetTests are missing

Comment on lines +128 to +129
- name: macos
version: 14
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets remove macos until the issue is fixed

# Function to extract repo and ref from replace directive
extract_replace() {
local module=$1
local line=$(grep "^replace github.com/jfrog/$module " go.mod 2>/dev/null | head -1)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this parsing is not reliable, please use go mod edit -json instead.

Comment on lines +185 to +193
- name: Add replace directives (Unix)
if: matrix.os.name == 'ubuntu'
shell: bash
run: |
cd jfrog-cli
echo "replace github.com/jfrog/jfrog-cli-artifactory => ../jfrog-cli-artifactory" >> go.mod
[ -d "../build-info-go" ] && echo "replace github.com/jfrog/build-info-go => ../build-info-go" >> go.mod
[ -d "../jfrog-client-go" ] && echo "replace github.com/jfrog/jfrog-client-go => ../jfrog-client-go" >> go.mod
[ -d "../jfrog-cli-core" ] && echo "replace github.com/jfrog/jfrog-cli-core/v2 => ../jfrog-cli-core" >> go.mod
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use go work (workspaces) which is a cleaner approach.

echo ""

# Check for build-info-go
BUILD_INFO=$(extract_replace "build-info-go")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this logic be removed as shell script, and write logic in either python or go. go mod edit -json can be used along to perform right replacements.

uses: actions/checkout@v5
with:
repository: ${{ needs.Detect-Replaces.outputs.cli_core_repo }}
ref: ${{ needs.Detect-Replaces.outputs.cli_core_ref }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a repeating pattern use composite Github acton

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Automatically generated release notes safe to test Approve running integration tests on a pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants