spaship / operator

SPAship Operator
https://spaship.io/operator/
Apache License 2.0
1 stars 2 forks source link

Dynamic Environments #16

Open lkrzyzanek opened 3 years ago

lkrzyzanek commented 3 years ago

Envs are hardcoded like this:

envs:
  dev:
    branch: dev
  stage:
    branch: stage

For PR Previews it would be great to have possibility to define Dynamic Environments which are created based on list of branches (component git repos) with regexp and deleted once branch is deleted. e.g.

envs:
  preview-$1:
    branch: fix-(.*)

This would create for component's branches fix-1, fix-2 environments preview-1 and preview-2. Individual components could obviously override this default branch. However if such overried would not be defined the operator needs to check if such fix-1 branch exists and if not the default should be used.

The list of environments is created based on all branches from all components.