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

checkout mojo should switch safety-service to develop #66

Open
jonathanl-telenav opened this issue Sep 9, 2022 · 2 comments
Open

checkout mojo should switch safety-service to develop #66

jonathanl-telenav opened this issue Sep 9, 2022 · 2 comments
Assignees

Comments

@jonathanl-telenav
Copy link
Contributor

when we switch safety-service to develop with the mojo, it should switch it to 'snapshot' instead. important feature to prevent mistakes

@timboudreau
Copy link
Collaborator

I'll paste here what I just put in the chat:

In the long run, the stuff I've got on my user-preferences branch will solve the "snapshot" vs "develop" problem. I've got a few test failures to figure out, but it's mostly there. Kind of your usual layered settings-lookup thing - look for a .cactus.properties in the project dir, or any parent dir up to the checkout root, and under that a cactus.properties under your home dir.

So we add an annotation to those properties where the defaults should be customizable (like the default development branch) that serves the same role as defaultValue= in Maven's @Parameter annotation, but looks them up in that stack of properties files.

So, we'll just be able to put a .cactus.properties file in the root of safety-service with a key-value pair to set what the base branch is.

@timboudreau
Copy link
Collaborator

What I've got on the branch adds a couple of twists - key lookup tries first $MOJO_CLASS_SIMPLE_NAME.$KEY, and then the key (which, if unspecified, is just the field name).

That way, a key/value pair can be customized just for one mojo if it's too broad or overloaded to make sense with the same setting for all mojos.

There was some example I'd thought of when I decided to do it, but I don't remember what.

It's on the branch feature/user-preferences - I think I pushed it, but if not I will.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants