-
Notifications
You must be signed in to change notification settings - Fork 146
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 proposal] Whitelist Repositories allowed to dynamically create stacks #960
Comments
Probably not.
Stacks aren't designed to be ephemeral, and they're also the "top level object", so you wouldn't have anywhere to put the auto-provisioning code.
We don't have that exact workflow, but we achieve similar things using tasks on a stack, plus some glue code in a Webhook handler using Shipit's API. e.g. trigger a task with some parameters on PR opening, and another one on PR close. |
@casperisfine , thanks for the swift reply.
I'm no expert, but I can't rationalize why making stacks optionally, slightly less permanent might be a problem. Given one can manually add/remove Stacks in Shipit-Engine (and we've done so in our production instance a handful of times), what would be the concern with making "Review" stacks shorter lived and their creation/destruction the act of an optional automated process? Is there something specific you're thinking of, but in my blind-spot of ignorance, which would prevent this?
Exactly, which is why we propose to add a concept for the repository; to which stacks and additional configuration/logic might belong. One might argue that the Stack shows evidence of feature envy of the repository concept already - via its
In this way, wouldn't one lose the ability to use Shipit to determine which commits/deployments have been made against the PR branch and its target instance via Shipit? IE if it isn't a stack, we lose the commit and deployment history of the stack UI, ya? |
Ultimately it would "work", but lots of limitations would appear, e.g. Git repositories are not shared between stacks so the disk usage would ballon real quick. There's also the cleanup after a delete that is subject to a bunch of races that can leave things around etc. No huge deal, and nothing that can't really be ironed out with some work, but I'm just not convinced it's the best direction.
That could be a solution indeed, but that's quite a large refactoring (which doesn't mean I'm not open to the idea).
No it's still a stack. It's just that you use one off tasks to deploy rather than true deploys. Simple tasks will appear in the timeline just like regular deploys. e.g. (not tested) deploy:
- echo noop
tasks:
deploy_branch:
action: Deploy a branch
title: Deployed %{BRANCH} to ${SHA}
steps:
- script/to/depoy
variables:
- name: BRANCH
- name: SHA |
One loses the visual display of commits deployed, the built-in continuous delivery routine, and the separation of unrelated PRs for ease of understanding. We're trying to make these deployments first class citizens in Shipit. Would the maintainers be willing, in principle, to accept a change which introduces Application / Repository as a parent to Stack? |
Well, that's a refactoring I wanted to do since a long time for other reasons (sharing git repo, being able to quick link to other envs, etc), so yes I would merge such refactoring. I can't guarantee however that I'd merge an automatic provisioning of stacks upon PR opening. If the implementation end up being simple and elegant yes, but otherwise it's unlikely. |
Summary ------- At PowerHRG we desire to implement the ability to automatically deploy a branch as a new "review instance" of our application to our Kubernetes cluster when a Pull Request for that branch is opened - and subsequently clean up the instance when the PR is closed or merged - functionality similar to Heroku's Review Apps. However, we maintain a number of projects and do NOT want to expose this functionality for every repository. As we understand it, Shipit offers no mechanism at the repository level to control which repositories can dynamically provision stacks. It seems the Stack is the highest level concept which involves a repository, but this remains insufficient since the Stack also marries a particular branch and environment to the repository concept. What we _think_ we'd like is a higher level concept which represents the repository to which stacks could belong. This repository could then contain its own configuration for the project-level features we desire. References ---------- - Shopify#960
Summary ------- At PowerHRG we desire to implement the ability to automatically deploy a branch as a new "review instance" of our application to our Kubernetes cluster when a Pull Request for that branch is opened - and subsequently clean up the instance when the PR is closed or merged - functionality similar to Heroku's Review Apps. However, we maintain a number of projects and do NOT want to expose this functionality for every repository. As we understand it, Shipit offers no mechanism at the repository level to control which repositories can dynamically provision stacks. It seems the Stack is the highest level concept which involves a repository, but this remains insufficient since the Stack also marries a particular branch and environment to the repository concept. What we _think_ we'd like is a higher level concept which represents the repository to which stacks could belong. This repository could then contain its own configuration for the project-level features we desire. References ---------- - Shopify#960
Summary ------- At PowerHRG we desire to implement the ability to automatically deploy a branch as a new "review instance" of our application to our Kubernetes cluster when a Pull Request for that branch is opened - and subsequently clean up the instance when the PR is closed or merged - functionality similar to Heroku's Review Apps. However, we maintain a number of projects and do NOT want to expose this functionality for every repository. As we understand it, Shipit offers no mechanism at the repository level to control which repositories can dynamically provision stacks. It seems the Stack is the highest level concept which involves a repository, but this remains insufficient since the Stack also marries a particular branch and environment to the repository concept. What we _think_ we'd like is a higher level concept which represents the repository to which stacks could belong. This repository could then contain its own configuration for the project-level features we desire. This change set extracts the repository data from the stack concept while retaining the original stack API - all repository related functionality of the Stack is now delegated to the stack's Repository object. References ---------- - Shopify#960 - Shopify#963
Summary ------- At PowerHRG we desire to implement the ability to automatically deploy a branch as a new "review instance" of our application to our Kubernetes cluster when a Pull Request for that branch is opened - and subsequently clean up the instance when the PR is closed or merged - functionality similar to Heroku's Review Apps. However, we maintain a number of projects and do NOT want to expose this functionality for every repository. As we understand it, Shipit offers no mechanism at the repository level to control which repositories can dynamically provision stacks. It seems the Stack is the highest level concept which involves a repository, but this remains insufficient since the Stack also marries a particular branch and environment to the repository concept. What we _think_ we'd like is a higher level concept which represents the repository to which stacks could belong. This repository could then contain its own configuration for the project-level features we desire. This change set extracts the repository data from the stack concept while retaining the original stack API - all repository related functionality of the Stack is now delegated to the stack's Repository object. References ---------- - Shopify#960 - Shopify#963
Summary ------- At PowerHRG we desire to implement the ability to automatically deploy a branch as a new "review instance" of our application to our Kubernetes cluster when a Pull Request for that branch is opened - and subsequently clean up the instance when the PR is closed or merged - functionality similar to Heroku's Review Apps. However, we maintain a number of projects and do NOT want to expose this functionality for every repository. As we understand it, Shipit offers no mechanism at the repository level to control which repositories can dynamically provision stacks. It seems the Stack is the highest level concept which involves a repository, but this remains insufficient since the Stack also marries a particular branch and environment to the repository concept. What we _think_ we'd like is a higher level concept which represents the repository to which stacks could belong. This repository could then contain its own configuration for the project-level features we desire. This change set extracts the repository data from the stack concept while retaining the original stack API - all repository related functionality of the Stack is now delegated to the stack's Repository object. References ---------- - Shopify#960 - Shopify#963
Greetings,
At PowerHRG we desire to implement the ability to automatically deploy a branch as a new "review instance" of our application to our Kubernetes cluster when a Pull Request for that branch is opened - and subsequently clean up the instance when the PR is closed or merged - functionality similar to Heroku's Review Apps. However, we maintain a number of projects and do NOT want to expose this functionality for every application/repository/pipeline.
As we understand it, Shipit offers no mechanism at the repository level to control which repositories can dynamically provision stacks. We'd like to add such a feature to Shipit and are seeking design guidance / gauging appetite for possible upstream contribution. It seems the Stack is the highest level concept which involves an application/repository/pipeline, but this remains insufficient since the Stack also marries a particular branch and environment to the application/repository/pipeline concept. What we think we'd like is a higher level concept which represents the application/repository/pipeline to which stacks could belong. This application/repository/pipeline could then contain its own configuration for the project-level features we desire.
As I've stated earlier, we seek guidance:
The text was updated successfully, but these errors were encountered: