Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Add a new feature to configure windows freezing deployment #283

Merged
merged 8 commits into from
Dec 26, 2021

Conversation

noahingh
Copy link
Member

@noahingh noahingh commented Dec 26, 2021

@noahingh noahingh added the component: server This issue or pull request is related to the feature of the server-side label Dec 26, 2021
@noahingh noahingh linked an issue Dec 26, 2021 that may be closed by this pull request
@noahingh noahingh added this to the v0.5 milestone Dec 26, 2021
@noahingh noahingh added the documentation Pull requests improves or adds to documentation label Dec 26, 2021
return false, e.NewErrorWithMessage(e.ErrorCodeEntityUnprocessable, "The ref is not matched with 'deployable_ref'.", nil)
func (i *Interactor) isDeployable(ctx context.Context, u *ent.User, r *ent.Repo, d *ent.Deployment, env *extent.Env) error {
// Skip verifications for roll back.
if !d.IsRollback {
Copy link
Member Author

Choose a reason for hiding this comment

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

Add a condition to skip verifications works only for deployment.

return err
}

if freezed, err := env.IsFreezed(time.Now().UTC()); freezed {
Copy link
Member Author

Choose a reason for hiding this comment

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

Verify the time is in the deploy freeze window or not.

@noahingh noahingh marked this pull request as ready for review December 26, 2021 06:38
@noahingh noahingh merged commit 783a1c7 into main Dec 26, 2021
@noahingh noahingh deleted the freeze-window branch December 26, 2021 06:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: server This issue or pull request is related to the feature of the server-side documentation Pull requests improves or adds to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support the deploy freeze windows
1 participant