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

Add Spec for Cloning Branch Configurations #254

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# App Center Build Clone Branch Configuration Proposal

This proposal details the approach the App Center team will take to address a heavily voiced frustration regarding branch configurations. We expect to start work on implementing this feature in the second quarter of 2019.

## Problem Statement

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Call it a challenge and stay positive 😄

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😂Appreciate the kind words.


Currently, each time a new branch needs to be configured, one has to configure it completely from scratch. Existing configurations are not available for re-use. This is especially cumbersome for a branch configuration with many environment variables and when dealing with the management of signing credentials. Building a new branch via API today requires full configuration of the branch and uploading secrets.

## Goal

Given that at least one branch is already configured for a specific app, one can clone a configured branch’s configuration and apply it to a non-configured branch.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be helpful also override a specific configuration. I believe that this will be available by default.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a fair point. 👍 With Azure DevOps backing our build service this might be a bit tricky for us when it comes to the way we manage secrets. Cloning a configuration is an API call, but overwriting a config with new secrets without losing build logs is a more difficult challenge. @nrajpurkar and @dennispan will take a look and circle back.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this is an obvious improvement over the current implementation I don't understand the limitation of one configuration per branch. Why isn't the branch a property of the configuration rather than the other way around? I would expect there to be an unlimited number of configurations with the ability to duplicate and delete any of them. I would choose the branch to be associated with each configuration just like I choose the version of Xcode, the scheme, etc. The way that configurations disappear in a cloud of smoke when I delete a release branch now is odd. I would like to have a release configuration that I use on any release branch as well as others. Some would run tests others wouldn't. The current design doesn't make much sense to me.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@phoney this is definitely valid feedback and looks a little bit different than what is proposed here. That aligns more with #65 and also something we are taking a look into as a future improvement.


## Solution

### UI Experience
* After navigating to a branch configuration page, an icon will be visible to clone a different branch’s configuration and apply it to the current branch.
* App Center Build will populate existing build configurations to clone.
* App Center will clone the following from a configured branch’s configuration:
* Build settings – Includes toolset versions, build triggers, version number, and launch tests.
* Environment variables – Variable names and values will be cloned. This includes encrypted environment variables.
* Signing credentials – Stored signing credentials will be cloned along with passwords for the credentials.
* Build scripts – Build script settings will be cloned and applied. If the build script no longer exists in the repo, the build may fail.
* Distribution settings – Distribution to users, group, or store destinations will be cloned.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this. Usually we only distribute the master builds to app store etc. We should be able to select which configurations we want to clone.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SandroMachado from what I understand, everything will be copied, saved, and then you will have the ability to edit/remove any of the settings that you didn't want applied.

So in your situation, if you don't want the distribution settings to be copied, you would clone the configuration, save, then navigate to distribution settings on your cloned branch and turn them off.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's our thought here. You can always follow up an API call with another to adjust distribution settings and/or modify them through the portal UI directly.

* After selecting a configuration to clone, App Center will automatically apply and save the configuration to the new branch. Changes can be made to the new branch configuration after the cloned configuration is saved.

### Designs

To be shared

### API Experience

To be shared

## Limitations and Out of Scope

* After a branch configuration is cloned, changes on one branch will not keep settings in sync with cloned branch configurations.
* Default branch configuration is out of scope of this solution.
* Applying a cloned configuration will be limited to branches that have not been previously configured.