Fix for mismatching cpu type for macos arm64 architecture #2993
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
dev
branch.go vet ./...
.go fmt ./...
.🐛 Problem Statement
The execution of binary jf on macos arm64 is causing
Bad CPU type in executable
🔍 Root Cause
The unzip command, by default, prompts the user when it encounters existing files. In non-interactive environments (like shell scripts or CI/CD runners), there is no stdin to provide an answer. This leads to a read error, causing unzip to default to [N]one, meaning it skips overwriting existing files silently. This PR should also fix #2960
✅ Fix Implemented
Added the -o flag to the unzip command to force overwrite of existing files without user interaction. As an alternative approach the binary can be deleted as well once upload is successful
jfrog-cli/Jenkinsfile
Line 547 in eee4967
📌 Notes
This is happening on jenkins release pipeline, CI script is packing from github uploading as artifact and jenkins pipelines is downloading the bin and uploading to
releases.jfrog.io
even though jfrog-cli binary is build properly for arm64 because of similar steps for x86 and arm64 binaries the artifact created as artifact.zip is with same name for arm64 and x86. Since x86 happens first and then arm64, unzip binary for arm64 fails since it is with same name. It should work even on arm64 with Rosetta installed.below screen shot should show the difference from 2.73.2 this issue has started
