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

Add check to PR workflow (initialize step) to fail if .mvn/maven.config exists #28559

Open
Tracked by #27842
spbolton opened this issue May 14, 2024 · 0 comments
Open
Tracked by #27842

Comments

@spbolton
Copy link
Contributor

spbolton commented May 14, 2024

The file .mvn/maven.config is used to set the release build information and release version to use for the build. If this file accidentally made it into the trunk branch we would no longer be building the default 1.0.0-SNAPSHOT versioning, this would break the build/deploy and possibly be a security issue also. An input flag should be used to initialize, by default the existence of the file should trigger failure, for a workflow/branch that expects a release version then a regex can be provided that the version contained in the .mvn/maven.config must match, in this case if the file does not exist it should error

A check should also be added to the pre-commit script in core-web/.husky/pre-commit so a user can be notified that the .mvn/maven.config is in the git index and should not before commit will work. A user should never commit this file to any branch directly. Make sure this logic is not running in CICD though that would prevent the promote step from working.

@spbolton spbolton changed the title Add check to PR workflow (initialize step) to fail if .mvn/maven.config exists. This should only be in release branches Add check to PR workflow (initialize step) to fail if .mvn/maven.config exists May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: New
Development

No branches or pull requests

1 participant