Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancements to Release Bundle Create Command: Optional Flags and Fallback Support #2772

Merged
merged 12 commits into from
Dec 5, 2024

Conversation

oshratZairi
Copy link
Collaborator

@oshratZairi oshratZairi commented Nov 27, 2024

  • All tests have passed. If this feature is not already covered by the tests, new tests have been added.
  • The pull request is targeting the dev branch.
  • The code has been validated to compile successfully by running go vet ./....
  • The code has been formatted properly using go fmt ./....

Improvements to the release bundle create command:

  • Made the spec flag optional, with build-name and build-number flags as replacements.
  • Added support for JFROG_CLI_BUILD_NAME and JFROG_CLI_BUILD_NUMBER as fallback options when the build-name and build-number flags are not provided.

documentation - https://github.com/jfrog/documentation/pull/173/files

@lesnerd lesnerd added the safe to test Approve running integration tests on a pull request label Nov 27, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Nov 27, 2024
@lesnerd lesnerd added the safe to test Approve running integration tests on a pull request label Nov 27, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Nov 27, 2024
@lesnerd lesnerd added the safe to test Approve running integration tests on a pull request label Nov 27, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Nov 27, 2024
@oshratZairi oshratZairi changed the title Optional spec turn spec flag to optional in RBC command Nov 28, 2024
Comment on lines 582 to 583
BuildName = "build-name"
BuildNumber = "build-number"
Copy link
Contributor

Choose a reason for hiding this comment

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

No need to define the above two consts.
You should reuse the existing buildName and buildNumber consts defined above.

utils/cliutils/utils.go Outdated Show resolved Hide resolved
utils/tests/utils.go Outdated Show resolved Hide resolved
lifecycle_test.go Outdated Show resolved Hide resolved
@lesnerd lesnerd added the safe to test Approve running integration tests on a pull request label Dec 3, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Dec 3, 2024
@lesnerd lesnerd added the safe to test Approve running integration tests on a pull request label Dec 3, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Dec 3, 2024
@lesnerd lesnerd added the safe to test Approve running integration tests on a pull request label Dec 3, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Dec 3, 2024
@eyalbe4 eyalbe4 added the safe to test Approve running integration tests on a pull request label Dec 4, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Dec 4, 2024
lifecycle/cli.go Show resolved Hide resolved
lifecycle/cli.go Show resolved Hide resolved
lifecycle/cli.go Show resolved Hide resolved
lifecycle/cli.go Show resolved Hide resolved
Comment on lines +83 to +85
t.Setenv("JFROG_CLI_BUILD_NAME", "Common-builds")
t.Setenv("JFROG_CLI_BUILD_NUMBER", "2.0.0")
Copy link
Contributor

Choose a reason for hiding this comment

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

When test functions set env vars, they must also remove them at the end. There's already a tulity function in the code that takes care of this. Check other tests asa reference.

Copy link
Contributor

Choose a reason for hiding this comment

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

The way you set the variables is unsafe. You should use the SetEnvWithCallbackAndAssert API.

utils/cliutils/commandsflags.go Show resolved Hide resolved
@lesnerd lesnerd added the safe to test Approve running integration tests on a pull request label Dec 4, 2024
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Dec 4, 2024
@oshratZairi oshratZairi requested a review from eyalbe4 December 4, 2024 14:59
@oshratZairi oshratZairi merged commit a124f63 into jfrog:dev Dec 5, 2024
61 of 63 checks passed
eyalbe4 pushed a commit to eyalbe4/jfrog-cli that referenced this pull request Dec 8, 2024
@eyalbe4 eyalbe4 added the ignore for release Automatically generated release notes label Dec 8, 2024
eyalbe4 added a commit that referenced this pull request Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ignore for release Automatically generated release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants