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

Run release command from Procfile in Deploy flow #226

Merged
merged 9 commits into from
Aug 1, 2017

Conversation

drgarcia1986
Copy link
Contributor

@drgarcia1986 drgarcia1986 commented Jul 31, 2017

This is the most wanted feature according to our users!

This feature enables devs to run tasks (e.g. migrations, APM deploy notify, etc) before update the current deploy.

The release command will be run between build phase and deploy update phase. If some error comes across in release phase the deployed content won't be updated.


This change is Reviewable

@drgarcia1986 drgarcia1986 mentioned this pull request Jul 31, 2017
26 tasks
@@ -7,5 +7,6 @@ import (

var (
ErrBuildFail = status.Errorf(codes.Unknown, "Build return a non zero value")
ErrReleaseFail = status.Errorf(codes.Unknown, "Release command return a non zero value")
ErrInvalidTeresaYamlFile = status.Errorf(codes.InvalidArgument, "Invalid Teresa Yaml file")
Copy link
Contributor

Choose a reason for hiding this comment

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

return -> returned

Copy link
Contributor Author

Choose a reason for hiding this comment

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

y + p sorry

@@ -68,7 +68,7 @@ func (ops *DeployOperations) Deploy(user *storage.User, appName string, tarBall
slugURL := fmt.Sprintf("%s/slug.tgz", buildDest)
releaseCmd := confFiles.Procfile[ProcfileReleaseCmd]
if confFiles.Procfile != nil && releaseCmd != "" {
if err := ops.runReleaseCmd(a, slugURL, w); err != nil {
if err := ops.runReleaseCmd(a, deployId, slugURL, w); err != nil {
log.WithError(err).Errorf("Running release command %s in app %s", releaseCmd, appName)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe log deployId on errors, don't know if it's useful for debugging.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why not? I'll add

@drgarcia1986
Copy link
Contributor Author

@aguerra updated

Copy link
Contributor

@aguerra aguerra left a comment

Choose a reason for hiding this comment

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

🔁

@drgarcia1986 drgarcia1986 merged commit c499d27 into master Aug 1, 2017
@drgarcia1986 drgarcia1986 deleted the dg-release_command branch August 1, 2017 21:18
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

Successfully merging this pull request may close these issues.

None yet

2 participants