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

Feature request: Allow to specify branch that should be used to build recipes #62

Open
mnocon opened this issue Jan 27, 2021 · 0 comments

Comments

@mnocon
Copy link

mnocon commented Jan 27, 2021

Hi!
Thanks for this package, I'm using it for set up my own Flex server and it works great.

There is one thing that I'm missing (either it's a missing feature or I'm missing some configuration option): the ability to specify the branch in a private repository that should be used to build recipes.

My current setup:

A single repository (mnocon/recipes) with a branch master. Flex server set to use that repository to serve the recipes.

Issue

The issue I have right now is that I cannot easily test changes made to the recipes - I can only see if I specified them correctly if they are merged to master, but at that point they are already available to all users, which means reverting changes in case of an error. There is no "staging".

What I'd like to have

A single repository (mnocon/recipes) with two branches:

  • master (with a Flex server configured to serve recipes from it)
  • staging (with another Flex server configured to serve recipes from it)

Then my workflow could look like:

  1. merge a change to staging branch
  2. test the behaviour using the "staging" flex server
  3. if it's working correctly merge the staging branch to master (make it public for everyone).

I'm missing the option to set the branch staging as the source of data for the second Flex server. If I understand correctly this part of the code: https://github.com/moay/server-for-symfony-flex/blob/master/src/RecipeRepo/RecipeRepo.php#L126
the default branch is always used.

My workaround

Two repositories: mnocon/recipes and mnocon/recipes-staging (mnocon/recipes-staging is a fork of mnocon/recipes). For each repository I have a Flex server configured to serve recipes from it.

Then I can achieve my goal with workflow like:

  1. merge a change to main branch of mnocon/recipes-staging
  2. test the behaviour using the "staging" flex server
  3. if it's working correctly perform a merge from recipes-staging to recipes (make it public for everyone).

But in an ideal world I'd like to avoid creating an additional repository.
Please let me know if something is unclear or if I have missed something, I'll be happy to answer any questions.

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

No branches or pull requests

1 participant