jfrog-cli
jfrog-cli copied to clipboard
Build name being added as a module
Describe the bug When generating build metadata the build name gets added as a module.
To Reproduce
Set the build id and name.
╰─ export JFROG_CLI_BUILD_NUMBER=1
╰─ export JFROG_CLI_BUILD_NAME=mytest
Generate some build metadata.
╰─ jfrog rt build-add-git
[Info] Reading the git branch, revision and remote URL and adding them to the build-info.
Check the build metadata.
╰─ jfrog rt build-publish --dry-run
[Info] [Dry run] Logging Build info preview...
{
"name": "mytest",
"number": "1",
"agent": {
"name": "jfrog-cli-go",
"version": "1.49.0"
},
"buildAgent": {
"name": "GENERIC",
"version": "1.49.0"
},
"modules": [
{
"properties": {},
"id": "mytest" <-------- Why was the build name added as a module?
}
],
"started": "2021-06-22T12:50:08.344-0400",
"vcs": [
{
"url": "ssh://[email protected]:443/test/test.git",
"revision": "12219b8fc04aba8bbf141f7e85480f37732b58a1",
"branch": "main",
"message": "initial commit"
}
]
}
Expected behavior The build name not to be added as a module to modules.
Versions
- JFrog CLI version:
1.49.0 - JFrog CLI operating system:
MacOS - Artifactory Version:
7.12.x
Additional context
This bug was introduced in version 1.47.3 (https://github.com/jfrog/jfrog-cli/commit/0917a854dcc74a7c53dcc682a8dc7cc68afc9ff1 through updating a dependency https://github.com/jfrog/jfrog-cli-core/commit/5b85318ba25e37b2f0cd560b3f1c9c34b64e8bd2).
Looking at the release notes it seems this bug was introduced as an attempt to fix another bug.
- Bug fix - "jfrog rt build-publish" module type is missing in build-info modules.
Working as expected in version 1.47.2. Notice that build name has not been added as a module.
╰─ jfrog rt build-publish --dry-run
[Info] [Dry run] Logging Build info preview...
{
"name": "mytest",
"number": "1",
"agent": {
"name": "jfrog-cli-go",
"version": "1.47.2"
},
"buildAgent": {
"name": "GENERIC",
"version": "1.47.2"
},
"started": "2021-06-22T13:09:44.083-0400",
"vcs": [
{
"url": "ssh://[email protected]:443/oci-cdx/ubuntu.git",
"revision": "32219b8fc04aba8bbf141f7e85480f37732b58c6",
"branch": "main",
"message": "initial commit"
}
]
}