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

Support for Distribution path mapping with AQL #2313

Merged
merged 1 commit into from
Nov 27, 2023
Merged

Support for Distribution path mapping with AQL #2313

merged 1 commit into from
Nov 27, 2023

Conversation

YardenEdery
Copy link
Contributor

@YardenEdery YardenEdery commented Nov 15, 2023

  • 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 ./....

Added support of "pathMapping" property to file spec in order to have the ability to control where to distribute the artifacts that are being added dynamically when using AQL in the release bundle that is being created.

When looking for docker artifacts using AQL, the release bundle also includes, in the distribution server backend, all the layers for a manifest.json and all of the manifest.json files and their layers if its a list.manifest.json

From now on the "pathMapping" will take affect on those none specified added manifests and layers and will allow the users a native way of creating the file spec for distribution commands.

FYI This couldn't be achieved using "target" for the list.manifest.json example.

@yahavi yahavi added improvement Automatically generated release notes safe to test Approve running integration tests on a pull request labels Nov 15, 2023
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Nov 15, 2023
@yahavi yahavi added the safe to test Approve running integration tests on a pull request label Nov 19, 2023
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Nov 19, 2023
@yahavi yahavi added the safe to test Approve running integration tests on a pull request label Nov 20, 2023
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Nov 20, 2023
Copy link
Contributor

👍 Frogbot scanned this pull request and found that it did not add vulnerable dependencies.


@eyalbe4 eyalbe4 self-requested a review November 22, 2023 16:22
@eyalbe4 eyalbe4 changed the title Add distribution path mappings Support for Distribution path mapping with AQL Nov 22, 2023
@eyalbe4 eyalbe4 added new feature Automatically generated release notes and removed improvement Automatically generated release notes labels Nov 22, 2023
Copy link
Contributor

@eyalbe4 eyalbe4 left a comment

Choose a reason for hiding this comment

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

Comment on lines 14 to 15
} No newline at end of file
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Unnecessary change which adds a redundant new-line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But gofmt makes the go file end with a newline, are you sure not to align this on current file?

@eyalbe4 eyalbe4 added the safe to test Approve running integration tests on a pull request label Nov 22, 2023
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Nov 22, 2023
@YardenEdery
Copy link
Contributor Author

Should we also create documentation in:
https://jfrog.com/help/r/jfrog-cli/cli-for-jfrog-artifactory

@@ -42,6 +42,19 @@
}
}
},
"pathMapping": {
"description": "If specified, determines release-bundle source and target paths for artifacts that had been fetched using aql",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"description": "If specified, determines release-bundle source and target paths for artifacts that had been fetched using aql",
"description": "If specified, determines release-bundle source and target paths for artifacts that had been fetched using aql.",

"properties": {
"input": {
"type": "string",
"description": "The input path for mapping."
Copy link
Member

Choose a reason for hiding this comment

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

Configuring pathMapping is challenging and the documentation does not explain how to do it. Let's add an example:

Suggested change
"description": "The input path for mapping."
"description": "The input path for mapping.",
"examples": ["(.*)/old_folder/(.*)"]

},
"output": {
"type": "string",
"description": "The output path for mapping."
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"description": "The output path for mapping."
"description": "The output path for mapping.",
"examples": ["$1/new_folder/$2"]

@yahavi yahavi added the safe to test Approve running integration tests on a pull request label Nov 27, 2023
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Nov 27, 2023
@yahavi
Copy link
Member

yahavi commented Nov 27, 2023

Please also update go.mod and go.sum with the tip of dev branch to reflect the changes in jfrog/jfrog-cli-core#1031

@yahavi
Copy link
Member

yahavi commented Nov 27, 2023

Could you please also add a description to this PR?

@yahavi yahavi added the safe to test Approve running integration tests on a pull request label Nov 27, 2023
@github-actions github-actions bot removed the safe to test Approve running integration tests on a pull request label Nov 27, 2023
@yahavi yahavi merged commit 33ec972 into jfrog:dev Nov 27, 2023
62 of 63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Automatically generated release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow the mapping of files that aren’t included in the pattern or the AQL criteria
4 participants