-
Notifications
You must be signed in to change notification settings - Fork 232
add promote build to build menu #191
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
Conversation
| )} | ||
| </li> | ||
| <li> | ||
| {build.status === "success" ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use STATUS_SUCCESS const from src/shared/constants/status.js here?
| </button> | ||
| ):null } | ||
| </li> | ||
| {build.status === "success" && this.state.togglePromote ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use STATUS_SUCCESS const from src/shared/constants/status.js here?
| ):null } | ||
| </li> | ||
| {build.status === "success" && this.state.togglePromote ? ( | ||
| <ul class="sub">{envs.map(function(env) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this item belong to previous section "Promote" maybe we should move it inside the <li>
tag?
| </button> | ||
| )} | ||
| </li> | ||
| <li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This <li> item will be empty when status =! success, maybe we should move in condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, you are right
| client | ||
| .restartBuild(owner, repo, build, { fork: true, event: "deployment", "deploy_to": env }) | ||
| .then(result => { | ||
| displayMessage(tree, "Successfully promote your build"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we should have multiple deployment, maybe we should specify the deployment target in message? something like:
displayMessage(tree, `Successfully promote your build to target ${env}`);
| displayMessage(tree, "Successfully promote your build"); | ||
| }) | ||
| .catch(() => { | ||
| displayMessage(tree, "Failed to promote your build"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as before
|
@wavezhang nice work! I added some suggestion, let me know what do you think about it. |
|
@mavimo I have update my commits following your suggestion |
| <span>Promote Build</span> | ||
| </button> | ||
| ):null } | ||
| {build.status === STATUS_SUCCESS && this.state.togglePromote ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are mixing TAB & spaces, coding standards used in drone-ui need to use tab, can you run linter (execute yarn lint command from project root) and fix errors? Thx!
|
|
||
| ul { | ||
| li { | ||
| margin: 0px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be not needed since we already set it on li element at line 102.
| ul { | ||
| li { | ||
| margin: 0px; | ||
| padding: 0px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure why we are going to remove padding here, having padding to simulate indentation should help to understand "tree" structure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| <input type="text" value={this.state.customEnv} | ||
| onClick={event => event.stopPropagation()} | ||
| onChange={this.updateCustomEnv.bind(this)} | ||
| placeholder="input and then click play icon"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Placeholder description should indicate the content of field and is not intended to be a explanation on how to use it, text should be something like: Deployment target (eg: staging)
|
@wavezhang some more note (PS: let me know if there is that I can do to help on finalize this PR, I'll like it and your work on it 🥇) |
|
@wavezhang I see also that the notification message do not include the deployment target (comment 1 and comment 2), there is some reason why we should not include it? |
|
I think the general consensus is that we need to be moving things out of the drawer menu (and work toward eliminating the drawer) as opposed to adding more functionality to the drawer. The intention was for the promote button to take the user to a new page, or maybe event some sort of modal. I just want to set expectations that I'm not currently focused on the UI at the moment, so it may take some time for new UI features to be merged. |
|
@bradrydzewski if you don't want to dedicate time to it, there is enough people in the drone team on github to delegate the UI support to |
|
@bradrydzewski is that possible to delegate UI merges to someone else in drone team like @ylecuyer said? |
|
It's very useful feature. Hope it will be added soon. |
|
This is really important feature for us. @bradrydzewski When are you going to add this? Is there a way to help you to add this feature as soon as possible? |
|
@bradrydzewski Promoting builds is also not available via the build API, right? That would be super-awesome, too! |
|
@wavezhang there are some issue on I fixed it on mavimo@e0a06cf please report fixes here, thx :) |
|
Hi @wavezhang @ylecuyer @nsiniakevich @izumskee @Wagos @smxsm, I create a PoC that include:
This can be tested using the following config (supposing to use version: '3'
services:
drone-server:
image: drone/drone:0.8.5
environment:
- DRONE_WWW=/drone-ui
volumes:
- drone-ui:/drone-ui
drone-ui:
image: mavimo/drone-ui:next
volumes:
- drone-ui:/drone-ui
volumes:
drone-ui:NB: the PoC I do is only intended useful for testing purpose, identify issue or improvement needed before PRs are included in mainstream, I do not suppose to do maintenance or have a fork that diverge from official UI, so if you chose to use it please report your feedback on issues on order to make it more usable :) |
|
@mavimo lint errors fixed :) |
|
May I know what's the status of this? |


Add a "Promote Build" menu to build drawer, when click it will toggle environments list display as follows. The deploy environment list is obtain from a modified droneServer api, see this. Deploy parameters are not supported currently.
