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

estafette release policies to enforce gitflow and conventions #83

Open
lruslan opened this issue Jun 11, 2020 · 0 comments
Open

estafette release policies to enforce gitflow and conventions #83

lruslan opened this issue Jun 11, 2020 · 0 comments

Comments

@lruslan
Copy link
Contributor

lruslan commented Jun 11, 2020

I'd say it's feature request.
It would be useful to configure release policies inside estafette-ci for specific projects/pipelines.

We have few projects with specific release restrictions.
For example in the gcp-infra-* projects we trying to follow gitflow and have following release policies:

  1. Per project/pipeline limit release branch name to allow release only from specific branch ( gcp-infra-* release only from ‘master’ )
  2. Prevent release(rollback) of old build, allow only releases(deployment) of currently released build version or newer ( for example initiating rollback by releasing of old/historical builds in gcp-infra-* may apply outdated terraform manifests and delete GCP resources, we want to force people to move forward and even in case if rollback make merge changes to the master and only then releasing new build)

While these policies can be implemented in individual extensions it feels role of enforcing such policies belongs to CI/CD system.
By having release logic in extension we mixing core functionality of extension with release logic (checking branch names, providing mechanism of semversioning to track deployed builds). Also all configuration provided through pipeline/project .estafette file and can be altered in a branch by user so branch with removed restrictions can be pushed and released ignoring master branch configuration.
Also with policy logic implemented in extension there's no clear way to prevent release from running in estafette - now when estafette release initiated we apply logic inside extension and then fail release with log message describing policy violation - ideally I'd like to prevent release running at all.

I think having such functionality might help other projects trying to implement gitflow and enforce conventions in uniform way.

Possible implementation might be additional section in estafette-ci config 'release_policies'. So we configure it outside of pipeline projects and have validation and enforcement done by estafette-ci.

release_policies:
  gcp-infra-prd:
    pipeline_name: gcp-infra-prd
    restrict_branch: master
    strategy: move_forward
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